From: gmungoc Date: Mon, 21 Nov 2016 11:02:04 +0000 (+0000) Subject: Merge branch 'develop' into bug/JAL-2323disulfideOverview X-Git-Tag: Release_2_10_1~10^2~1^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fbc92d8f171f75002890bfa0ea1f436f7125d3b5;p=jalview.git Merge branch 'develop' into bug/JAL-2323disulfideOverview Conflicts: src/jalview/io/SequenceAnnotationReport.java --- fbc92d8f171f75002890bfa0ea1f436f7125d3b5 diff --cc src/jalview/io/SequenceAnnotationReport.java index 702a107,850b1dc..6c8f40f --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@@ -72,14 -136,13 +136,12 @@@ public class SequenceAnnotationRepor * @param sb * @param rpos * @param minmax - * {{min, max}, {min, max}} positional and non-positional feature - * scores for this type * @param feature */ - void appendFeature(final StringBuffer sb, int rpos, + void appendFeature(final StringBuilder sb, int rpos, Map minmax, SequenceFeature feature) { - String tmpString; - if (feature.getType().equals("disulfide bond")) + if (feature.isContactFeature()) { if (feature.getBegin() == rpos || feature.getEnd() == rpos) { @@@ -116,9 -178,9 +178,9 @@@ if (feature.getDescription() != null && !feature.description.equals(feature.getType())) { - tmpString = feature.getDescription(); + String tmpString = feature.getDescription(); String tmp2up = tmpString.toUpperCase(); - final int startTag = tmp2up.indexOf(""); + int startTag = tmp2up.indexOf(""); if (startTag > -1) { tmpString = tmpString.substring(startTag + 6); @@@ -157,18 -220,14 +220,14 @@@ } } } - - /* - * score should be shown if there is one, and min != max - * for this feature type (e.g. not all 0) - */ + // check score should be shown if (!Float.isNaN(feature.getScore())) { - float[][] rng = (minmax == null) ? null : ((float[][]) minmax - .get(feature.getType())); + float[][] rng = (minmax == null) ? null : minmax.get(feature + .getType()); if (rng != null && rng[0] != null && rng[0][0] != rng[0][1]) { - sb.append(" Score=" + feature.getScore()); + sb.append(" Score=").append(String.valueOf(feature.getScore())); } } String status = (String) feature.getValue("status");