Permalink
Browse files

Write keywords to EMBL

  • Loading branch information...
1 parent c36293f commit 41470eac55a665d1cb1c7e73ebfd3c1df98af5ad @xbello xbello committed with peterjc Mar 12, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 Bio/SeqIO/InsdcIO.py
View
@@ -995,6 +995,12 @@ def _get_data_division(self, record):
assert len(division) == 3
return division
+ 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")
+
def _write_references(self, record):
#The order should be RN, RC, RP, RX, RG, RA, RT, RL
number = 0
@@ -1068,6 +1074,9 @@ def write_record(self, record):
self._write_multi_line("DE", descr)
handle.write("XX\n")
+ if "keywords" in record.annotations:
+ self._write_keywords(record)
+
#Should this be "source" or "organism"?
self._write_multi_line(
"OS", self._get_annotation_str(record, "organism"))

0 comments on commit 41470ea

Please sign in to comment.