Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirecting from organism analysis page to workflow landing page in Galaxy #137

Closed
nekrut opened this issue Oct 18, 2024 · 8 comments
Closed
Assignees

Comments

@nekrut
Copy link
Contributor

nekrut commented Oct 18, 2024

Now that we have a set of BRC-specific workflows that can be used on VEuPathDb genomes we can enable link outs from an organism page.

What needs to happen

  1. Suppose a user is on this page: https://brc-analytics.org/data/organisms/GCA_000002765_3
  2. The user clicks on the "Regulation" workflow "Analyze" button (corresponding to https://galaxyproject.github.io/iwc/workflow/a2f66906-e9e3-42f9-8629-390017ed2db0)
  3. This gets the user to https://test.galaxyproject.org/ workflow landing page
  4. The reference genome drop-down of this workflow is pre-filled with
    Image

How to construct the redirect

@mvdbeek - please, fiil in here

Steps to implement are...

@hunterckx

  1. create a mapping from workflow type to workflow ID.
  2. On any workflow button on the analysis page e.g., https://brc-analytics.dev.clevercanary.com/data/organisms/GCA_001189475_1.
    1. enable the button if its name is in the mapping.
    2. When the button is clicked, use the command curl 'https://test.galaxyproject.org/api/workflow_landings'
      -H 'Content-Type: application/json'
      --data-raw '{"workflow_id":"https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12","workflow_target_type":"trs_url","request_state": {"reference_genome":"mm10"}}' to request a workflow landing id. Replace the reference_genome with the assembly_version_id for the page.
    3. The API call will return with a response that includes the workflow_landing tagged as "UUID."
    4. Use the UUID to construct a URL like https://test.galaxyproject.org/workflow_landings/5d6eceda-4593-4cc0-ba16-da6b810deb10 and open this URL in a new tab.
    5. if the workflow_landing id request fails in step 3, then show the error page (let's discuss the error flow)
@nekrut nekrut converted this from a draft issue Oct 18, 2024
@nekrut nekrut moved this to Todo in BRC development tasks Oct 18, 2024
@mvdbeek
Copy link
Member

mvdbeek commented Oct 18, 2024

❯ curl 'https://test.galaxyproject.org/api/workflow_landings' \
  -H 'Content-Type: application/json' \
  --data-raw '{"workflow_id":"https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12","workflow_target_type":"trs_url","request_state": {"reference_genome":"mm10"}}'
{"uuid":"5d6eceda-4593-4cc0-ba16-da6b810deb10","workflow_id":"https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12","workflow_target_type":"trs_url","request_state":{"reference_genome":"mm10"},"state":"unclaimed"}

is an example request response pair. Then redirect the user to https://test.galaxyproject.org/workflow_landings/5d6eceda-4593-4cc0-ba16-da6b810deb10.

Note that the API will likely change to include a mandatory public argument in the request body, for brc purposes that should be true.

For this particular workflow "reference_genome": "mm10" is the key value pair that specifies the genome. The value can be any of the GCA_* accessions. The key that specifies the reference genome is going to be workflow specific and, as is the workflow id, so we'll need to have a list of workflows.

You can find the openapi schema here: https://test.galaxyproject.org/api/docs#/workflows/create_landing_api_workflow_landings_post

@NoopDog
Copy link
Collaborator

NoopDog commented Oct 18, 2024

Super, thanks.

Do we have any other workflow name to workflow_target_type pairs? e.g.

Regulation, https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12

Cheers,
D

@nekrut
Copy link
Contributor Author

nekrut commented Oct 18, 2024

Super, thanks.

Do we have any other workflow name to workflow_target_type pairs? e.g.

Regulation, https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12

Cheers, D

You mean do we have more workflows? Yes. I'm checking them one by one. Will probably take me whole weekend.

@NoopDog
Copy link
Collaborator

NoopDog commented Oct 18, 2024

No worries and thanks...

D

@mvdbeek
Copy link
Member

mvdbeek commented Oct 18, 2024

workflow_target_type is always trs_url, the categories should probably be listed by hand or be taken from https://dockstore.org/organizations/iwc

@NoopDog
Copy link
Collaborator

NoopDog commented Oct 21, 2024

@nekrut, would you like to provide a short paragraph of 1-2 sentences explaining how these workflows are a "preview" and run on test and what will happen once the previews are live on prod?

General instructions on the flow to run a workflow would also be helpful. e.g.

  1. Select your Analysis type.
  2. You will be directed to a test instance to preview the workflow.
  3. Login with your Gmail or Google Workplace backed email address.
  4. Login and...

We can put a simple guide on the site as well with markdown/images in a "Help and Docs" section. We can create a second ticket for that.

A 3rd sentence would be helpful to explain what the non-clickable workflows are, e.g., "The following workflows are under development and will be available soon." or similar.

@NoopDog
Copy link
Collaborator

NoopDog commented Oct 21, 2024

@hunterckx lets also

  1. Divide up the workflows into two sections: Preview and Coming Soon. So the "Regulation" would be in the preview section and everything else in the coming soon section.
  2. For the coming soon use the original text box on the top as the first element.
  3. I will work with Anton to get text for the top of the preview section...

NoopDog added a commit that referenced this issue Oct 22, 2024
hunterckx pushed a commit that referenced this issue Oct 25, 2024
hunterckx added a commit that referenced this issue Oct 28, 2024
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
mvdbeek added a commit to mvdbeek/brc-analytics that referenced this issue Oct 29, 2024
mvdbeek added a commit to mvdbeek/brc-analytics that referenced this issue Oct 29, 2024
mvdbeek added a commit to mvdbeek/brc-analytics that referenced this issue Oct 29, 2024
mvdbeek added a commit to mvdbeek/brc-analytics that referenced this issue Oct 30, 2024
@NoopDog
Copy link
Collaborator

NoopDog commented Nov 1, 2024

Complete! Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants