*/
package jalview.analysis;
+import java.util.Locale;
+
import jalview.analysis.scoremodels.ScoreMatrix;
import jalview.analysis.scoremodels.ScoreModels;
import jalview.datamodel.AlignmentAnnotation;
protected static void recordConservation(Map<String, Integer> resultMap,
String res)
{
- res = res.toUpperCase();
+ res = res.toUpperCase(Locale.ROOT);
for (Entry<String, Map<String, Integer>> property : ResidueProperties.propHash
.entrySet())
{
max = Math.max(max, bigtot);
- quality.addElement(new Double(bigtot));
+ quality.addElement(Double.valueOf(bigtot));
}
double newmax = -Double.MAX_VALUE;
tmp = ((max - tmp) * (size - cons2GapCounts[j])) / size;
// System.out.println(tmp+ " " + j);
- quality.setElementAt(new Double(tmp), j);
+ quality.setElementAt(Double.valueOf(tmp), j);
if (tmp > newmax)
{
/**
* Complete the given consensus and quuality annotation rows. Note: currently
- * this method will enlarge the given annotation row if it is too small,
- * otherwise will leave its length unchanged.
+ * this method will reallocate the given annotation row if it is different to
+ * the calculated width, otherwise will leave its length unchanged.
*
* @param conservation
* conservation annotation row
float qmax = 0f;
if (conservation != null && conservation.annotations != null
- && conservation.annotations.length < alWidth)
+ && conservation.annotations.length != alWidth)
{
conservation.annotations = new Annotation[alWidth];
}
{
quality2.graphMax = (float) qualityMaximum;
if (quality2.annotations != null
- && quality2.annotations.length < alWidth)
+ && quality2.annotations.length != alWidth)
{
quality2.annotations = new Annotation[alWidth];
}
float vprop = value - qmin;
vprop /= qmax;
String description = FORMAT_3DP.form(value);
- quality2.annotations[i] = new Annotation(" ", description,
- ' ', value, new Color(minR + (maxR * vprop),
+ quality2.annotations[i] = new Annotation(" ", description, ' ',
+ value, new Color(minR + (maxR * vprop),
minG + (maxG * vprop), minB + (maxB * vprop)));
}
}