* or not conserved (-1)
* Using TreeMap means properties are displayed in alphabetical order
*/
- SortedMap<String, Integer> resultHash = new TreeMap<String, Integer>();
+ SortedMap<String, Integer> resultHash = new TreeMap<>();
SymbolCounts symbolCounts = values.getSymbolCounts();
char[] symbols = symbolCounts.symbols;
int[] counts = symbolCounts.values;
*/
private void percentIdentity(ScoreMatrix sm)
{
- seqNums = new Vector<int[]>();
+ seqNums = new Vector<>();
int i = 0, iSize = sequences.length;
// Do we need to calculate this again?
for (i = 0; i < iSize; i++)
protected void findQuality(int startCol, int endCol,
ScoreMatrix scoreMatrix)
{
- quality = new Vector<Double>();
+ quality = new Vector<>();
double max = -Double.MAX_VALUE;
float[][] scores = scoreMatrix.getMatrix();
/**
* 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];
}