[Biopython-dev] Consumer of "KW" in embl format

Peter Cock p.j.a.cock at googlemail.com
Tue Mar 12 14:40:16 UTC 2013

On Tue, Mar 12, 2013 at 11:35 AM, Xabier Bello <xbello at gmail.com> wrote:
> Lets try it:
> Line 997:
> def _write_keywords(self, record):
>     #Put the keywords right after DE line.
>     self._write_multi_line("KW", "%s." % "; ".join(
>         record.annotations["keywords"]))
>     self.handle.write("XX\n")

Looks good - although there is a potential problem here with long keywords
where this does not avoid splitting a single keyword over multiple KW lines
(as specified in the EMBL specification). This is a corner case though...

> Line 1070:
> if "keywords" in record.annotations:
>     self._write_keywords(record)
> Note to self: learn to make diff patches and forks on github.

Good plan :)

Meanwhile, I committed that change:

I added a little more testing, from which I think we may need to
do some work with some of the other EMBL fields like dbxrefs:



More information about the Biopython-dev mailing list