[BioPython] where is SeqIO.parse()?

Michiel De Hoon mdehoon at c2b2.columbia.edu
Wed Oct 10 12:24:33 UTC 2007


> I'm using biopython 1.42 installed from Ubuntu repository and python 2.5.1.

Use Biopython 1.43.

--Michiel.

Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1150 St Nicholas Avenue
New York, NY 10032



-----Original Message-----
From: biopython-bounces at lists.open-bio.org on behalf of Prashantha Hebbar
Kiradi
Sent: Wed 10/10/2007 8:17 AM
To: biopython at biopython.org
Subject: [BioPython] where is SeqIO.parse()?
 
Hi everybody,

While trying the example of 'Parsing sequence file formats' from section
2.4 of Biopython tutorial:
-------------------------------------------------
from Bio import SeqIO
handle = open("ls_orchid.fasta")
for seq_record in SeqIO.parse(handle, "fasta") :
    print seq_record.id
    print seq_record.seq
    print len(seq_record.seq)
handle.close()
-------------------------------------------------


I get this error:
-------------------------------------------------
Traceback (most recent call last):
  File "fastEx.py", line 5, in <module>
    for seq_record in SeqIO.parse(handle, "fasta") :
AttributeError: 'module' object has no attribute 'parse'
-------------------------------------------------

Importing SeqIO doesn't raise any error and the ls_orchid.fasta file I'm
using is opening correctly.

API documentation reports that the 'parse' function is there. What am I
doing wrong?

I'm using biopython 1.42 installed from Ubuntu repository and python 2.5.1.

Thanks in advance,

Prashantha Hebbar
Institute of Bioinformatics
ITPL, Bangalore,
INDIA

_______________________________________________
BioPython mailing list  -  BioPython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython





More information about the Biopython mailing list