Package org.biojava.bio.alignment
Class SubstitutionMatrix
- java.lang.Object
-
- org.biojava.bio.alignment.SubstitutionMatrix
-
- All Implemented Interfaces:
Serializable
public class SubstitutionMatrix extends Object implements 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 specifiedSymbol
s anException
is thrown.Substitution matrix files, are available at the NCBI FTP directory.
- Author:
- Andreas Dräger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SubstitutionMatrix(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FiniteAlphabet
getAlphabet()
Gives the alphabet used by this matrix.static SubstitutionMatrix
getBlosum100()
Return theBLOSUM100
amino acid substitution matrix.static SubstitutionMatrix
getBlosum100_50()
Return theBLOSUM100.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum30()
Return theBLOSUM30
amino acid substitution matrix.static SubstitutionMatrix
getBlosum30_50()
Return theBLOSUM30.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum35()
Return theBLOSUM35
amino acid substitution matrix.static SubstitutionMatrix
getBlosum35_50()
Return theBLOSUM35.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum40()
Return theBLOSUM40
amino acid substitution matrix.static SubstitutionMatrix
getBlosum40_50()
Return theBLOSUM40.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum45()
Return theBLOSUM45
amino acid substitution matrix.static SubstitutionMatrix
getBlosum45_50()
Return theBLOSUM45.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum50()
Return theBLOSUM50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum50_50()
Return theBLOSUM50.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum55()
Return theBLOSUM55
amino acid substitution matrix.static SubstitutionMatrix
getBlosum55_50()
Return theBLOSUM55.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum60()
Return theBLOSUM60
amino acid substitution matrix.static SubstitutionMatrix
getBlosum60_50()
Return theBLOSUM60.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum62()
Return theBLOSUM62
amino acid substitution matrix.static SubstitutionMatrix
getBlosum62_50()
Return theBLOSUM62.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum65()
Return theBLOSUM65
amino acid substitution matrix.static SubstitutionMatrix
getBlosum65_50()
Return theBLOSUM65.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum70()
Return theBLOSUM70
amino acid substitution matrix.static SubstitutionMatrix
getBlosum70_50()
Return theBLOSUM70.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum75()
Return theBLOSUM75
amino acid substitution matrix.static SubstitutionMatrix
getBlosum75_50()
Return theBLOSUM75.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum80()
Return theBLOSUM80
amino acid substitution matrix.static SubstitutionMatrix
getBlosum80_50()
Return theBLOSUM80.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum85()
Return theBLOSUM85
amino acid substitution matrix.static SubstitutionMatrix
getBlosum85_50()
Return theBLOSUM85.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosum90()
Return theBLOSUM90
amino acid substitution matrix.static SubstitutionMatrix
getBlosum90_50()
Return theBLOSUM90.50
amino acid substitution matrix.static SubstitutionMatrix
getBlosumn()
Return theBLOSUMN
amino acid substitution matrix.static SubstitutionMatrix
getBlosumn_50()
Return theBLOSUMN.50
amino acid substitution matrix.static SubstitutionMatrix
getDayhoff()
Return theDAYHOFF
amino acid substitution matrix.String
getDescription()
This gives you the description of this matrix if there is one.static SubstitutionMatrix
getGonnet()
Return theGONNET
amino acid substitution matrix.static SubstitutionMatrix
getIdentity()
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.String
getName()
Every substitution matrix has a name like "BLOSUM30" or "PAM160".static SubstitutionMatrix
getNuc4_2()
Return theNUC.4.2
nucleotide substitution matrix.static SubstitutionMatrix
getNuc4_4()
Return theNUC.4.4
nucleotide substitution matrix.static SubstitutionMatrix
getPam10()
Return thePAM10
amino acid substitution matrix.static SubstitutionMatrix
getPam100()
Return thePAM100
amino acid substitution matrix.static SubstitutionMatrix
getPam110()
Return thePAM110
amino acid substitution matrix.static SubstitutionMatrix
getPam120()
Return thePAM120
amino acid substitution matrix.static SubstitutionMatrix
getPam130()
Return thePAM130
amino acid substitution matrix.static SubstitutionMatrix
getPam140()
Return thePAM140
amino acid substitution matrix.static SubstitutionMatrix
getPam150()
Return thePAM150
amino acid substitution matrix.static SubstitutionMatrix
getPam160()
Return thePAM160
amino acid substitution matrix.static SubstitutionMatrix
getPam170()
Return thePAM170
amino acid substitution matrix.static SubstitutionMatrix
getPam180()
Return thePAM180
amino acid substitution matrix.static SubstitutionMatrix
getPam190()
Return thePAM190
amino acid substitution matrix.static SubstitutionMatrix
getPam20()
Return thePAM20
amino acid substitution matrix.static SubstitutionMatrix
getPam200()
Return thePAM200
amino acid substitution matrix.static SubstitutionMatrix
getPam210()
Return thePAM210
amino acid substitution matrix.static SubstitutionMatrix
getPam220()
Return thePAM220
amino acid substitution matrix.static SubstitutionMatrix
getPam230()
Return thePAM230
amino acid substitution matrix.static SubstitutionMatrix
getPam240()
Return thePAM240
amino acid substitution matrix.static SubstitutionMatrix
getPam250()
Return thePAM250
amino acid substitution matrix.static SubstitutionMatrix
getPam260()
Return thePAM260
amino acid substitution matrix.static SubstitutionMatrix
getPam270()
Return thePAM270
amino acid substitution matrix.static SubstitutionMatrix
getPam280()
Return thePAM280
amino acid substitution matrix.static SubstitutionMatrix
getPam290()
Return thePAM290
amino acid substitution matrix.static SubstitutionMatrix
getPam30()
Return thePAM30
amino acid substitution matrix.static SubstitutionMatrix
getPam300()
Return thePAM300
amino acid substitution matrix.static SubstitutionMatrix
getPam310()
Return thePAM310
amino acid substitution matrix.static SubstitutionMatrix
getPam320()
Return thePAM320
amino acid substitution matrix.static SubstitutionMatrix
getPam330()
Return thePAM330
amino acid substitution matrix.static SubstitutionMatrix
getPam340()
Return thePAM340
amino acid substitution matrix.static SubstitutionMatrix
getPam350()
Return thePAM350
amino acid substitution matrix.static SubstitutionMatrix
getPam360()
Return thePAM360
amino acid substitution matrix.static SubstitutionMatrix
getPam370()
Return thePAM370
amino acid substitution matrix.static SubstitutionMatrix
getPam380()
Return thePAM380
amino acid substitution matrix.static SubstitutionMatrix
getPam390()
Return thePAM390
amino acid substitution matrix.static SubstitutionMatrix
getPam40()
Return thePAM40
amino acid substitution matrix.static SubstitutionMatrix
getPam400()
Return thePAM400
amino acid substitution matrix.static SubstitutionMatrix
getPam410()
Return thePAM410
amino acid substitution matrix.static SubstitutionMatrix
getPam420()
Return thePAM420
amino acid substitution matrix.static SubstitutionMatrix
getPam430()
Return thePAM430
amino acid substitution matrix.static SubstitutionMatrix
getPam440()
Return thePAM440
amino acid substitution matrix.static SubstitutionMatrix
getPam450()
Return thePAM450
amino acid substitution matrix.static SubstitutionMatrix
getPam460()
Return thePAM460
amino acid substitution matrix.static SubstitutionMatrix
getPam470()
Return thePAM470
amino acid substitution matrix.static SubstitutionMatrix
getPam480()
Return thePAM480
amino acid substitution matrix.static SubstitutionMatrix
getPam490()
Return thePAM490
amino acid substitution matrix.static SubstitutionMatrix
getPam50()
Return thePAM50
amino acid substitution matrix.static SubstitutionMatrix
getPam500()
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.SubstitutionMatrix
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.void
printMatrix()
Just to perform some test.void
setDescription(String desc)
Sets the description to the given value.String
stringnifyDescription()
Converts the description of the matrix to a String.String
stringnifyMatrix()
Creates aString
representation of this matrix.String
toString()
Overrides the inherited method.
-
-
-
Constructor Detail
-
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
public SubstitutionMatrix(FiniteAlphabet alpha, short match, short replace)
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 Detail
-
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
public static SubstitutionMatrix getBlosum100()
Return theBLOSUM100
amino acid substitution matrix.- Returns:
- the
BLOSUM100
amino acid substitution matrix
-
getBlosum100_50
public static SubstitutionMatrix getBlosum100_50()
Return theBLOSUM100.50
amino acid substitution matrix.- Returns:
- the
BLOSUM100.50
amino acid substitution matrix
-
getBlosum30
public static SubstitutionMatrix getBlosum30()
Return theBLOSUM30
amino acid substitution matrix.- Returns:
- the
BLOSUM30
amino acid substitution matrix
-
getBlosum30_50
public static SubstitutionMatrix getBlosum30_50()
Return theBLOSUM30.50
amino acid substitution matrix.- Returns:
- the
BLOSUM30.50
amino acid substitution matrix
-
getBlosum35
public static SubstitutionMatrix getBlosum35()
Return theBLOSUM35
amino acid substitution matrix.- Returns:
- the
BLOSUM35
amino acid substitution matrix
-
getBlosum35_50
public static SubstitutionMatrix getBlosum35_50()
Return theBLOSUM35.50
amino acid substitution matrix.- Returns:
- the
BLOSUM35.50
amino acid substitution matrix
-
getBlosum40
public static SubstitutionMatrix getBlosum40()
Return theBLOSUM40
amino acid substitution matrix.- Returns:
- the
BLOSUM40
amino acid substitution matrix
-
getBlosum40_50
public static SubstitutionMatrix getBlosum40_50()
Return theBLOSUM40.50
amino acid substitution matrix.- Returns:
- the
BLOSUM40.50
amino acid substitution matrix
-
getBlosum45
public static SubstitutionMatrix getBlosum45()
Return theBLOSUM45
amino acid substitution matrix.- Returns:
- the
BLOSUM45
amino acid substitution matrix
-
getBlosum45_50
public static SubstitutionMatrix getBlosum45_50()
Return theBLOSUM45.50
amino acid substitution matrix.- Returns:
- the
BLOSUM45.50
amino acid substitution matrix
-
getBlosum50
public static SubstitutionMatrix getBlosum50()
Return theBLOSUM50
amino acid substitution matrix.- Returns:
- the
BLOSUM50
amino acid substitution matrix
-
getBlosum50_50
public static SubstitutionMatrix getBlosum50_50()
Return theBLOSUM50.50
amino acid substitution matrix.- Returns:
- the
BLOSUM50.50
amino acid substitution matrix
-
getBlosum55
public static SubstitutionMatrix getBlosum55()
Return theBLOSUM55
amino acid substitution matrix.- Returns:
- the
BLOSUM55
amino acid substitution matrix
-
getBlosum55_50
public static SubstitutionMatrix getBlosum55_50()
Return theBLOSUM55.50
amino acid substitution matrix.- Returns:
- the
BLOSUM55.50
amino acid substitution matrix
-
getBlosum60
public static SubstitutionMatrix getBlosum60()
Return theBLOSUM60
amino acid substitution matrix.- Returns:
- the
BLOSUM60
amino acid substitution matrix
-
getBlosum60_50
public static SubstitutionMatrix getBlosum60_50()
Return theBLOSUM60.50
amino acid substitution matrix.- Returns:
- the
BLOSUM60.50
amino acid substitution matrix
-
getBlosum62
public static SubstitutionMatrix getBlosum62()
Return theBLOSUM62
amino acid substitution matrix.- Returns:
- the
BLOSUM62
amino acid substitution matrix
-
getBlosum62_50
public static SubstitutionMatrix getBlosum62_50()
Return theBLOSUM62.50
amino acid substitution matrix.- Returns:
- the
BLOSUM62.50
amino acid substitution matrix
-
getBlosum65
public static SubstitutionMatrix getBlosum65()
Return theBLOSUM65
amino acid substitution matrix.- Returns:
- the
BLOSUM65
amino acid substitution matrix
-
getBlosum65_50
public static SubstitutionMatrix getBlosum65_50()
Return theBLOSUM65.50
amino acid substitution matrix.- Returns:
- the
BLOSUM65.50
amino acid substitution matrix
-
getBlosum70
public static SubstitutionMatrix getBlosum70()
Return theBLOSUM70
amino acid substitution matrix.- Returns:
- the
BLOSUM70
amino acid substitution matrix
-
getBlosum70_50
public static SubstitutionMatrix getBlosum70_50()
Return theBLOSUM70.50
amino acid substitution matrix.- Returns:
- the
BLOSUM70.50
amino acid substitution matrix
-
getBlosum75
public static SubstitutionMatrix getBlosum75()
Return theBLOSUM75
amino acid substitution matrix.- Returns:
- the
BLOSUM75
amino acid substitution matrix
-
getBlosum75_50
public static SubstitutionMatrix getBlosum75_50()
Return theBLOSUM75.50
amino acid substitution matrix.- Returns:
- the
BLOSUM75.50
amino acid substitution matrix
-
getBlosum80
public static SubstitutionMatrix getBlosum80()
Return theBLOSUM80
amino acid substitution matrix.- Returns:
- the
BLOSUM80
amino acid substitution matrix
-
getBlosum80_50
public static SubstitutionMatrix getBlosum80_50()
Return theBLOSUM80.50
amino acid substitution matrix.- Returns:
- the
BLOSUM80.50
amino acid substitution matrix
-
getBlosum85
public static SubstitutionMatrix getBlosum85()
Return theBLOSUM85
amino acid substitution matrix.- Returns:
- the
BLOSUM85
amino acid substitution matrix
-
getBlosum85_50
public static SubstitutionMatrix getBlosum85_50()
Return theBLOSUM85.50
amino acid substitution matrix.- Returns:
- the
BLOSUM85.50
amino acid substitution matrix
-
getBlosum90
public static SubstitutionMatrix getBlosum90()
Return theBLOSUM90
amino acid substitution matrix.- Returns:
- the
BLOSUM90
amino acid substitution matrix
-
getBlosum90_50
public static SubstitutionMatrix getBlosum90_50()
Return theBLOSUM90.50
amino acid substitution matrix.- Returns:
- the
BLOSUM90.50
amino acid substitution matrix
-
getBlosumn
public static SubstitutionMatrix getBlosumn()
Return theBLOSUMN
amino acid substitution matrix.- Returns:
- the
BLOSUMN
amino acid substitution matrix
-
getBlosumn_50
public static SubstitutionMatrix getBlosumn_50()
Return theBLOSUMN.50
amino acid substitution matrix.- Returns:
- the
BLOSUMN.50
amino acid substitution matrix
-
getDayhoff
public static SubstitutionMatrix getDayhoff()
Return theDAYHOFF
amino acid substitution matrix.- Returns:
- the
DAYHOFF
amino acid substitution matrix
-
getGonnet
public static SubstitutionMatrix getGonnet()
Return theGONNET
amino acid substitution matrix.- Returns:
- the
GONNET
amino acid substitution matrix
-
getIdentity
public static SubstitutionMatrix getIdentity()
Return theIDENTITY
amino acid substitution matrix.- Returns:
- the
IDENTITY
amino acid substitution matrix
-
getMatch
public static SubstitutionMatrix getMatch()
Return theMATCH
amino acid substitution matrix.- Returns:
- the
MATCH
amino acid substitution matrix
-
getNuc4_2
public static SubstitutionMatrix getNuc4_2()
Return theNUC.4.2
nucleotide substitution matrix.- Returns:
- the
NUC.4.2
nucleotide substitution matrix
-
getNuc4_4
public static SubstitutionMatrix getNuc4_4()
Return theNUC.4.4
nucleotide substitution matrix.- Returns:
- the
NUC.4.4
nucleotide substitution matrix
-
getPam10
public static SubstitutionMatrix getPam10()
Return thePAM10
amino acid substitution matrix.- Returns:
- the
PAM10
amino acid substitution matrix
-
getPam100
public static SubstitutionMatrix getPam100()
Return thePAM100
amino acid substitution matrix.- Returns:
- the
PAM100
amino acid substitution matrix
-
getPam110
public static SubstitutionMatrix getPam110()
Return thePAM110
amino acid substitution matrix.- Returns:
- the
PAM110
amino acid substitution matrix
-
getPam120
public static SubstitutionMatrix getPam120()
Return thePAM120
amino acid substitution matrix.- Returns:
- the
PAM120
amino acid substitution matrix
-
getPam130
public static SubstitutionMatrix getPam130()
Return thePAM130
amino acid substitution matrix.- Returns:
- the
PAM130
amino acid substitution matrix
-
getPam140
public static SubstitutionMatrix getPam140()
Return thePAM140
amino acid substitution matrix.- Returns:
- the
PAM140
amino acid substitution matrix
-
getPam150
public static SubstitutionMatrix getPam150()
Return thePAM150
amino acid substitution matrix.- Returns:
- the
PAM150
amino acid substitution matrix
-
getPam160
public static SubstitutionMatrix getPam160()
Return thePAM160
amino acid substitution matrix.- Returns:
- the
PAM160
amino acid substitution matrix
-
getPam170
public static SubstitutionMatrix getPam170()
Return thePAM170
amino acid substitution matrix.- Returns:
- the
PAM170
amino acid substitution matrix
-
getPam180
public static SubstitutionMatrix getPam180()
Return thePAM180
amino acid substitution matrix.- Returns:
- the
PAM180
amino acid substitution matrix
-
getPam190
public static SubstitutionMatrix getPam190()
Return thePAM190
amino acid substitution matrix.- Returns:
- the
PAM190
amino acid substitution matrix
-
getPam20
public static SubstitutionMatrix getPam20()
Return thePAM20
amino acid substitution matrix.- Returns:
- the
PAM20
amino acid substitution matrix
-
getPam200
public static SubstitutionMatrix getPam200()
Return thePAM200
amino acid substitution matrix.- Returns:
- the
PAM200
amino acid substitution matrix
-
getPam210
public static SubstitutionMatrix getPam210()
Return thePAM210
amino acid substitution matrix.- Returns:
- the
PAM210
amino acid substitution matrix
-
getPam220
public static SubstitutionMatrix getPam220()
Return thePAM220
amino acid substitution matrix.- Returns:
- the
PAM220
amino acid substitution matrix
-
getPam230
public static SubstitutionMatrix getPam230()
Return thePAM230
amino acid substitution matrix.- Returns:
- the
PAM230
amino acid substitution matrix
-
getPam240
public static SubstitutionMatrix getPam240()
Return thePAM240
amino acid substitution matrix.- Returns:
- the
PAM240
amino acid substitution matrix
-
getPam250
public static SubstitutionMatrix getPam250()
Return thePAM250
amino acid substitution matrix.- Returns:
- the
PAM250
amino acid substitution matrix
-
getPam260
public static SubstitutionMatrix getPam260()
Return thePAM260
amino acid substitution matrix.- Returns:
- the
PAM260
amino acid substitution matrix
-
getPam270
public static SubstitutionMatrix getPam270()
Return thePAM270
amino acid substitution matrix.- Returns:
- the
PAM270
amino acid substitution matrix
-
getPam280
public static SubstitutionMatrix getPam280()
Return thePAM280
amino acid substitution matrix.- Returns:
- the
PAM280
amino acid substitution matrix
-
getPam290
public static SubstitutionMatrix getPam290()
Return thePAM290
amino acid substitution matrix.- Returns:
- the
PAM290
amino acid substitution matrix
-
getPam30
public static SubstitutionMatrix getPam30()
Return thePAM30
amino acid substitution matrix.- Returns:
- the
PAM30
amino acid substitution matrix
-
getPam300
public static SubstitutionMatrix getPam300()
Return thePAM300
amino acid substitution matrix.- Returns:
- the
PAM300
amino acid substitution matrix
-
getPam310
public static SubstitutionMatrix getPam310()
Return thePAM310
amino acid substitution matrix.- Returns:
- the
PAM310
amino acid substitution matrix
-
getPam320
public static SubstitutionMatrix getPam320()
Return thePAM320
amino acid substitution matrix.- Returns:
- the
PAM320
amino acid substitution matrix
-
getPam330
public static SubstitutionMatrix getPam330()
Return thePAM330
amino acid substitution matrix.- Returns:
- the
PAM330
amino acid substitution matrix
-
getPam340
public static SubstitutionMatrix getPam340()
Return thePAM340
amino acid substitution matrix.- Returns:
- the
PAM340
amino acid substitution matrix
-
getPam350
public static SubstitutionMatrix getPam350()
Return thePAM350
amino acid substitution matrix.- Returns:
- the
PAM350
amino acid substitution matrix
-
getPam360
public static SubstitutionMatrix getPam360()
Return thePAM360
amino acid substitution matrix.- Returns:
- the
PAM360
amino acid substitution matrix
-
getPam370
public static SubstitutionMatrix getPam370()
Return thePAM370
amino acid substitution matrix.- Returns:
- the
PAM370
amino acid substitution matrix
-
getPam380
public static SubstitutionMatrix getPam380()
Return thePAM380
amino acid substitution matrix.- Returns:
- the
PAM380
amino acid substitution matrix
-
getPam390
public static SubstitutionMatrix getPam390()
Return thePAM390
amino acid substitution matrix.- Returns:
- the
PAM390
amino acid substitution matrix
-
getPam40
public static SubstitutionMatrix getPam40()
Return thePAM40
amino acid substitution matrix.- Returns:
- the
PAM40
amino acid substitution matrix
-
getPam400
public static SubstitutionMatrix getPam400()
Return thePAM400
amino acid substitution matrix.- Returns:
- the
PAM400
amino acid substitution matrix
-
getPam410
public static SubstitutionMatrix getPam410()
Return thePAM410
amino acid substitution matrix.- Returns:
- the
PAM410
amino acid substitution matrix
-
getPam420
public static SubstitutionMatrix getPam420()
Return thePAM420
amino acid substitution matrix.- Returns:
- the
PAM420
amino acid substitution matrix
-
getPam430
public static SubstitutionMatrix getPam430()
Return thePAM430
amino acid substitution matrix.- Returns:
- the
PAM430
amino acid substitution matrix
-
getPam440
public static SubstitutionMatrix getPam440()
Return thePAM440
amino acid substitution matrix.- Returns:
- the
PAM440
amino acid substitution matrix
-
getPam450
public static SubstitutionMatrix getPam450()
Return thePAM450
amino acid substitution matrix.- Returns:
- the
PAM450
amino acid substitution matrix
-
getPam460
public static SubstitutionMatrix getPam460()
Return thePAM460
amino acid substitution matrix.- Returns:
- the
PAM460
amino acid substitution matrix
-
getPam470
public static SubstitutionMatrix getPam470()
Return thePAM470
amino acid substitution matrix.- Returns:
- the
PAM470
amino acid substitution matrix
-
getPam480
public static SubstitutionMatrix getPam480()
Return thePAM480
amino acid substitution matrix.- Returns:
- the
PAM480
amino acid substitution matrix
-
getPam490
public static SubstitutionMatrix getPam490()
Return thePAM490
amino acid substitution matrix.- Returns:
- the
PAM490
amino acid substitution matrix
-
getPam50
public static SubstitutionMatrix getPam50()
Return thePAM50
amino acid substitution matrix.- Returns:
- the
PAM50
amino acid substitution matrix
-
getPam500
public static SubstitutionMatrix getPam500()
Return thePAM500
amino acid substitution matrix.- Returns:
- the
PAM500
amino acid substitution matrix
-
getPam60
public static SubstitutionMatrix getPam60()
Return thePAM60
amino acid substitution matrix.- Returns:
- the
PAM60
amino acid substitution matrix
-
getPam70
public static SubstitutionMatrix getPam70()
Return thePAM70
amino acid substitution matrix.- Returns:
- the
PAM70
amino acid substitution matrix
-
getPam80
public static SubstitutionMatrix getPam80()
Return thePAM80
amino acid substitution matrix.- Returns:
- the
PAM80
amino acid substitution matrix
-
getPam90
public static SubstitutionMatrix getPam90()
Return thePAM90
amino acid substitution matrix.- Returns:
- the
PAM90
amino acid substitution matrix
-
getValueAt
public short getValueAt(Symbol row, Symbol col) throws BioException
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
public String 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
public String 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
public short getMin()
The minimum score of this matrix.- Returns:
- minimum of the matrix.
-
getMax
public short getMax()
The maximum score in this matrix.- Returns:
- maximum of the matrix.
-
setDescription
public void setDescription(String desc)
Sets the description to the given value.- Parameters:
desc
- a description. This doesn't have to start with '#'.
-
getAlphabet
public FiniteAlphabet getAlphabet()
Gives the alphabet used by this matrix.- Returns:
- the alphabet of this matrix.
-
stringnifyMatrix
public String stringnifyMatrix()
Creates aString
representation of this matrix.- Returns:
- a string representation of this matrix without the description.
-
stringnifyDescription
public String 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#
.
-
printMatrix
public void printMatrix()
Just to perform some test. It prints the matrix on the screen.
-
normalizeMatrix
public SubstitutionMatrix normalizeMatrix() throws BioException, NumberFormatException, IOException
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
-
-