From 0b6b6af8bfba4edda36fef12a26c7526f4ee9555 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 27 Nov 2014 15:59:39 +0000 Subject: [PATCH] JAL-674 add sequence associated annotation rows to flanking alignment --- src/jalview/analysis/AlignmentUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; } -- 1.7.10.2