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!
1 answer
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
Log in to answer this question.