[Biopython-dev] [P4b] Always return default date: "01-JAN-1980"
Peter
biopython at maubp.freeserve.co.uk
Tue Oct 5 09:00:00 UTC 2010
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
More information about the Biopython-dev
mailing list