Batch Query MyVariant.info with chr:pos list
1
0
Entering edit mode
4.7 years ago

Hello Biostars community!

I am following along with the MyVariant.info docs, looking to find a way to batch query by a list of chr:pos.

The documentation gives examples of how to do this with lists of RSIDs, however, this will not work for my use-case.

import httplib2
h = httplib2.Http()
headers = {'content-type': 'application/x-www-form-urlencoded'}
params = 'q=rs58991260,rs2500&scopes=dbsnp.rsid'
res, con = h.request('http://myvariant.info/v1/query', 'POST', params, headers=headers)

The list of chr:pos might look like: params = 'q=1:100292476,1:101064936&scopes=XXX'

Thank you in advance for you help!

myvariant • 833 views
ADD COMMENT
0
Entering edit mode
4.7 years ago
Newgene ▴ 370

As answered in this github issue, the current myvariant batch query does not support this kind of batch query (requiring to query the combination of multiple fields). You can always make such query via GET for a single query.

But this does represent a very useful use case we would like to support. I created a new issue to put it to our TODO list. This is an github issue under our biothings.api repo, so that this feature, once implemented, will be available to all of our BioThings APIs.

Cheers,

BioThings Team

ADD COMMENT

Login before adding your answer.

Traffic: 2697 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