# Getting literature evidence using the Open Targets Platform GraphQL API

**URL:** <https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516>\
**Category:** GraphQL API\
**Created:** [21 March 2022 10:14 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516 "2022-03-21T10:14:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirTarget](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/sirtarget/32/155_2.png) [@SirTarget](https://community.opentargets.org/u/SirTarget)\
**Post date:** [21 March 2022 10:14 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516/1 "2022-03-21T10:14:40Z")

</div>

I previously ran this query using the [Open Targets Platform API](https://platform.opentargets.org/api):

```auto
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._

---

<div class="post-metadata">

**Author:** ![ochoa](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/ochoa/32/189_2.png) [@ochoa](https://community.opentargets.org/u/ochoa)\
**Post date:** [21 March 2022 15:37 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516/2 "2022-03-21T15:37:47Z")

</div>

EFO has updated the ID for Alzheimer disease to [MONDO\_0004975](http://purl.obolibrary.org/obo/MONDO_0004975)

Updating the ID should solve the issue

---

<div class="post-metadata">

**Author:** ![jmdixon2](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@jmdixon2](https://community.opentargets.org/u/jmdixon2)\
**Post date:** [21 March 2022 16:14 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516/3 "2022-03-21T16:14:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bruce.w.church](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bruce.w.church](https://community.opentargets.org/u/bruce.w.church)\
**Post date:** [23 March 2022 17:46 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516/4 "2022-03-23T17:46:09Z")

</div>

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

Thanks.

---

<div class="post-metadata">

**Author:** ![dsuveges](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/dsuveges/32/30_2.png) [@dsuveges](https://community.opentargets.org/u/dsuveges)\
**Post date:** [24 March 2022 09:06 UTC](https://community.opentargets.org/t/getting-literature-evidence-using-the-open-targets-platform-graphql-api/516/5 "2022-03-24T09:06:47Z")

</div>

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:

```auto
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:

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