git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bug/JAL-3760_protsTreatedAsNucleotides' into releases/Release_2_11_1_Branch
[jalview.git]
/
src
/
jalview
/
analysis
/
Conservation.java
diff --git
a/src/jalview/analysis/Conservation.java
b/src/jalview/analysis/Conservation.java
index
131b39c
..
c3de19b
100755
(executable)
--- a/
src/jalview/analysis/Conservation.java
+++ b/
src/jalview/analysis/Conservation.java
@@
-273,7
+273,7
@@
public class Conservation
* or not conserved (-1)
* Using TreeMap means properties are displayed in alphabetical order
*/
* 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;
SymbolCounts symbolCounts = values.getSymbolCounts();
char[] symbols = symbolCounts.symbols;
int[] counts = symbolCounts.values;
@@
-567,7
+567,7
@@
public class Conservation
*/
private void percentIdentity(ScoreMatrix sm)
{
*/
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++)
int i = 0, iSize = sequences.length;
// Do we need to calculate this again?
for (i = 0; i < iSize; i++)
@@
-622,7
+622,7
@@
public class Conservation
protected void findQuality(int startCol, int endCol,
ScoreMatrix scoreMatrix)
{
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();
double max = -Double.MAX_VALUE;
float[][] scores = scoreMatrix.getMatrix();
@@
-695,7
+695,7
@@
public class Conservation
max = Math.max(max, bigtot);
max = Math.max(max, bigtot);
- quality.addElement(new Double(bigtot));
+ quality.addElement(Double.valueOf(bigtot));
}
double newmax = -Double.MAX_VALUE;
}
double newmax = -Double.MAX_VALUE;
@@
-707,7
+707,7
@@
public class Conservation
tmp = ((max - tmp) * (size - cons2GapCounts[j])) / size;
// System.out.println(tmp+ " " + j);
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)
{
if (tmp > newmax)
{
@@
-721,8
+721,8
@@
public class Conservation
/**
* Complete the given consensus and quuality annotation rows. Note: currently
/**
* 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
*
* @param conservation
* conservation annotation row
@@
-754,7
+754,7
@@
public class Conservation
float qmax = 0f;
if (conservation != null && conservation.annotations != null
float qmax = 0f;
if (conservation != null && conservation.annotations != null
- && conservation.annotations.length < alWidth)
+ && conservation.annotations.length != alWidth)
{
conservation.annotations = new Annotation[alWidth];
}
{
conservation.annotations = new Annotation[alWidth];
}
@@
-763,7
+763,7
@@
public class Conservation
{
quality2.graphMax = (float) qualityMaximum;
if (quality2.annotations != null
{
quality2.graphMax = (float) qualityMaximum;
if (quality2.annotations != null
- && quality2.annotations.length < alWidth)
+ && quality2.annotations.length != alWidth)
{
quality2.annotations = new Annotation[alWidth];
}
{
quality2.annotations = new Annotation[alWidth];
}