Getting literature evidence using the Open Targets Platform GraphQL API

I previously ran this query using the Open Targets Platform API:

query target($ensemblId: String!){
                      target(ensemblId: $ensemblId){
                        id
                        approvedSymbol
                        evidences(efoIds: "EFO_0000249", datasourceIds: "europepmc"){
                          rows{
                            literature
                            datasourceId
                            datatypeId
                            publicationYear
                            textMiningSentences{
                                       section
                                        text
                            }
                          }
                        }
                      }
                    }
 

{"ensemblId": "ENSG00000131507"}

This query provided PMID = 29937728 as evidence.

However, I ran the same query today and I don’t get any PMIDs. Has some API structure changed? Any suggestions to get the PMID for evidence?

This question was sent to the Open Targets helpdesk and has been posted here so that the answer can benefit the whole Community of users.

EFO has updated the ID for Alzheimer disease to MONDO_0004975

Updating the ID should solve the issue

Thanks for the quick response. I was not aware that the disease ID had changed. Thanks for the help!

1 Like

Are your publicationYear entries working? I seem to be getting only Null for the publication year.

Thanks.

It might sound strange, but we only store publicationYear for ot_genetics_portal evidence. It is due to the nature on how literature references are handled:

  1. for the EPMC evidence to populate some of the columns, the publication metadata is retrieved from the ePMC API including publication year.
  2. for all sources where pubmed identifiers are present, upon clicking on the reference, a drawer opens showing publication details. These pieces of data also fetched via an API calls.
  3. the genetics portal evidence is slightly special, as some metadata eg. year of publication, first author have an impact on the interpretation of the evidence, so these values are stored in the evidence itself.

Please take a look:

query OpenTargetsGeneticsQuery(
  $ensemblId: String!
  $efoId: String!
  $size: Int!
) {
  disease(efoId: $efoId) {
    id
    evidences(
      ensemblIds: [$ensemblId]
      enableIndirect: true
      size: $size
      datasourceIds: ["ot_genetics_portal"]
    ) {
      rows {
        id
        disease {
          id
          name
        }
        diseaseFromSource
        studyId
        studySampleSize
        variantId
        variantRsId
        literature
        publicationYear
        publicationFirstAuthor
        pValueExponent
        pValueMantissa
        oddsRatio
        oddsRatioConfidenceIntervalLower
        oddsRatioConfidenceIntervalUpper
        beta
        betaConfidenceIntervalLower
        betaConfidenceIntervalUpper
        variantFunctionalConsequence {
          id
          label
        }
        resourceScore
        projectId
      }
    }
  }
}

Variables:

{
  "ensemblId": "ENSG00000065361",
  "efoId": "MONDO_0005147",
  "size": 19
}