biothings / mygene.info

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

Old version #99

Closed bhanco closed 3 years ago

bhanco commented 3 years ago

Is there any way to replicate results from an older query of mygene? After several months, updates have caused some small changes to my GO results.

Many thanks

newgene commented 3 years ago

@bhanco mygene.py client (and biothings_client.py) includes a feature to set local caching for API requests. You can find more info here:

https://docs.mygene.info/projects/mygene-py/en/latest/index.html?highlight=cache+caching#mygene.MyGeneInfo

or the same from biothings_client.py (mygene.py is now a wrapper around biothings_client.py):

https://biothings-clientpy.readthedocs.io/en/latest/doc/API.html?highlight=caching+cache#mygeneinfo

Basically, if you call set_caching method with a local cache file before making any queries, all query results should be cached in the local file and re-run these queries should give you the consistent results.