Does anyone have a simple solution to downloading all the refseq genomes for a particular taxon?
Using ncbi-genome-download
its possible to specify the species or genus TaxIDs and download them, but apparently you can't go higher up the taxonomic ranks (even though enterobacteria has a TaxID of 543 for instance).
If anyone knows of a way to download all the Enterobacteria I'm all ears.
Alternatively, if there is a method of extracting the species TaxIDs from the Enterobacterial taxid in NCBI such that I can pass them all directly to ncbi-genome-download
that would work too.
Wow, thanks for this answer. I've just learned about this useful
ncbi.get_descendant_taxa()
funcion. Funny, I use the same variable nameofh
for an output file and I always read it as output file handle.That’s exactly the way I intend it! It’s quite possible I’ve picked up the habit from some of your answers!