[Biopython-dev] Notification: incoming/39
biopython-bugs at bioperl.org
biopython-bugs at bioperl.org
Tue Aug 14 02:10:10 EDT 2001
JitterBug notification
jchang moved PR#39 from incoming to fixed-bugs
Message summary for PR#39
From: cirano at chollian.net
Subject: Parsing Problem of GenBank format
Date: Mon, 13 Aug 2001 21:57:23 -0400
0 replies 0 followups
Notes: Thanks for the bug report. Andrew Dalke noted this earlier and submitted the
follow fix for UndoHandle.read:
def read(self, size=-1):
if size == -1:
saved = string.join(self._saved, "")
self._saved[:] = []
else:
It's checked into the CVS and will go out the next release. Actually, enough
people are getting tripped out on it that that should happen sooner than later.
====> ORIGINAL MESSAGE FOLLOWS <====
>From cirano at chollian.net Mon Aug 13 21:57:24 2001
Received: from localhost (localhost [127.0.0.1])
by pw600a.bioperl.org (8.11.2/8.11.2) with ESMTP id f7E1vIq28563
for <biopython-bugs at pw600a.bioperl.org>; Mon, 13 Aug 2001 21:57:23 -0400
Date: Mon, 13 Aug 2001 21:57:23 -0400
Message-Id: <200108140157.f7E1vIq28563 at pw600a.bioperl.org>
From: cirano at chollian.net
To: biopython-bugs at bioperl.org
Subject: Parsing Problem of GenBank format
Full_Name: Chang Gyeom, Kim
Module: Bio/File.py/saveline module
Version: Biopython1.00a2
OS: Redhat7.1
Submission from: (NULL) (203.248.117.3)
My Source code:
from Bio import GenBank
search_term = "Lupine leghemoglobin"
gi_list = GenBank.search_for(search_term)
ncbi_dict = GenBank.NCBIDictionary()
gb_seqrecord = ncbi_dict[ gi_list[0] ]
print gb_seqrecord
When I run this code, I lost first 5 lines of GenBank Record.
I think this problem is caused by the function of "saveline"
located in Bio/File.py module
So I revised the code like this:
def saveline(self, line):
if line:
handle_contents = self.read()
self._saved = line + handle_contents
self._handle = StringIO.StringIO(self._saved)
Although I fixed my problem, I'm not sure this is the right way.
More information about the Biopython-dev
mailing list