Using EntrezDirect:
Your list in file id
. One per line.
$ for i in `cat id`; do printf ${i}"\n"; esearch -db taxonomy -query ${i} | efetch -format native -mode xml | grep ScientificName | awk -F ">|<" 'BEGIN{ORS=", ";}{print $3;}'; printf "\n"; done
Acidiphilium
Acidiphilium, cellular organisms, Bacteria, Proteobacteria, Alphaproteobacteria, Rhodospirillales, Acetobacteraceae,
Acidipropionibacterium
Acidipropionibacterium, cellular organisms, Bacteria, Terrabacteria group, Actinobacteria, Actinobacteria, Propionibacteriales, Propionibacteriaceae,
Acidithiobacillus
Acidithiobacillus, cellular organisms, Bacteria, Proteobacteria, Acidithiobacillia, Acidithiobacillales, Acidithiobacillaceae,
Acidobacterium
Acidobacterium, cellular organisms, Bacteria, Acidobacteria, Acidobacteriia, Acidobacteriales, Acidobacteriaceae,
Acidovorax
Acidovorax, cellular organisms, Bacteria, Proteobacteria, Betaproteobacteria, Burkholderiales, Comamonadaceae,
Acinetobacter
Acinetobacter, cellular organisms, Bacteria, Proteobacteria, Gammaproteobacteria, Pseudomonadales, Moraxellaceae,
Actinoalloteichus
Actinoalloteichus, cellular organisms, Bacteria, Terrabacteria group, Actinobacteria, Actinobacteria, Pseudonocardiales, Pseudonocardiaceae,
Actinobacillus
Actinobacillus, cellular organisms, Bacteria, Proteobacteria, Gammaproteobacteria, Pasteurellales, Pasteurellaceae,
Actinomadura
Actinomadura, cellular organisms, Bacteria, Terrabacteria group, Actinobacteria, Actinobacteria, Streptosporangiales, Thermomonosporaceae,
Thanks Genomax. Awesome.