*/
package jalview.analysis;
+import java.util.Locale;
+
import jalview.analysis.scoremodels.ScoreMatrix;
import jalview.analysis.scoremodels.ScoreModels;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceI;
import jalview.schemes.ResidueProperties;
import jalview.util.Comparison;
+import jalview.util.Format;
import java.awt.Color;
import java.util.List;
private static final int GAP_INDEX = -1;
+ private static final Format FORMAT_3DP = new Format("%2.5f");
+
SequenceI[] sequences;
int start;
}
else
{
- System.out.println("SEQUENCE HAS BEEN DELETED!!!");
+ jalview.bin.Console.outPrintln("SEQUENCE HAS BEEN DELETED!!!");
}
}
else
{
// JBPNote INFO level debug
- System.err.println(
+ jalview.bin.Console.errPrintln(
"ERROR: calcSeqNum called with out of range sequence index for Alignment\n");
}
}
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 - cons2[j][23])) / size;
tmp = ((max - tmp) * (size - cons2GapCounts[j])) / size;
- // System.out.println(tmp+ " " + j);
- quality.setElementAt(new Double(tmp), j);
+ // jalview.bin.Console.outPrintln(tmp+ " " + j);
+ quality.setElementAt(Double.valueOf(tmp), j);
if (tmp > newmax)
{
value = quality.elementAt(i).floatValue();
float vprop = value - qmin;
vprop /= qmax;
- quality2.annotations[i] = new Annotation(" ", String.valueOf(value),
- ' ', value, new Color(minR + (maxR * vprop),
+ String description = FORMAT_3DP.form(value);
+ quality2.annotations[i] = new Annotation(" ", description, ' ',
+ value, new Color(minR + (maxR * vprop),
minG + (maxG * vprop), minB + (maxB * vprop)));
}
}