From b56ffac9f141b738ffcd5112ae305d21a1ade024 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 1 Jun 2018 14:47:35 +0100 Subject: [PATCH] JAL-1950 JAL-2937 allow copy of sequences from group without annotations --- src/jalview/datamodel/SequenceGroup.java | 11 +++-------- src/jalview/viewmodel/AlignmentViewport.java | 3 ++- 2 files changed, 5 insertions(+), 9 deletions(-) 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; -- 1.7.10.2