From: Jim Procter Date: Thu, 27 Nov 2014 15:59:39 +0000 (+0000) Subject: JAL-674 add sequence associated annotation rows to flanking alignment X-Git-Tag: Jalview_2_9~137^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0b6b6af8bfba4edda36fef12a26c7526f4ee9555;p=jalview.git JAL-674 add sequence associated annotation rows to flanking alignment --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 929a855..6385fa7 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -20,6 +20,7 @@ */ package jalview.analysis; +import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; @@ -121,6 +122,16 @@ public class AlignmentUtils } AlignmentI newAl = new jalview.datamodel.Alignment( sq.toArray(new SequenceI[0])); + for (SequenceI s : sq) + { + if (s.getAnnotation() != null) + { + for (AlignmentAnnotation aa : s.getAnnotation()) + { + newAl.addAnnotation(aa); + } + } + } newAl.setDataset(core.getDataset()); return newAl; }