icgc-argo / song-search

Song Search - GQL microservice for searching maestro generated song indexes
GNU General Public License v3.0
0 stars 0 forks source link

Investigate the Ability to List Analysis and WF #82

Open Buwujiu opened 1 year ago

Buwujiu commented 1 year ago

Detailed Description

End goal is to have a ui to show submitted analyses(seq exp) and what wf have been done on these analyses if any question is does our current gateway api let us query these info??

2 things we want the api to do:

  1. list submitted analyses
    • we want to include a filter where we can select analysis states (or all states if no filter)
  2. can list wf on these analyses if the api doesn't provide, need to implement these queries.

Exit Criteria

  1. If the current API does not show submitted analyses and the wf that have been run on them, list the necessary steps in order to achieve that.
  2. Make tickets for the next steps.
UmmulkiramR commented 1 year ago

@Buwujiu @joneubank

The query below can be used to fetch a submitted analysis and see if there were any workflows run on it. A code change is needed to add the code filter.

{
  analyses(filter: {analysisId: "<analysis_id>", code: "submission-song.collab", analysisState: PUBLISHED}) {
    content {
      analysisId
      analysisType
      studyId
      analysisState
      repositories {
        code
        country
        name
        organization
        type
        url
      }
      inputForRuns {
        state
        runId
        repository
        inputAnalyses {
          analysisId
          analysisType
          studyId
        }
      }
    }
  }
}

For any analyses 'inputForRuns' will be empty if there are no workflows run on it yet. Otherwise it will have information that looks like this

"inputForRuns": [
    {
      "state": "COMPLETE",
      "runId": "wes-59a5a5ff54e84fe9997ab276fb1d535d",
      "repository": "https://github.com/icgc-argo-workflows/dna-seq-processing-wfs",
      "inputAnalyses": [
        {
          "analysisId": "8e351daf-ca77-470d-b51d-afca77170dd9",
          "analysisType": "sequencing_experiment",
          "studyId": "SEQ-CA"
        }
      ]
    }
  ]
UmmulkiramR commented 1 year ago

Attaching the PR here song-search#80

Buwujiu commented 1 year ago

@lindaxiang @edsu7 to test in QA.

lindaxiang commented 1 year ago

@Buwujiu @UmmulkiramR test the queries in QA

  1. The current APIs support to list and filter analysis based on the following fields:

    analysisId
    analysisState
    analysisType
    analysisVersion
    code
    donorId
    runId
    sampleId
    sampleType
    specimenId
    studyId

    Question to @UmmulkiramR : why does one analysis return two repositories like following, what's the meaning of local song?

    "repositories": [
            {
              "code": "song.collab",
              "country": "CA",
              "name": "Cancer Genome Collaboratory",
              "organization": "rdpc-collab",
              "type": "S3",
              "url": "https://song.rdpc-qa.cancercollaboratory.org"
            },
            {
              "code": "song.collab",
              "country": "CA",
              "name": "local song",
              "organization": "ICGC",
              "type": "S3",
              "url": "https://song.rdpc-qa.cancercollaboratory.org"
            }
          ]
  2. For any analyses 'inputForRuns' will be empty if there are no workflows run on it yet. Otherwise it can return Run information including state, runId, repository and etc.

Buwujiu commented 1 year ago

Tested by Linda and Edmund, ready for prod deploy.

UmmulkiramR commented 1 year ago

Deployed on Prod.

Buwujiu commented 1 year ago

@lindaxiang @edsu7 Can you give it a test in prod? Thank you!