This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get list of GenBank accession Ids by a Taxonomy Id?

In NCBI genbank, one Taxonomy Id corresponds a list of GenBank accession Ids, how do I retrieve these geneBank Ids by Python per a given Taxonomy Id? Thank you in advance.

sequence genbank

Thanks! But what is the file? I tried to download that file, it is about 1GB. I wish to use Biopython to retrieve GeneBank Ids from a given Taxonomy Id automatically. Is that possible?

If you must use biopython then see this: Retrieve Genbanks From Taxid

BTW: Use ADD REPLY/ADD COMMENT when responding to existing posts to keep threads logically organized.

1 answer

Get this file (it is large), uncompress and parse out the ID's you need.

For example for taxID 964: awk '{FS="\t";OFS="\t"}{if ($1 == 964) print $1,$6,$8;}' gene2accession

Log in to answer this question.