[BioPython] where is SeqIO.parse()?
Prashantha Hebbar Kiradi
prashanth at ibioinformatics.org
Wed Oct 10 12:17:26 UTC 2007
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
More information about the Biopython
mailing list