[Biopython-dev] Notification: incoming/39

biopython-bugs at bioperl.org biopython-bugs at bioperl.org
Mon Aug 13 21:57:24 EDT 2001


JitterBug notification

new message incoming/39

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

====> 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