This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Get gene sequence for oragnism using python

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

can you explain more if you can ?

> >>> 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

0 answers

No answers yet.

Log in to answer this question.