X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=a4c489572e885a216e8e9308af3c53392fffaee1;hp=27c1652943c77b81c4bee965bed0d052b04f2cff;hb=c6018dc0dc12720e13b75850a5303279ac7094b7;hpb=c17981672620e0b780a2338bd0c74e55cf9ddec2 diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 27c1652..a4c4895 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -210,12 +210,27 @@ public class SequenceAnnotationReport * if this is a virtual features, convert begin/end to the * coordinates of the sequence it is mapped to */ - int[] beginRange = null; - int[] endRange = null; + int[] beginRange = null; // feature start in local coordinates + int[] endRange = null; // feature end in local coordinates if (mf != null) { - beginRange = mf.getMappedPositions(begin, begin); - endRange = mf.getMappedPositions(end, end); + if (feature.isContactFeature()) + { + /* + * map start and end points individually + */ + beginRange = mf.getMappedPositions(begin, begin); + endRange = begin == end ? beginRange + : mf.getMappedPositions(end, end); + } + else + { + /* + * map the feature extent + */ + beginRange = mf.getMappedPositions(begin, end); + endRange = beginRange; + } if (beginRange == null || endRange == null) { // something went wrong