Package org.biojava.bio.alignment
Class SubstitutionMatrix
java.lang.Object
org.biojava.bio.alignment.SubstitutionMatrix
- All Implemented Interfaces:
Serializable
This object is able to read a substitution matrix file and constructs a short
matrix in memory. Every single element of the matrix can be accessed by the
method getValueAt with the parameters being two BioJava symbols.
This is why it is not necessary to access the matrix directly. If there is no
value for the two specified Symbols an Exception is
thrown.
Substitution matrix files, are available at the NCBI FTP directory.
- Author:
- Andreas Dräger invalid input: '<'andreas.draeger@uni-tuebingen.de>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubstitutionMatrix(File file) This constructor can be used to guess the alphabet of this substitution matrix.SubstitutionMatrix(FiniteAlphabet alpha, short match, short replace) Constructs a SubstitutionMatrix with every Match and every Replace having the same expenses given by the parameters.SubstitutionMatrix(FiniteAlphabet alpha, File matrixFile) This constructs aSubstitutionMatrixobject that contains twoMapdata structures having BioJava symbols as keys and the value being the index of the matrix containing the substitution score.SubstitutionMatrix(FiniteAlphabet alpha, String matrixString, String name) With this constructor it is possible to construct a SubstitutionMatrix object from a substitution matrix file. -
Method Summary
Modifier and TypeMethodDescriptionGives the alphabet used by this matrix.static SubstitutionMatrixReturn theBLOSUM100amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM100.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM30amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM30.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM35amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM35.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM40amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM40.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM45amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM45.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM50.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM55amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM55.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM60amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM60.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM62amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM62.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM65amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM65.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM70amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM70.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM75amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM75.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM80amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM80.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM85amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM85.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM90amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUM90.50amino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUMNamino acid substitution matrix.static SubstitutionMatrixReturn theBLOSUMN.50amino acid substitution matrix.static SubstitutionMatrixReturn theDAYHOFFamino acid substitution matrix.This gives you the description of this matrix if there is one.static SubstitutionMatrixReturn theGONNETamino acid substitution matrix.static SubstitutionMatrixReturn theIDENTITYamino acid substitution matrix.static SubstitutionMatrixgetMatch()Return theMATCHamino acid substitution matrix.shortgetMax()The maximum score in this matrix.shortgetMin()The minimum score of this matrix.getName()Every substitution matrix has a name like "BLOSUM30" or "PAM160".static SubstitutionMatrixReturn theNUC.4.2nucleotide substitution matrix.static SubstitutionMatrixReturn theNUC.4.4nucleotide substitution matrix.static SubstitutionMatrixgetPam10()Return thePAM10amino acid substitution matrix.static SubstitutionMatrixReturn thePAM100amino acid substitution matrix.static SubstitutionMatrixReturn thePAM110amino acid substitution matrix.static SubstitutionMatrixReturn thePAM120amino acid substitution matrix.static SubstitutionMatrixReturn thePAM130amino acid substitution matrix.static SubstitutionMatrixReturn thePAM140amino acid substitution matrix.static SubstitutionMatrixReturn thePAM150amino acid substitution matrix.static SubstitutionMatrixReturn thePAM160amino acid substitution matrix.static SubstitutionMatrixReturn thePAM170amino acid substitution matrix.static SubstitutionMatrixReturn thePAM180amino acid substitution matrix.static SubstitutionMatrixReturn thePAM190amino acid substitution matrix.static SubstitutionMatrixgetPam20()Return thePAM20amino acid substitution matrix.static SubstitutionMatrixReturn thePAM200amino acid substitution matrix.static SubstitutionMatrixReturn thePAM210amino acid substitution matrix.static SubstitutionMatrixReturn thePAM220amino acid substitution matrix.static SubstitutionMatrixReturn thePAM230amino acid substitution matrix.static SubstitutionMatrixReturn thePAM240amino acid substitution matrix.static SubstitutionMatrixReturn thePAM250amino acid substitution matrix.static SubstitutionMatrixReturn thePAM260amino acid substitution matrix.static SubstitutionMatrixReturn thePAM270amino acid substitution matrix.static SubstitutionMatrixReturn thePAM280amino acid substitution matrix.static SubstitutionMatrixReturn thePAM290amino acid substitution matrix.static SubstitutionMatrixgetPam30()Return thePAM30amino acid substitution matrix.static SubstitutionMatrixReturn thePAM300amino acid substitution matrix.static SubstitutionMatrixReturn thePAM310amino acid substitution matrix.static SubstitutionMatrixReturn thePAM320amino acid substitution matrix.static SubstitutionMatrixReturn thePAM330amino acid substitution matrix.static SubstitutionMatrixReturn thePAM340amino acid substitution matrix.static SubstitutionMatrixReturn thePAM350amino acid substitution matrix.static SubstitutionMatrixReturn thePAM360amino acid substitution matrix.static SubstitutionMatrixReturn thePAM370amino acid substitution matrix.static SubstitutionMatrixReturn thePAM380amino acid substitution matrix.static SubstitutionMatrixReturn thePAM390amino acid substitution matrix.static SubstitutionMatrixgetPam40()Return thePAM40amino acid substitution matrix.static SubstitutionMatrixReturn thePAM400amino acid substitution matrix.static SubstitutionMatrixReturn thePAM410amino acid substitution matrix.static SubstitutionMatrixReturn thePAM420amino acid substitution matrix.static SubstitutionMatrixReturn thePAM430amino acid substitution matrix.static SubstitutionMatrixReturn thePAM440amino acid substitution matrix.static SubstitutionMatrixReturn thePAM450amino acid substitution matrix.static SubstitutionMatrixReturn thePAM460amino acid substitution matrix.static SubstitutionMatrixReturn thePAM470amino acid substitution matrix.static SubstitutionMatrixReturn thePAM480amino acid substitution matrix.static SubstitutionMatrixReturn thePAM490amino acid substitution matrix.static SubstitutionMatrixgetPam50()Return thePAM50amino acid substitution matrix.static SubstitutionMatrixReturn thePAM500amino acid substitution matrix.static SubstitutionMatrixgetPam60()Return thePAM60amino acid substitution matrix.static SubstitutionMatrixgetPam70()Return thePAM70amino acid substitution matrix.static SubstitutionMatrixgetPam80()Return thePAM80amino acid substitution matrix.static SubstitutionMatrixgetPam90()Return thePAM90amino acid substitution matrix.static SubstitutionMatrixgetSubstitutionMatrix(BufferedReader reader) This constructor can be used to guess the alphabet of this substitution matrix.static SubstitutionMatrixgetSubstitutionMatrix(FiniteAlphabet alphabet, BufferedReader reader) Return a new substitution matrix with the specified alphabet.static SubstitutionMatrixgetSubstitutionMatrix(FiniteAlphabet alphabet, BufferedReader reader, String name) Return a new substitution matrix with the specified alphabet and name.shortgetValueAt(Symbol row, Symbol col) There are some substitution matrices containing more columns than lines.With this method you can get a “normalized”SubstitutionMatrixobject; however, since this implementation uses an short matrix, the normalized matrix will be scaled by ten.voidJust to perform some test.voidsetDescription(String desc) Sets the description to the given value.Converts the description of the matrix to a String.Creates aStringrepresentation of this matrix.toString()Overrides the inherited method.
-
Constructor Details
-
SubstitutionMatrix
public SubstitutionMatrix(FiniteAlphabet alpha, File matrixFile) throws BioException, NumberFormatException, IOException This constructs aSubstitutionMatrixobject that contains twoMapdata structures having BioJava symbols as keys and the value being the index of the matrix containing the substitution score.- Parameters:
alpha- the alphabet of the matrix (e.g., 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.- Throws:
IOExceptionBioExceptionNumberFormatException
-
SubstitutionMatrix
public SubstitutionMatrix(FiniteAlphabet alpha, String matrixString, String name) throws BioException, NumberFormatException, IOException With this constructor it is possible to construct a SubstitutionMatrix object from a substitution matrix file. The given String contains a number of lines separated bySystem.getProperty("line.separator"). Everything else is the same than for the constructor above.- Parameters:
alpha- TheFiniteAlphabetto usematrixString-name- of the matrix.- Throws:
BioExceptionIOExceptionNumberFormatException
-
SubstitutionMatrix
Constructs a SubstitutionMatrix with every Match and every Replace having the same expenses given by the parameters. Ambiguous symbols are not considered because there might be to many of them (for proteins).- Parameters:
alpha-match-replace-
-
SubstitutionMatrix
public SubstitutionMatrix(File file) throws NumberFormatException, NoSuchElementException, BioException, IOException This constructor can be used to guess the alphabet of this substitution matrix. However, it is recommended to apply another constructor if the alphabet is known.- Parameters:
file- A file containing a substitution matrix.- Throws:
NumberFormatExceptionNoSuchElementExceptionBioExceptionIOException
-
-
Method Details
-
getSubstitutionMatrix
public static SubstitutionMatrix getSubstitutionMatrix(BufferedReader reader) throws NumberFormatException, BioException, IOException This constructor can be used to guess the alphabet of this substitution matrix. However, it is recommended to apply another constructor if the alphabet is known.- Parameters:
reader-- Throws:
NumberFormatExceptionBioExceptionIOException
-
getSubstitutionMatrix
public static SubstitutionMatrix getSubstitutionMatrix(FiniteAlphabet alphabet, BufferedReader reader) throws BioException, IOException Return a new substitution matrix with the specified alphabet.- Parameters:
alphabet- alphabet, must not be nullreader- reader, must not be null- Returns:
- a new substitution matrix with the specified alphabet
- Throws:
BioException- if an error occursIOException- if an I/O error occurs
-
getSubstitutionMatrix
public static SubstitutionMatrix getSubstitutionMatrix(FiniteAlphabet alphabet, BufferedReader reader, String name) throws BioException, IOException Return a new substitution matrix with the specified alphabet and name.- Parameters:
alphabet- alphabet, must not be nullreader- reader, must not be nullname- name, must not be null- Returns:
- a new substitution matrix with the specified alphabet and name
- Throws:
BioException- if an error occursIOException- if an I/O error occurs
-
getBlosum100
Return theBLOSUM100amino acid substitution matrix.- Returns:
- the
BLOSUM100amino acid substitution matrix
-
getBlosum100_50
Return theBLOSUM100.50amino acid substitution matrix.- Returns:
- the
BLOSUM100.50amino acid substitution matrix
-
getBlosum30
Return theBLOSUM30amino acid substitution matrix.- Returns:
- the
BLOSUM30amino acid substitution matrix
-
getBlosum30_50
Return theBLOSUM30.50amino acid substitution matrix.- Returns:
- the
BLOSUM30.50amino acid substitution matrix
-
getBlosum35
Return theBLOSUM35amino acid substitution matrix.- Returns:
- the
BLOSUM35amino acid substitution matrix
-
getBlosum35_50
Return theBLOSUM35.50amino acid substitution matrix.- Returns:
- the
BLOSUM35.50amino acid substitution matrix
-
getBlosum40
Return theBLOSUM40amino acid substitution matrix.- Returns:
- the
BLOSUM40amino acid substitution matrix
-
getBlosum40_50
Return theBLOSUM40.50amino acid substitution matrix.- Returns:
- the
BLOSUM40.50amino acid substitution matrix
-
getBlosum45
Return theBLOSUM45amino acid substitution matrix.- Returns:
- the
BLOSUM45amino acid substitution matrix
-
getBlosum45_50
Return theBLOSUM45.50amino acid substitution matrix.- Returns:
- the
BLOSUM45.50amino acid substitution matrix
-
getBlosum50
Return theBLOSUM50amino acid substitution matrix.- Returns:
- the
BLOSUM50amino acid substitution matrix
-
getBlosum50_50
Return theBLOSUM50.50amino acid substitution matrix.- Returns:
- the
BLOSUM50.50amino acid substitution matrix
-
getBlosum55
Return theBLOSUM55amino acid substitution matrix.- Returns:
- the
BLOSUM55amino acid substitution matrix
-
getBlosum55_50
Return theBLOSUM55.50amino acid substitution matrix.- Returns:
- the
BLOSUM55.50amino acid substitution matrix
-
getBlosum60
Return theBLOSUM60amino acid substitution matrix.- Returns:
- the
BLOSUM60amino acid substitution matrix
-
getBlosum60_50
Return theBLOSUM60.50amino acid substitution matrix.- Returns:
- the
BLOSUM60.50amino acid substitution matrix
-
getBlosum62
Return theBLOSUM62amino acid substitution matrix.- Returns:
- the
BLOSUM62amino acid substitution matrix
-
getBlosum62_50
Return theBLOSUM62.50amino acid substitution matrix.- Returns:
- the
BLOSUM62.50amino acid substitution matrix
-
getBlosum65
Return theBLOSUM65amino acid substitution matrix.- Returns:
- the
BLOSUM65amino acid substitution matrix
-
getBlosum65_50
Return theBLOSUM65.50amino acid substitution matrix.- Returns:
- the
BLOSUM65.50amino acid substitution matrix
-
getBlosum70
Return theBLOSUM70amino acid substitution matrix.- Returns:
- the
BLOSUM70amino acid substitution matrix
-
getBlosum70_50
Return theBLOSUM70.50amino acid substitution matrix.- Returns:
- the
BLOSUM70.50amino acid substitution matrix
-
getBlosum75
Return theBLOSUM75amino acid substitution matrix.- Returns:
- the
BLOSUM75amino acid substitution matrix
-
getBlosum75_50
Return theBLOSUM75.50amino acid substitution matrix.- Returns:
- the
BLOSUM75.50amino acid substitution matrix
-
getBlosum80
Return theBLOSUM80amino acid substitution matrix.- Returns:
- the
BLOSUM80amino acid substitution matrix
-
getBlosum80_50
Return theBLOSUM80.50amino acid substitution matrix.- Returns:
- the
BLOSUM80.50amino acid substitution matrix
-
getBlosum85
Return theBLOSUM85amino acid substitution matrix.- Returns:
- the
BLOSUM85amino acid substitution matrix
-
getBlosum85_50
Return theBLOSUM85.50amino acid substitution matrix.- Returns:
- the
BLOSUM85.50amino acid substitution matrix
-
getBlosum90
Return theBLOSUM90amino acid substitution matrix.- Returns:
- the
BLOSUM90amino acid substitution matrix
-
getBlosum90_50
Return theBLOSUM90.50amino acid substitution matrix.- Returns:
- the
BLOSUM90.50amino acid substitution matrix
-
getBlosumn
Return theBLOSUMNamino acid substitution matrix.- Returns:
- the
BLOSUMNamino acid substitution matrix
-
getBlosumn_50
Return theBLOSUMN.50amino acid substitution matrix.- Returns:
- the
BLOSUMN.50amino acid substitution matrix
-
getDayhoff
Return theDAYHOFFamino acid substitution matrix.- Returns:
- the
DAYHOFFamino acid substitution matrix
-
getGonnet
Return theGONNETamino acid substitution matrix.- Returns:
- the
GONNETamino acid substitution matrix
-
getIdentity
Return theIDENTITYamino acid substitution matrix.- Returns:
- the
IDENTITYamino acid substitution matrix
-
getMatch
Return theMATCHamino acid substitution matrix.- Returns:
- the
MATCHamino acid substitution matrix
-
getNuc4_2
Return theNUC.4.2nucleotide substitution matrix.- Returns:
- the
NUC.4.2nucleotide substitution matrix
-
getNuc4_4
Return theNUC.4.4nucleotide substitution matrix.- Returns:
- the
NUC.4.4nucleotide substitution matrix
-
getPam10
Return thePAM10amino acid substitution matrix.- Returns:
- the
PAM10amino acid substitution matrix
-
getPam100
Return thePAM100amino acid substitution matrix.- Returns:
- the
PAM100amino acid substitution matrix
-
getPam110
Return thePAM110amino acid substitution matrix.- Returns:
- the
PAM110amino acid substitution matrix
-
getPam120
Return thePAM120amino acid substitution matrix.- Returns:
- the
PAM120amino acid substitution matrix
-
getPam130
Return thePAM130amino acid substitution matrix.- Returns:
- the
PAM130amino acid substitution matrix
-
getPam140
Return thePAM140amino acid substitution matrix.- Returns:
- the
PAM140amino acid substitution matrix
-
getPam150
Return thePAM150amino acid substitution matrix.- Returns:
- the
PAM150amino acid substitution matrix
-
getPam160
Return thePAM160amino acid substitution matrix.- Returns:
- the
PAM160amino acid substitution matrix
-
getPam170
Return thePAM170amino acid substitution matrix.- Returns:
- the
PAM170amino acid substitution matrix
-
getPam180
Return thePAM180amino acid substitution matrix.- Returns:
- the
PAM180amino acid substitution matrix
-
getPam190
Return thePAM190amino acid substitution matrix.- Returns:
- the
PAM190amino acid substitution matrix
-
getPam20
Return thePAM20amino acid substitution matrix.- Returns:
- the
PAM20amino acid substitution matrix
-
getPam200
Return thePAM200amino acid substitution matrix.- Returns:
- the
PAM200amino acid substitution matrix
-
getPam210
Return thePAM210amino acid substitution matrix.- Returns:
- the
PAM210amino acid substitution matrix
-
getPam220
Return thePAM220amino acid substitution matrix.- Returns:
- the
PAM220amino acid substitution matrix
-
getPam230
Return thePAM230amino acid substitution matrix.- Returns:
- the
PAM230amino acid substitution matrix
-
getPam240
Return thePAM240amino acid substitution matrix.- Returns:
- the
PAM240amino acid substitution matrix
-
getPam250
Return thePAM250amino acid substitution matrix.- Returns:
- the
PAM250amino acid substitution matrix
-
getPam260
Return thePAM260amino acid substitution matrix.- Returns:
- the
PAM260amino acid substitution matrix
-
getPam270
Return thePAM270amino acid substitution matrix.- Returns:
- the
PAM270amino acid substitution matrix
-
getPam280
Return thePAM280amino acid substitution matrix.- Returns:
- the
PAM280amino acid substitution matrix
-
getPam290
Return thePAM290amino acid substitution matrix.- Returns:
- the
PAM290amino acid substitution matrix
-
getPam30
Return thePAM30amino acid substitution matrix.- Returns:
- the
PAM30amino acid substitution matrix
-
getPam300
Return thePAM300amino acid substitution matrix.- Returns:
- the
PAM300amino acid substitution matrix
-
getPam310
Return thePAM310amino acid substitution matrix.- Returns:
- the
PAM310amino acid substitution matrix
-
getPam320
Return thePAM320amino acid substitution matrix.- Returns:
- the
PAM320amino acid substitution matrix
-
getPam330
Return thePAM330amino acid substitution matrix.- Returns:
- the
PAM330amino acid substitution matrix
-
getPam340
Return thePAM340amino acid substitution matrix.- Returns:
- the
PAM340amino acid substitution matrix
-
getPam350
Return thePAM350amino acid substitution matrix.- Returns:
- the
PAM350amino acid substitution matrix
-
getPam360
Return thePAM360amino acid substitution matrix.- Returns:
- the
PAM360amino acid substitution matrix
-
getPam370
Return thePAM370amino acid substitution matrix.- Returns:
- the
PAM370amino acid substitution matrix
-
getPam380
Return thePAM380amino acid substitution matrix.- Returns:
- the
PAM380amino acid substitution matrix
-
getPam390
Return thePAM390amino acid substitution matrix.- Returns:
- the
PAM390amino acid substitution matrix
-
getPam40
Return thePAM40amino acid substitution matrix.- Returns:
- the
PAM40amino acid substitution matrix
-
getPam400
Return thePAM400amino acid substitution matrix.- Returns:
- the
PAM400amino acid substitution matrix
-
getPam410
Return thePAM410amino acid substitution matrix.- Returns:
- the
PAM410amino acid substitution matrix
-
getPam420
Return thePAM420amino acid substitution matrix.- Returns:
- the
PAM420amino acid substitution matrix
-
getPam430
Return thePAM430amino acid substitution matrix.- Returns:
- the
PAM430amino acid substitution matrix
-
getPam440
Return thePAM440amino acid substitution matrix.- Returns:
- the
PAM440amino acid substitution matrix
-
getPam450
Return thePAM450amino acid substitution matrix.- Returns:
- the
PAM450amino acid substitution matrix
-
getPam460
Return thePAM460amino acid substitution matrix.- Returns:
- the
PAM460amino acid substitution matrix
-
getPam470
Return thePAM470amino acid substitution matrix.- Returns:
- the
PAM470amino acid substitution matrix
-
getPam480
Return thePAM480amino acid substitution matrix.- Returns:
- the
PAM480amino acid substitution matrix
-
getPam490
Return thePAM490amino acid substitution matrix.- Returns:
- the
PAM490amino acid substitution matrix
-
getPam50
Return thePAM50amino acid substitution matrix.- Returns:
- the
PAM50amino acid substitution matrix
-
getPam500
Return thePAM500amino acid substitution matrix.- Returns:
- the
PAM500amino acid substitution matrix
-
getPam60
Return thePAM60amino acid substitution matrix.- Returns:
- the
PAM60amino acid substitution matrix
-
getPam70
Return thePAM70amino acid substitution matrix.- Returns:
- the
PAM70amino acid substitution matrix
-
getPam80
Return thePAM80amino acid substitution matrix.- Returns:
- the
PAM80amino acid substitution matrix
-
getPam90
Return thePAM90amino acid substitution matrix.- Returns:
- the
PAM90amino acid substitution matrix
-
getValueAt
There are some substitution matrices containing more columns than lines. This has to do with the ambiguous symbols. Lines are always good, columns might not contain the whole information. The matrix is supposed to be symmetric anyway, so you can always set the ambiguous symbol to be the first argument.- Parameters:
row- Symbol of the linecol- Symbol of the column- Returns:
- expenses for the exchange of symbol row and symbol column.
- Throws:
BioException
-
getDescription
This gives you the description of this matrix if there is one. Normally substitution matrix files like BLOSUM contain some lines of description.- Returns:
- the comment of the matrix
-
getName
Every substitution matrix has a name like "BLOSUM30" or "PAM160". This will be returned by this method.- Returns:
- the name of the matrix.
-
getMin
The minimum score of this matrix.- Returns:
- minimum of the matrix.
-
getMax
The maximum score in this matrix.- Returns:
- maximum of the matrix.
-
setDescription
Sets the description to the given value.- Parameters:
desc- a description. This doesn't have to start with '#'.
-
getAlphabet
Gives the alphabet used by this matrix.- Returns:
- the alphabet of this matrix.
-
stringnifyMatrix
Creates aStringrepresentation of this matrix.- Returns:
- a string representation of this matrix without the description.
-
stringnifyDescription
Converts the description of the matrix to a String.- Returns:
- Gives a description with approximately 60 letters on every line
separated by
System.getProperty("line.separator"). Every line starts with#.
-
toString
Overrides the inherited method. -
printMatrix
Just to perform some test. It prints the matrix on the screen. -
normalizeMatrix
With this method you can get a “normalized”SubstitutionMatrixobject; however, since this implementation uses an short matrix, the normalized matrix will be scaled by ten. If you need values between zero and one, you have to divide every value returned bygetValueAtby ten.- Returns:
- a new and normalized
SubstitutionMatrixobject given by this substitution matrix. Because this uses anshortmatrix, all values are scaled by 10. - Throws:
BioExceptionIOExceptionNumberFormatException
-