Download GWAS summary statistics with N > 100,000
1
0
Entering edit mode
2.1 years ago
n.y.bell • 0

Hi,

I am starting a project that will investigate many phenotypes (100-200), and need summary statistics for each one. I am currently trying to use the GWAS catalog API to list all traits with GWAS summary statistics and then narrow exclude studies with samples sizes smaller than 100,000. The problem I am running into is that when using the GWAS catalog API to list all available traits it only lists about 20 traits. I was wondering if anyone else has run into this problem and may know a solution (or may know a different way to do this).

Thanks for any help! I have attached some of my code below

# import packages 
import requests
import json 

# set URL for GWAS Catalog summary statistics 
gwasURL = "https://www.ebi.ac.uk/gwas/summary-statistics/api/traits/"

# request all available traits 
trait_res = requests.get(gwasURL)
API GWAS summary statistics • 743 views
ADD COMMENT
2
Entering edit mode
2.1 years ago
finster ▴ 90

Hi,

Looking at their API docs, the default is to return 20 traits. However, you can adjust the start offset and the number that is returned in the URL. For example, this URL gets you 100 back https://www.ebi.ac.uk/gwas/summary-statistics/api/traits?size=100&start=0 .

ADD COMMENT
0
Entering edit mode

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2577 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6