Closed ramiromagno closed 2 years ago
We found an issue with the API when used to get SNP: https://www.ebi.ac.uk/gwas/rest/api/efoTraits/MONDO_0100096/associations?projection=associationByEfoTrait
The result is truncated. We think the data is huge and pagination is not working properly on this API.
The call works if we remove projection=associationByEfoTrait parameter. But in this case, we will not receive certain information like the SNP object... https://www.ebi.ac.uk/gwas/rest/api/efoTraits/MONDO_0100096/associations
The call works if we remove projection=associationByEfoTrait parameter. But in this case, we will not receive certain information like the SNP object... https://www.ebi.ac.uk/gwas/rest/api/efoTraits/MONDO_0100096/associations
This is probably a separate issue, but...
Browsing the above JSON in my browser ... while browsing ... I expanded JSON._embedded.associations[821]._links.study.href, the result was an error: https://www.ebi.ac.uk/gwas/rest/api/associations/100034829/study
This is probably a separate issue, but...
Thinking about it, I bet this is actually the same issue.
Your code starts 'projecting' the results, association by association. It gets up to association number 816 and finds broken links. It then just dies, spitting out broken JSON.
Regardless of the reason for the links being broken (processing coordination I guess, i.e. the same term in the GUI reports 768 Associations compared to 822 in the JSON) the code to do the projection should handle the 'missing' data.
The fix has been deployed in Prod & I validated the API's are working , kindly confirm if we are good to close the ticket
All looks good to me. Many thanks
All seems good indeed. Thanks!
Hi,
A user of gwasrapidd got these SNPs returning incomplete study JSON responses: