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 Symbol
s 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 aSubstitutionMatrix
object that contains twoMap
data 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 SubstitutionMatrix
Return theBLOSUM100
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM100.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM30
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM30.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM35
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM35.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM40
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM40.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM45
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM45.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM50.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM55
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM55.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM60
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM60.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM62
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM62.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM65
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM65.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM70
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM70.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM75
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM75.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM80
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM80.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM85
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM85.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM90
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUM90.50
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUMN
amino acid substitution matrix.static SubstitutionMatrix
Return theBLOSUMN.50
amino acid substitution matrix.static SubstitutionMatrix
Return theDAYHOFF
amino acid substitution matrix.This gives you the description of this matrix if there is one.static SubstitutionMatrix
Return theGONNET
amino acid substitution matrix.static SubstitutionMatrix
Return theIDENTITY
amino acid substitution matrix.static SubstitutionMatrix
getMatch()
Return theMATCH
amino acid substitution matrix.short
getMax()
The maximum score in this matrix.short
getMin()
The minimum score of this matrix.getName()
Every substitution matrix has a name like "BLOSUM30" or "PAM160".static SubstitutionMatrix
Return theNUC.4.2
nucleotide substitution matrix.static SubstitutionMatrix
Return theNUC.4.4
nucleotide substitution matrix.static SubstitutionMatrix
getPam10()
Return thePAM10
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM100
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM110
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM120
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM130
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM140
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM150
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM160
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM170
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM180
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM190
amino acid substitution matrix.static SubstitutionMatrix
getPam20()
Return thePAM20
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM200
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM210
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM220
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM230
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM240
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM250
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM260
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM270
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM280
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM290
amino acid substitution matrix.static SubstitutionMatrix
getPam30()
Return thePAM30
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM300
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM310
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM320
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM330
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM340
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM350
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM360
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM370
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM380
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM390
amino acid substitution matrix.static SubstitutionMatrix
getPam40()
Return thePAM40
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM400
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM410
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM420
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM430
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM440
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM450
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM460
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM470
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM480
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM490
amino acid substitution matrix.static SubstitutionMatrix
getPam50()
Return thePAM50
amino acid substitution matrix.static SubstitutionMatrix
Return thePAM500
amino acid substitution matrix.static SubstitutionMatrix
getPam60()
Return thePAM60
amino acid substitution matrix.static SubstitutionMatrix
getPam70()
Return thePAM70
amino acid substitution matrix.static SubstitutionMatrix
getPam80()
Return thePAM80
amino acid substitution matrix.static SubstitutionMatrix
getPam90()
Return thePAM90
amino acid substitution matrix.static SubstitutionMatrix
getSubstitutionMatrix
(BufferedReader reader) This constructor can be used to guess the alphabet of this substitution matrix.static SubstitutionMatrix
getSubstitutionMatrix
(FiniteAlphabet alphabet, BufferedReader reader) Return a new substitution matrix with the specified alphabet.static SubstitutionMatrix
getSubstitutionMatrix
(FiniteAlphabet alphabet, BufferedReader reader, String name) Return a new substitution matrix with the specified alphabet and name.short
getValueAt
(Symbol row, Symbol col) There are some substitution matrices containing more columns than lines.With this method you can get a “normalized”SubstitutionMatrix
object; however, since this implementation uses an short matrix, the normalized matrix will be scaled by ten.void
Just to perform some test.void
setDescription
(String desc) Sets the description to the given value.Converts the description of the matrix to a String.Creates aString
representation of this matrix.toString()
Overrides the inherited method.
-
Constructor Details
-
SubstitutionMatrix
public SubstitutionMatrix(FiniteAlphabet alpha, File matrixFile) throws BioException, NumberFormatException, IOException This constructs aSubstitutionMatrix
object that contains twoMap
data 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:
IOException
BioException
NumberFormatException
-
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
- TheFiniteAlphabet
to usematrixString
-name
- of the matrix.- Throws:
BioException
IOException
NumberFormatException
-
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:
NumberFormatException
NoSuchElementException
BioException
IOException
-
-
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:
NumberFormatException
BioException
IOException
-
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 theBLOSUM100
amino acid substitution matrix.- Returns:
- the
BLOSUM100
amino acid substitution matrix
-
getBlosum100_50
Return theBLOSUM100.50
amino acid substitution matrix.- Returns:
- the
BLOSUM100.50
amino acid substitution matrix
-
getBlosum30
Return theBLOSUM30
amino acid substitution matrix.- Returns:
- the
BLOSUM30
amino acid substitution matrix
-
getBlosum30_50
Return theBLOSUM30.50
amino acid substitution matrix.- Returns:
- the
BLOSUM30.50
amino acid substitution matrix
-
getBlosum35
Return theBLOSUM35
amino acid substitution matrix.- Returns:
- the
BLOSUM35
amino acid substitution matrix
-
getBlosum35_50
Return theBLOSUM35.50
amino acid substitution matrix.- Returns:
- the
BLOSUM35.50
amino acid substitution matrix
-
getBlosum40
Return theBLOSUM40
amino acid substitution matrix.- Returns:
- the
BLOSUM40
amino acid substitution matrix
-
getBlosum40_50
Return theBLOSUM40.50
amino acid substitution matrix.- Returns:
- the
BLOSUM40.50
amino acid substitution matrix
-
getBlosum45
Return theBLOSUM45
amino acid substitution matrix.- Returns:
- the
BLOSUM45
amino acid substitution matrix
-
getBlosum45_50
Return theBLOSUM45.50
amino acid substitution matrix.- Returns:
- the
BLOSUM45.50
amino acid substitution matrix
-
getBlosum50
Return theBLOSUM50
amino acid substitution matrix.- Returns:
- the
BLOSUM50
amino acid substitution matrix
-
getBlosum50_50
Return theBLOSUM50.50
amino acid substitution matrix.- Returns:
- the
BLOSUM50.50
amino acid substitution matrix
-
getBlosum55
Return theBLOSUM55
amino acid substitution matrix.- Returns:
- the
BLOSUM55
amino acid substitution matrix
-
getBlosum55_50
Return theBLOSUM55.50
amino acid substitution matrix.- Returns:
- the
BLOSUM55.50
amino acid substitution matrix
-
getBlosum60
Return theBLOSUM60
amino acid substitution matrix.- Returns:
- the
BLOSUM60
amino acid substitution matrix
-
getBlosum60_50
Return theBLOSUM60.50
amino acid substitution matrix.- Returns:
- the
BLOSUM60.50
amino acid substitution matrix
-
getBlosum62
Return theBLOSUM62
amino acid substitution matrix.- Returns:
- the
BLOSUM62
amino acid substitution matrix
-
getBlosum62_50
Return theBLOSUM62.50
amino acid substitution matrix.- Returns:
- the
BLOSUM62.50
amino acid substitution matrix
-
getBlosum65
Return theBLOSUM65
amino acid substitution matrix.- Returns:
- the
BLOSUM65
amino acid substitution matrix
-
getBlosum65_50
Return theBLOSUM65.50
amino acid substitution matrix.- Returns:
- the
BLOSUM65.50
amino acid substitution matrix
-
getBlosum70
Return theBLOSUM70
amino acid substitution matrix.- Returns:
- the
BLOSUM70
amino acid substitution matrix
-
getBlosum70_50
Return theBLOSUM70.50
amino acid substitution matrix.- Returns:
- the
BLOSUM70.50
amino acid substitution matrix
-
getBlosum75
Return theBLOSUM75
amino acid substitution matrix.- Returns:
- the
BLOSUM75
amino acid substitution matrix
-
getBlosum75_50
Return theBLOSUM75.50
amino acid substitution matrix.- Returns:
- the
BLOSUM75.50
amino acid substitution matrix
-
getBlosum80
Return theBLOSUM80
amino acid substitution matrix.- Returns:
- the
BLOSUM80
amino acid substitution matrix
-
getBlosum80_50
Return theBLOSUM80.50
amino acid substitution matrix.- Returns:
- the
BLOSUM80.50
amino acid substitution matrix
-
getBlosum85
Return theBLOSUM85
amino acid substitution matrix.- Returns:
- the
BLOSUM85
amino acid substitution matrix
-
getBlosum85_50
Return theBLOSUM85.50
amino acid substitution matrix.- Returns:
- the
BLOSUM85.50
amino acid substitution matrix
-
getBlosum90
Return theBLOSUM90
amino acid substitution matrix.- Returns:
- the
BLOSUM90
amino acid substitution matrix
-
getBlosum90_50
Return theBLOSUM90.50
amino acid substitution matrix.- Returns:
- the
BLOSUM90.50
amino acid substitution matrix
-
getBlosumn
Return theBLOSUMN
amino acid substitution matrix.- Returns:
- the
BLOSUMN
amino acid substitution matrix
-
getBlosumn_50
Return theBLOSUMN.50
amino acid substitution matrix.- Returns:
- the
BLOSUMN.50
amino acid substitution matrix
-
getDayhoff
Return theDAYHOFF
amino acid substitution matrix.- Returns:
- the
DAYHOFF
amino acid substitution matrix
-
getGonnet
Return theGONNET
amino acid substitution matrix.- Returns:
- the
GONNET
amino acid substitution matrix
-
getIdentity
Return theIDENTITY
amino acid substitution matrix.- Returns:
- the
IDENTITY
amino acid substitution matrix
-
getMatch
Return theMATCH
amino acid substitution matrix.- Returns:
- the
MATCH
amino acid substitution matrix
-
getNuc4_2
Return theNUC.4.2
nucleotide substitution matrix.- Returns:
- the
NUC.4.2
nucleotide substitution matrix
-
getNuc4_4
Return theNUC.4.4
nucleotide substitution matrix.- Returns:
- the
NUC.4.4
nucleotide substitution matrix
-
getPam10
Return thePAM10
amino acid substitution matrix.- Returns:
- the
PAM10
amino acid substitution matrix
-
getPam100
Return thePAM100
amino acid substitution matrix.- Returns:
- the
PAM100
amino acid substitution matrix
-
getPam110
Return thePAM110
amino acid substitution matrix.- Returns:
- the
PAM110
amino acid substitution matrix
-
getPam120
Return thePAM120
amino acid substitution matrix.- Returns:
- the
PAM120
amino acid substitution matrix
-
getPam130
Return thePAM130
amino acid substitution matrix.- Returns:
- the
PAM130
amino acid substitution matrix
-
getPam140
Return thePAM140
amino acid substitution matrix.- Returns:
- the
PAM140
amino acid substitution matrix
-
getPam150
Return thePAM150
amino acid substitution matrix.- Returns:
- the
PAM150
amino acid substitution matrix
-
getPam160
Return thePAM160
amino acid substitution matrix.- Returns:
- the
PAM160
amino acid substitution matrix
-
getPam170
Return thePAM170
amino acid substitution matrix.- Returns:
- the
PAM170
amino acid substitution matrix
-
getPam180
Return thePAM180
amino acid substitution matrix.- Returns:
- the
PAM180
amino acid substitution matrix
-
getPam190
Return thePAM190
amino acid substitution matrix.- Returns:
- the
PAM190
amino acid substitution matrix
-
getPam20
Return thePAM20
amino acid substitution matrix.- Returns:
- the
PAM20
amino acid substitution matrix
-
getPam200
Return thePAM200
amino acid substitution matrix.- Returns:
- the
PAM200
amino acid substitution matrix
-
getPam210
Return thePAM210
amino acid substitution matrix.- Returns:
- the
PAM210
amino acid substitution matrix
-
getPam220
Return thePAM220
amino acid substitution matrix.- Returns:
- the
PAM220
amino acid substitution matrix
-
getPam230
Return thePAM230
amino acid substitution matrix.- Returns:
- the
PAM230
amino acid substitution matrix
-
getPam240
Return thePAM240
amino acid substitution matrix.- Returns:
- the
PAM240
amino acid substitution matrix
-
getPam250
Return thePAM250
amino acid substitution matrix.- Returns:
- the
PAM250
amino acid substitution matrix
-
getPam260
Return thePAM260
amino acid substitution matrix.- Returns:
- the
PAM260
amino acid substitution matrix
-
getPam270
Return thePAM270
amino acid substitution matrix.- Returns:
- the
PAM270
amino acid substitution matrix
-
getPam280
Return thePAM280
amino acid substitution matrix.- Returns:
- the
PAM280
amino acid substitution matrix
-
getPam290
Return thePAM290
amino acid substitution matrix.- Returns:
- the
PAM290
amino acid substitution matrix
-
getPam30
Return thePAM30
amino acid substitution matrix.- Returns:
- the
PAM30
amino acid substitution matrix
-
getPam300
Return thePAM300
amino acid substitution matrix.- Returns:
- the
PAM300
amino acid substitution matrix
-
getPam310
Return thePAM310
amino acid substitution matrix.- Returns:
- the
PAM310
amino acid substitution matrix
-
getPam320
Return thePAM320
amino acid substitution matrix.- Returns:
- the
PAM320
amino acid substitution matrix
-
getPam330
Return thePAM330
amino acid substitution matrix.- Returns:
- the
PAM330
amino acid substitution matrix
-
getPam340
Return thePAM340
amino acid substitution matrix.- Returns:
- the
PAM340
amino acid substitution matrix
-
getPam350
Return thePAM350
amino acid substitution matrix.- Returns:
- the
PAM350
amino acid substitution matrix
-
getPam360
Return thePAM360
amino acid substitution matrix.- Returns:
- the
PAM360
amino acid substitution matrix
-
getPam370
Return thePAM370
amino acid substitution matrix.- Returns:
- the
PAM370
amino acid substitution matrix
-
getPam380
Return thePAM380
amino acid substitution matrix.- Returns:
- the
PAM380
amino acid substitution matrix
-
getPam390
Return thePAM390
amino acid substitution matrix.- Returns:
- the
PAM390
amino acid substitution matrix
-
getPam40
Return thePAM40
amino acid substitution matrix.- Returns:
- the
PAM40
amino acid substitution matrix
-
getPam400
Return thePAM400
amino acid substitution matrix.- Returns:
- the
PAM400
amino acid substitution matrix
-
getPam410
Return thePAM410
amino acid substitution matrix.- Returns:
- the
PAM410
amino acid substitution matrix
-
getPam420
Return thePAM420
amino acid substitution matrix.- Returns:
- the
PAM420
amino acid substitution matrix
-
getPam430
Return thePAM430
amino acid substitution matrix.- Returns:
- the
PAM430
amino acid substitution matrix
-
getPam440
Return thePAM440
amino acid substitution matrix.- Returns:
- the
PAM440
amino acid substitution matrix
-
getPam450
Return thePAM450
amino acid substitution matrix.- Returns:
- the
PAM450
amino acid substitution matrix
-
getPam460
Return thePAM460
amino acid substitution matrix.- Returns:
- the
PAM460
amino acid substitution matrix
-
getPam470
Return thePAM470
amino acid substitution matrix.- Returns:
- the
PAM470
amino acid substitution matrix
-
getPam480
Return thePAM480
amino acid substitution matrix.- Returns:
- the
PAM480
amino acid substitution matrix
-
getPam490
Return thePAM490
amino acid substitution matrix.- Returns:
- the
PAM490
amino acid substitution matrix
-
getPam50
Return thePAM50
amino acid substitution matrix.- Returns:
- the
PAM50
amino acid substitution matrix
-
getPam500
Return thePAM500
amino acid substitution matrix.- Returns:
- the
PAM500
amino acid substitution matrix
-
getPam60
Return thePAM60
amino acid substitution matrix.- Returns:
- the
PAM60
amino acid substitution matrix
-
getPam70
Return thePAM70
amino acid substitution matrix.- Returns:
- the
PAM70
amino acid substitution matrix
-
getPam80
Return thePAM80
amino acid substitution matrix.- Returns:
- the
PAM80
amino acid substitution matrix
-
getPam90
Return thePAM90
amino acid substitution matrix.- Returns:
- the
PAM90
amino 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 aString
representation 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”SubstitutionMatrix
object; 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 bygetValueAt
by ten.- Returns:
- a new and normalized
SubstitutionMatrix
object given by this substitution matrix. Because this uses anshort
matrix, all values are scaled by 10. - Throws:
BioException
IOException
NumberFormatException
-