Question: Download reference mitochondria sequence
0
gravatar for cnr.lwlss
18 months ago by
cnr.lwlss0
United Kingdom
cnr.lwlss0 wrote:

Is there a way to download individual mitochondrial sequences from NCBI without having to scrape from their webpages or to download thousands of other sequences alongside. Is there some programmatic way to access these fasta data, for example:

https://www.ncbi.nlm.nih.gov/nuccore/NC_012920.1?report=fasta

sequence • 724 views
ADD COMMENTlink modified 18 months ago • written 18 months ago by cnr.lwlss0
1
gravatar for cnr.lwlss
18 months ago by
cnr.lwlss0
United Kingdom
cnr.lwlss0 wrote:

Following this post:

curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=NC_012920.1&rettype=fasta&retmode=text" >mtDNA.fa
ADD COMMENTlink modified 18 months ago • written 18 months ago by cnr.lwlss0
2
gravatar for genomax
18 months ago by
genomax70k
United States
genomax70k wrote:

You can use "Send to" drop down on that page to send the data to a file. No scraping needed.

If you have many of these to get then using NCBI eUtils is the best option. For example for the link you posted you can do this

efetch -db nuccore -id NC_012920.1 -format fasta > NC_012920.fa
ADD COMMENTlink written 18 months ago by genomax70k

Thanks, but installing eutils as below failed with errors: "Is libxml2 installed?" (yes, it is...)

pip3 install eutils

Glad you mentioned eutils though, as it led me to find this post, which showed me how to build the URL in the answer below.

ADD REPLYlink written 18 months ago by cnr.lwlss0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1326 users visited in the last hour