diff --git a/BioSQL/BioSeq.py b/BioSQL/BioSeq.py index 3f112dc1740..b20cc2205c9 100644 --- a/BioSQL/BioSeq.py +++ b/BioSQL/BioSeq.py @@ -363,7 +363,8 @@ def _retrieve_qualifier_value(adaptor, primary_id): qualifiers = {} for name, value in qvs: if name == "keyword": name = "keywords" - elif name == "date_changed": name = "dates" + #See handling of "date" in Loader.py + elif name == "date_changed": name = "date" elif name == "secondary_accession": name = "accessions" qualifiers.setdefault(name, []).append(value) return qualifiers diff --git a/BioSQL/Loader.py b/BioSQL/Loader.py index ba3542204d7..d867c105855 100644 --- a/BioSQL/Loader.py +++ b/BioSQL/Loader.py @@ -653,7 +653,7 @@ def _load_annotations(self, record, bioentry_id): " VALUES (%s, %s, %s, %s)" tag_ontology_id = self._get_ontology_id('Annotation Tags') for key, value in record.annotations.iteritems(): - if key in ["references", "comment", "ncbi_taxid"]: + if key in ["references", "comment", "ncbi_taxid", "date"]: #Handled separately continue term_id = self._get_term_id(key, ontology_id=tag_ontology_id) diff --git a/NEWS b/NEWS index 936490b1d01..cd7047eccd7 100644 --- a/NEWS +++ b/NEWS @@ -19,10 +19,11 @@ Bio.SeqIO can now read and write IMGT files, a variant of the EMBL sequence text file format with longer feature indentation, and protein EMBL files (used in the EMBL patents database file epo_prt.dat). -(At least) 7 people have contributed to this release, include 3 new people: +(At least) 8 people have contributed to this release, include 3 new people: Bartek Wilczynski Bartosz Telenczuk (first contribution) +Cymon Cox Eric Talevich Michiel de Hoon Peter Cock diff --git a/Tests/seq_tests_common.py b/Tests/seq_tests_common.py index 4e433fdddaa..d9fd0843081 100644 --- a/Tests/seq_tests_common.py +++ b/Tests/seq_tests_common.py @@ -267,7 +267,7 @@ def compare_record(old, new): #'ncbi_taxon' and 'gi'. #TODO - address these, see Bug 2681? new_keys = set(new.annotations).difference(old.annotations) - new_keys = new_keys.difference(['cross_references', 'dates', + new_keys = new_keys.difference(['cross_references', 'date', 'data_file_division', 'ncbi_taxid', 'gi']) assert not new_keys, "Unexpected new annotation keys: %s" \ % ", ".join(new_keys) diff --git a/Tests/test_BioSQL.py b/Tests/test_BioSQL.py index 32cea79a02b..8c1b1ac7514 100644 --- a/Tests/test_BioSQL.py +++ b/Tests/test_BioSQL.py @@ -508,9 +508,6 @@ def loop(self, filename, format): for key in ["comment", "references", "db_source"]: if key in old.annotations and key not in new.annotations: del old.annotations[key] - #TODO - remove this hack one we write the date properly: - del old.annotations["date"] - del new.annotations["date"] self.assertTrue(compare_record(old, new)) #Done server.close()