MRCIEU / ieugwasr

R interface to the IEU GWAS database API
https://mrcieu.github.io/ieugwasr/
Other
73 stars 23 forks source link

Error message when there is no result for tophits #61

Closed JasonQiu closed 5 months ago

JasonQiu commented 6 months ago

Package throws error when the dataset has no tophits result. @explodecomputer Could you please take a look? Possibly at https://github.com/MRCIEU/ieugwasr/commit/fb9a5f26ec1446435dae8683ae273009cb039560#diff-008c96b1d58014f529299c8d5a1ea473a359953adfb7cd8215a43af5c5cca602

E.g.

> ieugwasr::tophits("ebi-a-GCST90016930")
Using access token. For info on how this is used see logging_info()
ℹ The googleAuthR package is using a cached token for *****@bristol.ac.uk.
Error in tophits_query(id = id, pval = pval, clump = clump, r2 = r2, kb = kb,  : 
  There was an error, please contact the developers
GET /ebi-a-tophits/_search
{
  "query": {
    "match": {
      "gwas_id": "GCST90016930"
    }
  }
}
{
  "took" : 29,
  "timed_out" : false,
  "_shards" : {
    "total" : 75,
    "successful" : 75,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 0,
      "relation" : "eq"
    },
    "max_score" : null,
    "hits" : [ ]
  }
}
docZ9 commented 5 months ago

I also encountered the same problem, have you solved it?

Jiang337 commented 5 months ago

I met the same problems like you. did you solve this?

Jiang337 commented 5 months ago

I copied the 'ieugwasr' and 'TwoSampleMR' packages from someone else's computer to mine, and successfully resolved the issue

JasonQiu commented 5 months ago

Fixed in 07f55d02f4e7b5003d8c26c18a97ee560f982b4c