...
Code Block | ||||
---|---|---|---|---|
| ||||
from Bio import Entrez, SeqIO
handle = Entrez.efetch(db='protein', id='187932364', rettype='gb')
record = SeqIO.read(handle, 'genbank')
handle.close()
|
...
Parsing Genbank Files
The record
that was parsed using SeqIO
above is a Python object. Its features
attribute is a list of BioPython SeqFeature
objects. Each feature contains a list of "qualifiers", which contain information such as the locus tag, gene (if available), db_xrefs, etc. To see the qualifiers for a CDS feature in the Genbank record, we can run this code:
...
Dealing with GenBank files in Biopython by Peter Cock
eFetch And Parsing Results With BioPython [PDF]
An Example Of Finding RefSeq Gene By Locus Tag
...