From: Jim Procter Date: Fri, 1 Jun 2018 13:47:35 +0000 (+0100) Subject: JAL-1950 JAL-2937 allow copy of sequences from group without annotations X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b56ffac9f141b738ffcd5112ae305d21a1ade024;p=jalview.git JAL-1950 JAL-2937 allow copy of sequences from group without annotations --- diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index b558f40..cd2b137 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -262,7 +262,8 @@ public class SequenceGroup implements AnnotatedCollectionI return showSequenceLogo; } - public SequenceI[] getSelectionAsNewSequences(AlignmentI align) + public SequenceI[] getSelectionAsNewSequences(AlignmentI align, + boolean copyAnnotation) { int iSize = sequences.size(); SequenceI[] seqs = new SequenceI[iSize]; @@ -276,14 +277,8 @@ public class SequenceGroup implements AnnotatedCollectionI if (seqs[ipos] != null) { seqs[ipos].setDescription(seq.getDescription()); - seqs[ipos].setDBRefs(seq.getDBRefs()); - seqs[ipos].setSequenceFeatures(seq.getSequenceFeatures()); - if (seq.getDatasetSequence() != null) - { - seqs[ipos].setDatasetSequence(seq.getDatasetSequence()); - } - if (seq.getAnnotation() != null) + if (seq.getAnnotation() != null && copyAnnotation) { AlignmentAnnotation[] alann = align.getAlignmentAnnotation(); // Only copy annotation that is either a score or referenced by the diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 18c2aed..abca110 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -1759,7 +1759,8 @@ public abstract class AlignmentViewport } else { - sequences = selectionGroup.getSelectionAsNewSequences(alignment); + sequences = selectionGroup.getSelectionAsNewSequences(alignment, + true); } return sequences;