From 18df4d20bc29043b637efde27a91a17c8fc999ac Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 21 Jan 2016 16:25:55 +0000 Subject: [PATCH] JAL-1705 transfer features to the dataset sequence if there is one --- src/jalview/analysis/AlignmentUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index d8cb9a2..194e6af 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -1424,6 +1424,12 @@ public class AlignmentUtils protected static void transferFeatures(SequenceI fromSeq, SequenceI toSeq, MapList mapping, String... omitting) { + SequenceI copyTo = toSeq; + while (copyTo.getDatasetSequence() != null) + { + copyTo = copyTo.getDatasetSequence(); + } + SequenceFeature[] sfs = fromSeq.getSequenceFeatures(); if (sfs != null) { @@ -1453,7 +1459,7 @@ public class AlignmentUtils SequenceFeature copy = new SequenceFeature(sf); copy.setBegin(Math.min(mappedTo[0], mappedTo[1])); copy.setEnd(Math.max(mappedTo[0], mappedTo[1])); - toSeq.addSequenceFeature(copy); + copyTo.addSequenceFeature(copy); } } } -- 1.7.10.2