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
JAL-1473 refactor score matrices and tree score calculations to interface/api and...
[jalview.git]
/
src
/
jalview
/
schemes
/
ScoreMatrix.java
diff --git
a/src/jalview/schemes/ScoreMatrix.java
b/src/jalview/schemes/ScoreMatrix.java
index
e78b92c
..
ab603e1
100644
(file)
--- a/
src/jalview/schemes/ScoreMatrix.java
+++ b/
src/jalview/schemes/ScoreMatrix.java
@@
-18,9
+18,18
@@
*/
package jalview.schemes;
*/
package jalview.schemes;
-public class ScoreMatrix
+import jalview.analysis.scoremodels.PairwiseSeqScoreModel;
+import jalview.api.analysis.ScoreModelI;
+
+public class ScoreMatrix extends PairwiseSeqScoreModel implements ScoreModelI
{
String name;
{
String name;
+
+ @Override
+ public String getName()
+ {
+ return name;
+ }
/**
* reference to integer score matrix
/**
* reference to integer score matrix
@@
-31,23
+40,31
@@
public class ScoreMatrix
* 0 for Protein Score matrix. 1 for dna score matrix
*/
int type;
* 0 for Protein Score matrix. 1 for dna score matrix
*/
int type;
-
+ /**
+ *
+ * @param name Unique, human readable name for the matrix
+ * @param matrix Pairwise scores indexed according to appropriate symbol alphabet
+ * @param type 0 for Protein, 1 for NA
+ */
ScoreMatrix(String name, int[][] matrix, int type)
{
this.matrix = matrix;
this.type = type;
ScoreMatrix(String name, int[][] matrix, int type)
{
this.matrix = matrix;
this.type = type;
+ this.name = name;
}
}
+ @Override
public boolean isDNA()
{
return type == 1;
}
public boolean isDNA()
{
return type == 1;
}
-
+ @Override
public boolean isProtein()
{
return type == 0;
}
public boolean isProtein()
{
return type == 0;
}
+ @Override
public int[][] getMatrix()
{
return matrix;
public int[][] getMatrix()
{
return matrix;