[Biopython] Helpa Newbie Please.py
Willis, Jordan R
jordan.r.willis at Vanderbilt.Edu
Sun Jun 6 23:36:28 UTC 2010
Hi Gary,
Python will always look for the file in whichever directory you started python in. I would go to the command line and start python in the same directory in which you have ls_orchid.gbk.
On another note, I'm not sure when this changed but SeqIO.parse will only accept a file object contrary to the example. So try this.
from Bio import SeqIO
for seq_record in SeqIO.parse(open("ls_orchid.gbk"), "genbank"):
print seq_record.id
print repr(seq_record.seq)
print len(seq_record)
Jordan
On 6/6/10 6:24 PM, "Gary" <gnd9 at cox.net> wrote:
Subject: Helpa Newbie Please.py
Just started into this fantastic project & can't get past Cookbook 2.4.2 parsing example!
from Bio import SeqIO
for seq_record in SeqIO.parse("ls_orchid.gbk", "genbank"):
print seq_record.id
print repr(seq_record.seq)
print len(seq_record)
ALWAYS REPLYS:
Traceback (most recent call last):
File "(stdin)"' line1, in (module)
File "C:\Python26\lib\site-package\Bio\SeqIO\_init_.py"' line 483, in parse
IOError: [Error 2] No such file or directory: 'ls_orchid.gbk'
I do have the file in fact I put it in several locations.... genbank folder, SeqIO folder, Python2.6 folder....
Does anyone know which folder SeqIO is looking for the orchid file?
I assume thats my problem
Thanks in advance
Helpa Newbie Please.py
_______________________________________________
Biopython mailing list - Biopython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython
More information about the Biopython
mailing list