Get gene sequence for oragnism using python
0
0
Entering edit mode
3.3 years ago
Ahmed • 0

Hi,

If I have the Genus & Species how can I use them in python code to get a gene sequence. For example:

SpecCode: 64588
Genus: Aapticheilichthys
Species: websteri

How can I use these date to get "Cox1" sequence in python ?

Thanks in advance

Biopython python • 1.3k views
ADD COMMENT
0
Entering edit mode

You can use this as a base to start!

EFetch: Downloading full records from Entrez

ADD REPLY
0
Entering edit mode

can you explain more if you can ?

ADD REPLY
0
Entering edit mode
> >>> from Bio import Entrez
> >>> Entrez.email = "your email here - best guet a account in Entrez/NCBI "  # Always tell NCBI who you are
> >>> handle = Entrez.efetch(db="nucleotide", id="ID for the gene you need", rettype="gb", retmode="text")
> >>> print(handle.read())

EXample of using biopython api to download fasta/genbank files from NCBI You better get one ncbi account and then use the email you login in. Need to choose the database "nucleotides" if you need dna/sequence data. Need a ID for the gene you need data. Need to choose the type of file you need (ig. genbank) etc..

Read the docs here: Entrez biopython

ADD REPLY

Login before adding your answer.

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