X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=bbf1b4515595fdc5837e1384a47cb046259237e1;hb=c6018dc0dc12720e13b75850a5303279ac7094b7;hp=df268f8dc711f8984d55c966ce8a4368ff759cca;hpb=5a631296dd1dcc1df7b50487a647c27333696c74;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index df268f8..bbf1b45 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -608,19 +608,19 @@ public class SequenceFeature implements FeatureLocationI sb.append(String.format(ROW_DATA, "Location", name, begin == end ? begin : begin + (isContactFeature() ? ":" : "-") + end)); + + String consequence = ""; if (mf != null) { - int[] beginRange = mf.getMappedPositions(begin, begin); - int[] endRange = mf.getMappedPositions(end, end); - int from = beginRange[0]; - int to = endRange[endRange.length - 1]; + int[] localRange = mf.getMappedPositions(begin, end); + int from = localRange[0]; + int to = localRange[localRange.length - 1]; String s = mf.isFromCds() ? "Peptide Location" : "Coding location"; sb.append(String.format(ROW_DATA, s, seqName, from == to ? from : from + (isContactFeature() ? ":" : "-") + to)); if (mf.isFromCds()) { - sb.append(String.format(ROW_DATA, "Consequence", - mf.findProteinVariants(this), "")); + consequence = mf.findProteinVariants(this); } } sb.append(String.format(ROW_DATA, "Type", type, "")); @@ -635,6 +635,12 @@ public class SequenceFeature implements FeatureLocationI sb.append(String.format(ROW_DATA, "Group", featureGroup, "")); } + if (!consequence.isEmpty()) + { + sb.append(String.format(ROW_DATA, "Consequence", + "Translated by Jalview", consequence)); + } + if (otherDetails != null) { TreeMap ordered = new TreeMap<>(