[Biopython-dev] [P4b] Always return default date: "01-JAN-1980"

Peter biopython at maubp.freeserve.co.uk
Tue Oct 5 09:18:16 UTC 2010


On Tue, Oct 5, 2010 at 10:00 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Tue, Oct 5, 2010 at 8:45 AM, Yong <Yong at neau.edu.cn> wrote:
>> Hello everyone,
>>
>> I am testing a database and its web interface
>> (http://pbl.neau.edu.cn:8080/) established with Plone4Bio, BioPython and
>> BioSQL, when query database from webpage it always return the default date
>> for sequence: "01-JAN-1980".
>>
>> I found that the error happened here in file Bio::SeqIO::InsdcIO.py (lines:
>> 366-371) of BioPython:
>>
>>     def _get_date(self, record) :
>>         default = "01-JAN-1980"
>>         try :
>>             date = record.annotations["date"]
>>         except KeyError :
>>             return default
>>
>> It looks like that it does not have "date" key, is it a bug of BioPython or
>> Plone4Bio? anybody know how to solve it?
>
> Hi
>
> As I recall, reading/writing a GenBank file with Bio.SeqIO (note single
> dot in Python, two colons is Perl - grin), the date is preserved. I think
> the problem is in Biopython loading/retrieving a GenBank file in BioSQL,
> and I thought there was a bug open on this...
>
> I can probably suggest a hack in the Plone4Bio code, but it would
> be better to tweak Biopython.
>
> Peter

Hi Yong,

I found the open bug Biopython report I was thinking of, and committed a fix:
http://bugzilla.open-bio.org/show_bug.cgi?id=2681#c9

Are you able to update your copy of Biopython to the latest source code
to test this fix?

Thanks,

Peter




More information about the Biopython-dev mailing list