biothings / mygene.info

MyGene.info: A BioThings API for gene annotations
http://mygene.info
Other
113 stars 20 forks source link

Couldn't query on hgnc using POST method #46

Closed kevinxin90 closed 5 years ago

kevinxin90 commented 6 years ago

Trying to query based on hgnc id:

This returns results: http://mygene.info/v3/query?q=hgnc:1771

However this doesn't: import requests requests.post('http://mygene.info/v3/query', params='q=1771&scopes=hgnc').json()

cyrus0824 commented 5 years ago

@kevinxin90 this issue should be fixed by a recent commit. Can you verify that it's working for you? This is my output:

In [1]: import requests

In [2]: requests.post('http://mygene.info/v3/query', params='q=1771&scopes=hgnc').json()
Out[2]:
[{'_id': '1017',
  '_score': 11.891228,
  'entrezgene': 1017,
  'name': 'cyclin dependent kinase 2',
  'query': '1771',
  'symbol': 'CDK2',
  'taxid': 9606}]
kevinxin90 commented 5 years ago

@cyrus0824 It works! Great!