Permalink
Browse files

Temp fix for writing multiple EMBL keyword lines.

This just writes one KW line per keyword in order to avoid
ever splitting a keyword over multiple lines (not allowed
according to the EMBL specification, and would not be
handled with our current parser anyway).
  • Loading branch information...
1 parent 07639dd commit 978a3ae09d8877951c1bbf4623a42d19d49227c1 @peterjc peterjc committed Mar 12, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 Bio/SeqIO/InsdcIO.py
View
@@ -997,8 +997,11 @@ def _get_data_division(self, record):
def _write_keywords(self, record):
#Put the keywords right after DE line.
- self._write_multi_line("KW",
- "%s." % "; ".join(record.annotations["keywords"]))
+ #Each 'keyword' can have multiple words and spaces, but we
+ #must not split any 'keyword' between lines.
+ #TODO - Combine short keywords onto one line
+ for keyword in record.annotations["keywords"]:
+ self._write_single_line("KW", keyword)
self.handle.write("XX\n")
def _write_references(self, record):

0 comments on commit 978a3ae

Please sign in to comment.