This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get reference genome sequence given species name

Hi I have a list of bacterial species and would like to programmatically download all of their reference genomes. The list includes only the names of the species. eg:

Actinomyces_viscosus
Corynebacterium_matruchotii
 :
 :
etc etc

Is there an easy way to do this?

Thanks!

genome reference sequences

2 answers

If you are using conda

conda install -c bioconda ncbi-genome-download

or simply python

pip install ncbi-genome-download

You can use following command in a bash script to download the genome

list=["Actinomyces_viscosus", "Corynebacterium_matruchotii"]
for i in list; do
ncbi-genome-download --refseq-category  --genus $i bacteria;
done

Use ncbi-genome-download tool from Kai Blin.

ncbi-genome-download --refseq-category  --genus "Actinomyces viscosus" bacteria

Replace genus names from your list in a loop.

Log in to answer this question.