|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biojava3.alignment.aaindex.ScaledSubstitutionMatrix
public class ScaledSubstitutionMatrix
The biojava-alignment module represents substitution matrices with short values. This is for performance reasons. Some substitution matrices, however, are provided as float values with up to 2 decimal places.
In order to be able to use them in the alignment module these are scaled in
order to be able to represent as short values.
The method getScale() provides access to the scaling factor.
| Constructor Summary | |
|---|---|
ScaledSubstitutionMatrix()
|
|
| Method Summary | |
|---|---|
List<AminoAcidCompound> |
getCols()
|
static String |
getComment()
|
CompoundSet<AminoAcidCompound> |
getCompoundSet()
Returns the CompoundSet on which the matrix is defined. |
String |
getDescription()
Returns the description of this matrix. |
short[][] |
getMatrix()
Returns entire matrix. |
String |
getMatrixAsString()
Returns this matrix as a formatted String with Compound labels along the axes. |
short |
getMax()
|
short |
getMaxValue()
Returns the maximum value in this matrix. |
short |
getMin()
|
short |
getMinValue()
Returns the minimum value in this matrix. |
String |
getName()
Returns the name (short description) of this matrix. |
List<AminoAcidCompound> |
getRows()
|
int |
getScale()
|
short |
getValue(AminoAcidCompound from,
AminoAcidCompound to)
Returns value in matrix for conversion from first Compound to the second. |
SubstitutionMatrix<AminoAcidCompound> |
normalizeMatrix(short scale)
Rescales the matrix so that to SubstitutionMatrix.getMaxValue() - SubstitutionMatrix.getMinValue() = scale. |
void |
setCols(List<AminoAcidCompound> cols)
|
void |
setDescription(String description)
Sets the description of this matrix. |
void |
setMatrix(short[][] matrix)
|
void |
setMax(short max)
|
void |
setMin(short min)
|
void |
setName(String name)
Sets the name (short description) of this matrix. |
void |
setRows(List<AminoAcidCompound> rows)
|
void |
setScale(int scale)
|
String |
toString()
Returns in a format similar to the standard NCBI files. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScaledSubstitutionMatrix()
| Method Detail |
|---|
public int getScale()
public void setScale(int scale)
public String getDescription()
SubstitutionMatrix
getDescription in interface SubstitutionMatrix<AminoAcidCompound>public void setDescription(String description)
SubstitutionMatrix
setDescription in interface SubstitutionMatrix<AminoAcidCompound>description - new descriptionpublic String getName()
SubstitutionMatrix
getName in interface SubstitutionMatrix<AminoAcidCompound>public void setName(String name)
SubstitutionMatrix
setName in interface SubstitutionMatrix<AminoAcidCompound>name - new namepublic short[][] getMatrix()
SubstitutionMatrix
getMatrix in interface SubstitutionMatrix<AminoAcidCompound>public void setMatrix(short[][] matrix)
public short getMax()
public void setMax(short max)
public short getMin()
public void setMin(short min)
public List<AminoAcidCompound> getRows()
public void setRows(List<AminoAcidCompound> rows)
public List<AminoAcidCompound> getCols()
public void setCols(List<AminoAcidCompound> cols)
public static String getComment()
public String toString()
toString in class Objectpublic CompoundSet<AminoAcidCompound> getCompoundSet()
SubstitutionMatrixCompoundSet on which the matrix is defined.
getCompoundSet in interface SubstitutionMatrix<AminoAcidCompound>CompoundSet on which the matrix is definedpublic String getMatrixAsString()
SubstitutionMatrixCompound labels along the axes.
getMatrixAsString in interface SubstitutionMatrix<AminoAcidCompound>public short getMaxValue()
SubstitutionMatrix
getMaxValue in interface SubstitutionMatrix<AminoAcidCompound>public short getMinValue()
SubstitutionMatrix
getMinValue in interface SubstitutionMatrix<AminoAcidCompound>
public short getValue(AminoAcidCompound from,
AminoAcidCompound to)
SubstitutionMatrixCompound to the second. If an argument does not
belong to the CompoundSet, this could either throw an IllegalArgumentException or it could
return SubstitutionMatrix.getMinValue().
getValue in interface SubstitutionMatrix<AminoAcidCompound>from - original Compoundto - replacement Compound
Compound to the secondpublic SubstitutionMatrix<AminoAcidCompound> normalizeMatrix(short scale)
SubstitutionMatrixSubstitutionMatrix.getMaxValue() - SubstitutionMatrix.getMinValue() = scale.
normalizeMatrix in interface SubstitutionMatrix<AminoAcidCompound>scale - new normalization scale of this matrix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||