- dsseq.setDescription(description);
- // move features and database references onto dataset sequence
- dsseq.sequenceFeatureStore = sequenceFeatureStore;
- sequenceFeatureStore = null;
- dsseq.dbrefs = dbrefs;
- dbrefs = null;
- // TODO: search and replace any references to this sequence with
- // references to the dataset sequence in Mappings on dbref
- dsseq.pdbIds = pdbIds;
- pdbIds = null;
- datasetSequence.updatePDBIds();
- if (annotation != null)
+ /**
+ * used by createDatasetSequence - transfers dataset-only properties to dsseq
+ * from sequence2
+ *
+ * @param dsseq
+ * - newly created dataset sequenceI for sequence
+ * @param sequence2
+ * - sequence object that needs a dataset
+ */
+ protected void updateDatasetFrom(Sequence dsseq, Sequence sequence2)
+ {
+ dsseq.setDescription(description);
+ // move features and database references onto dataset sequence
+ dsseq.sequenceFeatureStore = sequenceFeatureStore;
+ sequenceFeatureStore = null;
+ dsseq.dbrefs = dbrefs;
+ dbrefs = null;
+ // TODO: search and replace any references to this sequence with
+ // references to the dataset sequence in Mappings on dbref
+ dsseq.pdbIds = pdbIds;
+ pdbIds = null;
+ datasetSequence.updatePDBIds();
+ if (annotation != null)
+ {
+ // annotation is cloned rather than moved, to preserve what's currently
+ // on the alignment
+ for (AlignmentAnnotation aa : annotation)