[Biopython] error in parseing Gene bank

Peter Cock p.j.a.cock at googlemail.com
Wed Oct 3 11:00:10 EDT 2012


On Wed, Oct 3, 2012 at 3:56 PM, francesco chiani
<francesco.chiani at gmail.com> wrote:
> Xfect after replace "dna" with "DNA" in the gbk file , the script works!
> Fantastic.
>
> The gene bank file is from IKMC portal
> http://www.i-dcc.org/martsearch/
> I have no idea about the software used to made it sorry.. I just use them..
>

Could you email them, and include the link to the GenBank standard:
http://www.ncbi.nlm.nih.gov/Sitemap/samplerecord#MoleculeTypeB

> does my script have to replace "dna"  every gene bank or there is a
> quicker solution I cant see?

Try using the optional argument to SeqIO.parse, e.g.

from Bio import SeqIO
from Bio.Alphabet import generic_dna
for seq_record in SeqIO.parse(handle, "genbank", alphabet=generic_dna):
   print seq_record.id

Regards,

Peter

P.S. Please CC the mailing list in your replies.


More information about the Biopython mailing list