# PheWAS Download

**URL:** <https://community.opentargets.org/t/phewas-download/1694>\
**Category:** GraphQL API\
**Created:** [11 March 2025 12:09 UTC](https://community.opentargets.org/t/phewas-download/1694 "2025-03-11T12:09:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamalika\_ray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kamalika_ray/32/310_2.png) [@kamalika\_ray](https://community.opentargets.org/u/kamalika_ray)\
**Post date:** [11 March 2025 12:09 UTC](https://community.opentargets.org/t/phewas-download/1694/1 "2025-03-11T12:09:12Z")

</div>

Hi,

How do I download the exact results of this API in bulk. I want to download the result for 3000 variants.  
query search($variantId: String!) {  
pheWAS(variantId: $variantId) {  
totalGWASStudies  
associations {  
pval  
beta  
oddsRatio  
study {  
studyId  
source  
pmid  
pubDate  
traitReported  
traitCategory  
}  
nTotal  
}  
}  
}  
Does the v2d data on the FTP site contain pheWAS results?

Thanks

---

<div class="post-metadata">

**Author:** ![ElenaL](https://avatars.discourse-cdn.com/v4/letter/e/8491ac/32.png) [@ElenaL](https://community.opentargets.org/u/ElenaL)\
**Post date:** [12 March 2025 09:28 UTC](https://community.opentargets.org/t/phewas-download/1694/2 "2025-03-12T09:28:43Z")

</div>

Hello,

For 3k variants you should be able to use the “otargen” package in R which contains the “phewas” function that can return the Open targets genetics results.

Best,  
Elena

---

<div class="post-metadata">

**Author:** ![kamalika\_ray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kamalika_ray/32/310_2.png) [@kamalika\_ray](https://community.opentargets.org/u/kamalika_ray)\
**Post date:** [12 March 2025 10:05 UTC](https://community.opentargets.org/t/phewas-download/1694/3 "2025-03-12T10:05:52Z")

</div>

Hi Elena,

It’s 3k for just 1 gene, I have 15000 genes.  
Is there a way I can download it in bulk? Where can I find this data on the FTP website?

Thanks.

---

<div class="post-metadata">

**Author:** ![hcornu](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/hcornu/32/716_2.png) [@hcornu](https://community.opentargets.org/u/hcornu)\
**Post date:** [13 March 2025 09:34 UTC](https://community.opentargets.org/t/phewas-download/1694/4 "2025-03-13T09:34:59Z")

</div>

Hi @kamalika_ray,

Next week’s release of the Open Targets Platform will include updated variant information, including data downloads.

Thanks,

Helena

---

<div class="post-metadata">

**Author:** ![kamalika\_ray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kamalika_ray/32/310_2.png) [@kamalika\_ray](https://community.opentargets.org/u/kamalika_ray)\
**Post date:** [1 April 2025 10:27 UTC](https://community.opentargets.org/t/phewas-download/1694/5 "2025-04-01T10:27:28Z")

</div>

Hi @hcornu

Thanks for your message. Where can I find the data about diseases associated with genetic variants in the new ftp download site. I am a bit confused due to the change in the terminologies.

Thanks,  
Kamalika

---

<div class="post-metadata">

**Author:** ![irene](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/irene/32/50_2.png) [@irene](https://community.opentargets.org/u/irene)\
**Post date:** [2 April 2025 11:59 UTC](https://community.opentargets.org/t/phewas-download/1694/6 "2025-04-02T11:59:25Z")

</div>

Hi @kamalika_ray,

that would be our [credible set dataset](https://ftp.ebi.ac.uk/pub/databases/opentargets/platform/25.03/output/credible_set/). You’d want to filter for variation that has been linked to GWAS studies (`studyType == gwas`).

You can learn more about it in our [documentation](https://platform-docs.opentargets.org/credible-set).

Best,  
Irene

---

<div class="post-metadata">

**Author:** ![kamalika\_ray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kamalika_ray/32/310_2.png) [@kamalika\_ray](https://community.opentargets.org/u/kamalika_ray)\
**Post date:** [3 April 2025 10:10 UTC](https://community.opentargets.org/t/phewas-download/1694/7 "2025-04-03T10:10:04Z")

</div>

Hi Irene,

Thanks for your message. I don’t see the reported traits (disease name/study.trait\_reported) in that table. Do I have to extract it from some other table?

Thanks,  
Kamalika

---

<div class="post-metadata">

**Author:** ![irene](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/irene/32/50_2.png) [@irene](https://community.opentargets.org/u/irene)\
**Post date:** [3 April 2025 11:31 UTC](https://community.opentargets.org/t/phewas-download/1694/8 "2025-04-03T11:31:38Z")

</div>

The reported trait would be in `traitFromSource` in the GWAS studies table.

Best,  
Irene

---

<div class="post-metadata">

**Author:** ![kamalika\_ray](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kamalika_ray/32/310_2.png) [@kamalika\_ray](https://community.opentargets.org/u/kamalika_ray)\
**Post date:** [3 April 2025 12:07 UTC](https://community.opentargets.org/t/phewas-download/1694/9 "2025-04-03T12:07:45Z")

</div>

Thanks a lot! That was very helpful
