EBISPOT / goci-rest

Apache License 2.0
4 stars 1 forks source link

Study responses are truncated #39

Closed ramiromagno closed 2 years ago

ramiromagno commented 2 years ago

Hi,

A user of gwasrapidd got these SNPs returning incomplete study JSON responses:

CholoTook commented 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

CholoTook commented 2 years ago

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

CholoTook commented 2 years ago

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.

sajo-ebi commented 2 years ago

The fix has been deployed in Prod & I validated the API's are working , kindly confirm if we are good to close the ticket

CholoTook commented 2 years ago

All looks good to me. Many thanks

ramiromagno commented 2 years ago

All seems good indeed. Thanks!