This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to batch download SARS-CoV-2 sequences data from NCBI?

Hi, I was trying to download SARS-CoV-2 sequences data from NCBI following this link: https://www.ncbi.nlm.nih.gov/labs/virus/vssi/#/virus?SeqType_s=Nucleotide&VirusLineage_ss=SARS-CoV-2,%20taxid:2697049 When I click the empty box, I can only get like 200 sequences, each time. So I was wondering, is there a way to batch download all the genome sequences data with a click? Many thanks. I thought I did this earlier, but I do not quite recall.

sequence sequencing

Many thanks for your kind reply. Could you be a bit more specific then? Many thanks.

I clicked on the link you posted, clicked on the tab for Refseq Genome, clicked on the assembly:

https://www.ncbi.nlm.nih.gov/assembly/GCF_009858895.2

Then clicked on FTP directory for GenBank assembly

You can get the fasta sequence by clicking on

https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009/858/895/GCA_009858895.3_ASM985889v3/GCA_009858895.3_ASM985889v3_genomic.fna.gz

And gene informations (gff format):

https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/009/858/895/GCA_009858895.3_ASM985889v3/GCA_009858895.3_ASM985889v3_genomic.gff.gz

I have downloaded those sequences, as you mentioned in march 2021; currently I am trying to download them again though I have faced errors and the download has failed any time I tried. I checked the NCBI command line, ENTREZ and viral datasets too, Do you have any other solution or Do you know any other available resource for SARS CoV 2 nucleotide and amino acid sequences?

I am downloading it now using datasets download genome taxon sars-cov-2 --filename virus.zip without any issues. There are close to 340,000 genomes for SARS as of today.

Edit: The final file was 8.8 G.

2 answers

You can use NCBI Datasets for this. A dedicated page for Coronavirus Datasets is available. If you would prefer, a command line tool is also available. For example, you can use the command line tool to download SARS-Cov2 data as shown below:

datasets download virus genome taxon sars-cov-2 --complete-only --filename virus.zip

It looks like NCBI has 12 genomes of the original SARS virus (SARS total minus SARS-CoV-2). Can those be separately categorized in a link on the genome page?

Update: If I change the setting to All hosts from human it now shows 30246 SARS genomes but no SARS-CoV-2. Something does not seem right.

I click the empty box, I can only get like 200 sequences, each time.

Try this. Do not click any boxes. Click on Download button at top. In step 2 Download All Records should be automatically selected. This downloads ALL sequences. As of today that number stands at 43676 genomes (~1.2 GB file).

Log in to answer this question.