|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blinAlignment.SubstitutionMatrix
public class SubstitutionMatrix
This object is able to read a substitution matrix file and constructs an int matrix to
store the matrix. Every single element of the matrix can be accessed by the method
getValueAt
with the parameters being tow biojava symbols. This is why it is
not necessary to access the matrix directly. If there is no value for the two specified
Symbol
s an Exception
is thrown.
Substitution matrix files, are available at The NCBI FTP directory.
Constructor Summary | |
---|---|
SubstitutionMatrix(org.biojava.bio.symbol.FiniteAlphabet alpha,
double match,
double replace)
Constructs a SubstitutionMatrix with every Match and every Replace having the same expenses given by the parameters. |
|
SubstitutionMatrix(org.biojava.bio.symbol.FiniteAlphabet alpha,
java.io.File matrixFile)
This constructs a SubstitutionMatrix -object that contains two
Map data structures having biojava symbols as key and the value
being the index of the matrix containing the substitution score. |
Method Summary | |
---|---|
org.biojava.bio.symbol.FiniteAlphabet |
getAlphabet()
Gives the alphabet used by this matrix. |
java.lang.String |
getDescription()
This gives you the description of this matrix if there is one. |
double |
getMax()
The maximum score in this matrix. |
double |
getMin()
The minimum score of this matrix. |
java.lang.String |
getName()
Every substitution matrix has a name like "BLOSUM30" or "PAM160". |
double |
getValueAt(org.biojava.bio.symbol.Symbol row,
org.biojava.bio.symbol.Symbol col)
There are some substitution matrices containing more columns than lines. |
void |
printMatrix()
Just to perform some test. |
void |
setDescription(java.lang.String desc)
Sets the description to the given value. |
java.lang.String |
stringnifyDescription()
Stringnifies the description of the matrix. |
java.lang.String |
stringnifyMatrix()
Creates a String representation of this matrix. |
java.lang.String |
toString()
Overides the inherited method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SubstitutionMatrix(org.biojava.bio.symbol.FiniteAlphabet alpha, java.io.File matrixFile) throws java.io.IOException, org.biojava.bio.BioException
SubstitutionMatrix
-object that contains two
Map
data structures having biojava symbols as key and the value
being the index of the matrix containing the substitution score.
alpha
- the alphabet of the matrix (DNA, RNA or PROTEIN, or PROTEIN-TERM)matrixFile
- the file containing the substitution matrix. Lines starting with
'#
' are comments. The line starting with a white space, is the table head.
Every line has to start with the one letter representation of the Symbol and then
the values for the exchange.
java.io.IOException
org.biojava.bio.BioException
public SubstitutionMatrix(org.biojava.bio.symbol.FiniteAlphabet alpha, double match, double replace)
alpha
- match
- replace
- Method Detail |
---|
public double getValueAt(org.biojava.bio.symbol.Symbol row, org.biojava.bio.symbol.Symbol col) throws org.biojava.bio.BioException
row
- Symbol of the linecol
- Symbol of the column
org.biojava.bio.BioException
public java.lang.String getDescription()
public java.lang.String getName()
public double getMin()
public double getMax()
public void setDescription(java.lang.String desc)
desc
- a description. This doesn't have to start with '#'.public org.biojava.bio.symbol.FiniteAlphabet getAlphabet()
public java.lang.String stringnifyMatrix()
String
representation of this matrix.
public java.lang.String stringnifyDescription()
\n
. Every line starts with #
.public java.lang.String toString()
toString
in class java.lang.Object
public void printMatrix()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |