[Biopython] error in parseing Gene bank

Nick Semenkovich semenko at alum.mit.edu
Wed Oct 3 14:28:20 UTC 2012


I've had this problem too, and have considered patching it:

I * think * (without seeing your file), that your seqtype must be
in capital letters (e.g. DNA).

Does that work?

- Nick

On Wed, Oct 3, 2012 at 9:18 AM, francesco chiani <francesco.chiani at gmail.com
> wrote:

> Hi Everyone,
> Someone have an idea of why in biopython  for python 2.7 give me this error
> while parsing a gene bank file?
>
>
> Traceback (most recent call last):
> in <module>
>     for seq_record in SeqIO.parse(handle, "genbank"):
>   File "C:\Python27\lib\site-packages\Bio\SeqIO\__init__.py", line 537, in
> parse
>     for r in i:
>   File "C:\Python27\lib\site-packages\Bio\GenBank\Scanner.py", line 445, in
> parse_records
>     record = self.parse(handle, do_features)
>   File "C:\Python27\lib\site-packages\Bio\GenBank\Scanner.py", line 428,
> in parse
>     if self.feed(handle, consumer, do_features):
>   File "C:\Python27\lib\site-packages\Bio\GenBank\Scanner.py", line 410,
> in feed
>     consumer.record_end("//")
>   File "C:\Python27\lib\site-packages\Bio\GenBank\__init__.py", line 1184,
> in
> record_end
>     % self._seq_type)
> ValueError: Could not determine alphabet for seq_type dna
>
> p.s.-:This doesn't happen in biopython for python 2.6 version I suppose,
> 'cause
> with the same gene bank file in this version my script works...
>
>
> thanks x your help,
> F.
>
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>



-- 
Nick Semenkovich
Laboratory of Dr. Jeffrey I. Gordon
Medical Scientist Training Program
School of Medicine
Washington University in St. Louis
314.362.3963 (Lab)
314.374.4434 (Cell)
http://web.mit.edu/semenko/



More information about the Biopython mailing list