Entering edit mode
5.7 years ago
genomes_and_MGEs
▴
10
Hey guys,
I have a list of several accessions, such as
NZ_JRTV01000009.1 NZ_CEWL01000009.1 NZ_CP013481.2 NZ_CP009553.3 NZ_CBYD010000018.1 NZ_CBYE010000015.1 NZ_CP016370.1 ...
I would like to fetch the genus for each accession. Please be aware that some accessions are old and have been replaced by new accessions on NCBI. Thanks!
You could use the approach of my code at https://github.com/jrjhealey/PYlogeny/tree/master/PYlogeny
Use Entrez to query the Accessions and get their TaxIDs, then use ETE3's
NCBITaxa
module to extract the associated genus etc.This will do nothing about converting your obsolete IDs though, so you'll need to tackle that yourself.