opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

AZ Phewas portal linkouts and changes to widget #3321

Closed buniello closed 2 days ago

buniello commented 1 month ago

The AstraZeneca PheWAS Portal team have shared their gene and disease links that we can use for our pages link-outs. This happened though personal comms with @d0choa.

https://azphewas.com/geneView/{dataset}/{gene}/glr/{type}

Where:

BRCA1 example in 470k: https://azphewas.com/geneView/ba08a93f-501e-44e6-a332-98ce2f852279/BRCA1/glr/binary

The team shared the full list in a spreadsheet

buniello commented 1 month ago

@ireneisdoomed and myself discussed this in person and shared relevant material. Irene let me know if you have any questions for me. From my side, i will think about what's he best way to visualise their gene links.

buniello commented 1 month ago

Discussed and decided:

ireneisdoomed commented 3 weeks ago

The data contains the information to build both links based on the provided tables.

  1. Link to their phenotype page This is directly available in the first element of urls.url. For example: https://azphewas.com/phenotypeView/ba08a93f-501e-44e6-a332-98ce2f852279/dd036e4f-7ca4-47ec-9bd3-7fd1d3f45ac9/ My recommendation is that we update the link in the Cohort/Project column of each AZ evidence to this one.

  2. Link to their gene page This can be built concatenating several fields. The pattern is: https://azphewas.com/geneView/{releaseVersion}/{targetFromSourceId}/ For example: https://azphewas.com/geneView/ba08a93f-501e-44e6-a332-98ce2f852279/A1BG/ My recommendation is that we update the AstraZeneca PheWAS Portal link in the subheader of the widget since it will remain constant for all AZ rows in that widget.

Just double checking, neither urls nor releaseVersion were used for the burden evidence so far, but they were there for other sources. We don't need to change the API, right?

d0choa commented 3 weeks ago

@ireneisdoomed No need to change the API if the fields were already in the schema for another evidence data source. The API treats all evidence as a single dataset with a single schema independently of the data source.

buniello commented 3 weeks ago

Tagging @gjmcn for above comments

gjmcn commented 3 weeks ago

@ireneisdoomed Should the releaseVersion be available with the current version of the platform? If I go to the BRCA1 associations page, expand the first Gene Burden evidence circle (breast neoplasm) and tweak the API query to include releaseVersion in the rows, I get null.

ireneisdoomed commented 3 weeks ago

That's right. This is a new field so it's empty in the data in production

d0choa commented 3 weeks ago

@gjmcn releaseVersion is expected to be populated only when projectId == AstraZeneca PheWAS Portal. Only in these cases we are expecting to build the links

Query based on today's dev version:

query query {
  disease(efoId: "EFO_0003869") {
    id
    geneBurdenSummary: evidences(
      ensemblIds: ["ENSG00000012048"]
      enableIndirect: true
      datasourceIds: ["gene_burden"]
      size: 10
    ) {
      count
      rows {
        projectId
        releaseVersion
      }
    }
  }
}
{
  "data": {
    "disease": {
      "id": "EFO_0003869",
      "geneBurdenSummary": {
        "count": 71,
        "rows": [
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "AstraZeneca PheWAS Portal",
            "releaseVersion": "ba08a93f-501e-44e6-a332-98ce2f852279"
          },
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "AstraZeneca PheWAS Portal",
            "releaseVersion": "ba08a93f-501e-44e6-a332-98ce2f852279"
          },
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "AstraZeneca PheWAS Portal",
            "releaseVersion": "ba08a93f-501e-44e6-a332-98ce2f852279"
          },
          {
            "projectId": "REGENERON",
            "releaseVersion": null
          },
          {
            "projectId": "AstraZeneca PheWAS Portal",
            "releaseVersion": "ba08a93f-501e-44e6-a332-98ce2f852279"
          }
        ]
      }
    }
  }
}
gjmcn commented 3 weeks ago

Sorry, confused myself! - was working in dev but used the production GraphQL playground.

gjmcn commented 3 weeks ago

@buniello @d0choa

For the AZ PheWAS link in the widget subheader, if there are no rows where projectId == AstraZeneca PheWAS Portal should we still include the link but just point to https://azphewas.com?

Seems more consistent to always include the same links in the subheader and AZ PheWAS can (or will always?) have a page for the target. To get the direct link in this case will be more work though - which I can look into if worth it.

buniello commented 2 weeks ago

Hi @gjmcn let's discuss this in person tomorrow. Thank you for this 👍🏼

buniello commented 2 weeks ago

@gjmcn please let me know when this is ready to test

gjmcn commented 2 weeks ago

@carcruz @chinmehta I put in a PR for this issue but @buniello cannot test it because the Netlify preview was cancelled - clicking on details shows that initializing failed:

Failed during stage 'checking build content for changes': Canceled build due to no content change

Have you seen this before? Is there an easy fix?

carcruz commented 2 weeks ago

Hi @gjmcn, @buniello

Here, you can check the preview: https://deploy-preview-391--ot-platform.netlify.app

@gjmcn I just "re-try" to run the build in the Netlify UI. This happens because the changes in the PR occurred in files out of the app/platform folder. In order to fix this, we will need a smarter dev environment

buniello commented 2 weeks ago

both links, disease (in widget) and gene (source link in widget header) look good 👍

d0choa commented 1 week ago

It would be good to fix a minor issue that got lost in limbo. In the rare cases in which projectId can be null it would be good not to show the parenthesis. The issue was already in production.

From PKD2 - chronic kidney disease associations:

Screenshot 2024-06-17 at 10 41 09

gjmcn commented 1 week ago

Latest commit fixes this.

prashantuniyal02 commented 2 days ago

Released in Platform 24.06