Closed emepyc closed 3 years ago
Ok, explicitly including the scopes
works...
curl -XPOST -d 'q=P53&scopes=all' -H "Content-Type: application/x-www-form-urlencoded" 'http://mygene.info/v3/query'
But that is not obvious from the documentation IMHO: http://mygene.info/tryapi/
And here says that scopes are optional (at least for the python client): http://docs.mygene.info/en/latest/doc/query_service.html#scopes
By default, on mygene.info, POST queries uses scopes = [ "_id", "entrezgene", "ensembl.gene", "retired" ], which explains your findings. Having explicit scopes is intended to provide the most relevant results for programmatic retrieval, especially when the user is trying to lookup by a specific type of id, where GET requests are somewhat tailored towards data exploration, thus by default search a wider range of ids and support complex query string parsing.
I'm trying to get the symbols from a bunch of uniprot IDs, but I'm getting
"notfound": true
on all POST queries (using uniprot or any other ids).For example, for me this works:
but this doesn't:
What would be the correct way of making these POST queries?