Merge branch 'develop' into bug/JAL-2323disulfideOverview
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 21 Nov 2016 11:02:04 +0000 (11:02 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 21 Nov 2016 11:02:04 +0000 (11:02 +0000)
Conflicts:
src/jalview/io/SequenceAnnotationReport.java

1  2 
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<String, float[][]> minmax, SequenceFeature feature)
    {
 -    String tmpString;
 -    if (feature.getType().equals("disulfide bond"))
 +    if (feature.isContactFeature())
      {
        if (feature.getBegin() == rpos || feature.getEnd() == rpos)
        {
          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("<HTML>");
+           int startTag = tmp2up.indexOf("<HTML>");
            if (startTag > -1)
            {
              tmpString = tmpString.substring(startTag + 6);
              }
            }
          }
-         /*
-          * 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");