biotite icon indicating copy to clipboard operation
biotite copied to clipboard

Pin version of uniprot database

Open dariober opened this issue 2 years ago • 1 comments

Hi- I just discovered biotite and it looks like a great project - thanks!

I need to query UniProt to get proteins for a given taxonomy and containing a certain Pfam motif. I can do this with:

query = up.SimpleQuery("taxonomy", "apicomplexa") & up.SimpleQuery("database", "(type:pfam)")
ids = up.search(query, number= -1)
...do something with ids

Can I pin the version of the uniport database I'm querying? This is in order to make the search reproducible in the future when the database will change.

dariober avatar Jun 10 '22 11:06 dariober

Hi. Unfortunately, the UniProt REST API does not support this, as far as I know. You could try the "modified" and "created" query fields (https://www.uniprot.org/help/query-fields) to find entries that have been modified or created since a given date, but you cannot retrieve old versions of the data this way.

Alternatively you could download an entire UniProt release from their FTP server and use the IDs from the search results to extract the entries of interest from these files.

padix-key avatar Jun 10 '22 11:06 padix-key