Download reference mitochondria sequence
2
1
Entering edit mode
6.3 years ago
cnr.lwlss ▴ 10

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 • 2.3k views
ADD COMMENT
1
Entering edit mode
ADD COMMENT
2
Entering edit mode
6.3 years ago
GenoMax 142k

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1964 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