Downloading nucleotide sequences using command line
1
1
Entering edit mode
5.0 years ago
oddjobs ▴ 10

I am trying to find some help for command-line download of NCBI datasets. I came across the following: https://www.ncbi.nlm.nih.gov/books/NBK179288/

I wish to download a certain number of nucleotide sequences for which I have the accession numbers. However, I cannot find the correct command to use for a list of such sequences in the above link.

What I am currently using is the following:

epost -db nucleotide -input <Accessions file>  | efetch -format fasta  > <OUTPUT FASTA file>

Is this the correct way to do this? Are there better ways to accomplish the same thing?

Thanks!

Entrez Direct • 3.4k views
ADD COMMENT
1
Entering edit mode
5.0 years ago
GenoMax 154k

Yes that is the correct way of doing this. Make sure your accessions are one per line in the Accession file. You should also sign up for NCBI_API_KEY if you are going to download a few hundred of them.

ADD COMMENT
0
Entering edit mode

Thanks. Will look into API keys, since I am thinking of scripting my requests.

ADD REPLY

Login before adding your answer.

Traffic: 3534 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6