This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to download all bacterial complete genome from RefSeq?

hi

i want to download all Bactria complete genome from Refseq in fasta format? I googled and find below link:

C: Download All The Bacterial Genomes From Ncbi

but this way cause to download *cds_from_genomic_fna.gz and *rna_from_genomic_fna.gz too. i want only *genomic_fna.gz for my work. how can i do it?

sequence genome bactria

2 answers

You can replace directive #4 with this small script to get the links for the genomic.fna.gz only downloads. Save the contents in down.pl. And then do perl down.pl assembly_summary_complete_genomes.txt > wget_links.

use strict;
use warnings;

my $datafile1 = $ARGV[0];

open (IN, $datafile1) or die "can't open the datafile: $datafile1\n";

while (my $line = <IN>) {
        chomp($line);
        my @things = split(/\//, $line);
        print "wget -P GbBac ".$line."/".$things[9]."_genomic.fna.gz"."\n";
}

close (IN);

thank you genomax, it worked for me very well

You can use: https://github.com/kblin/ncbi-genome-download

Log in to answer this question.