X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignmentUtils.java;h=209020711cfd36ccbc159bd5c9bce0d11283d466;hb=d8084ce0043bb2454cfc48fe9c87f9aef12c0cf8;hp=42a1201e8bb0754ce382c92724d76edb3c78d62a;hpb=2facc9ee2fdb025b5cc79b005e7eb5bd915cd9ba;p=jalview.git diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 42a1201..2090207 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -1529,6 +1529,8 @@ public class AlignmentUtils public static int transferFeatures(SequenceI fromSeq, SequenceI toSeq, MapList mapping, String select, String... omitting) { + Map featureCounts = new HashMap(); + SequenceI copyTo = toSeq; while (copyTo.getDatasetSequence() != null) { @@ -1601,6 +1603,11 @@ public class AlignmentUtils copy.setBegin(Math.min(mappedTo[0], mappedTo[1])); copy.setEnd(Math.max(mappedTo[0], mappedTo[1])); copyTo.addSequenceFeature(copy); + int featureNumber = featureCounts.containsKey(type) ? featureCounts + .get(type) : -1; + featureNumber++; + featureCounts.put(type, featureNumber); + copy.setFeatureNumber(featureNumber); count++; } }