Entering edit mode
8.6 years ago
crespialba
▴
20
I have a list of taxids that looks like this:
1204725
2162
1300163
420247
I am looking to get a file with taxonomic ids in order from the taxids above:
kingdom_id phylum_id class_id order_id family_id genus_id species_id
I am using the package "ete3". I use the tool ete-ncbiquery that tells you the lineage from the ids above. (I run it from my linux laptop with the command below)
ete3 ncbiquery --search 1204725 2162 13000163 420247 --info
The result looks like this:
# Taxid Sci.Name Rank Named Lineage Taxid Lineage
2162 Methanobacterium formicicum species root,cellular organisms,Archaea,Euryarchaeota,Methanobacteria,Methanobacteriales,Methanobacteriaceae,Methanobacterium,Methanobacterium formicicum 1,131567,2157,28890,183925,2158,2159,2160,2162
1204725 Methanobacterium formicicum DSM 3637 no rank root,cellular organisms,Archaea,Euryarchaeota,Methanobacteria,Methanobacteriales,Methanobacteriaceae,Methanobacterium,Methanobacterium formicicum,Methanobacterium formicicum DSM 3637 1,131567,2157,28890,183925,2158,2159,2160,2162,1204725
420247 Methanobrevibacter smithii ATCC 35061 no rank root,cellular organisms,Archaea,Euryarchaeota,Methanobacteria,Methanobacteriales,Methanobacteriaceae,Methanobrevibacter,Methanobrevibacter smithii,Methanobrevibacter smithii ATCC 350611,131567,2157,28890,183925,2158,2159,2172,2173,420247
I have no idea which items (IDS) correspond to what I am looking for (if any)
Obtain full taxonomic hierarchy from multiple species names
some answers also here: http://stackoverflow.com/a/36517712