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
getValueAtwith 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 specifiedSymbols anExceptionis 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 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FiniteAlphabetgetAlphabet()Gives the alphabet used by this matrix.static SubstitutionMatrixgetBlosum100()Return theBLOSUM100amino acid substitution matrix.static SubstitutionMatrixgetBlosum100_50()Return theBLOSUM100.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum30()Return theBLOSUM30amino acid substitution matrix.static SubstitutionMatrixgetBlosum30_50()Return theBLOSUM30.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum35()Return theBLOSUM35amino acid substitution matrix.static SubstitutionMatrixgetBlosum35_50()Return theBLOSUM35.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum40()Return theBLOSUM40amino acid substitution matrix.static SubstitutionMatrixgetBlosum40_50()Return theBLOSUM40.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum45()Return theBLOSUM45amino acid substitution matrix.static SubstitutionMatrixgetBlosum45_50()Return theBLOSUM45.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum50()Return theBLOSUM50amino acid substitution matrix.static SubstitutionMatrixgetBlosum50_50()Return theBLOSUM50.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum55()Return theBLOSUM55amino acid substitution matrix.static SubstitutionMatrixgetBlosum55_50()Return theBLOSUM55.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum60()Return theBLOSUM60amino acid substitution matrix.static SubstitutionMatrixgetBlosum60_50()Return theBLOSUM60.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum62()Return theBLOSUM62amino acid substitution matrix.static SubstitutionMatrixgetBlosum62_50()Return theBLOSUM62.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum65()Return theBLOSUM65amino acid substitution matrix.static SubstitutionMatrixgetBlosum65_50()Return theBLOSUM65.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum70()Return theBLOSUM70amino acid substitution matrix.static SubstitutionMatrixgetBlosum70_50()Return theBLOSUM70.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum75()Return theBLOSUM75amino acid substitution matrix.static SubstitutionMatrixgetBlosum75_50()Return theBLOSUM75.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum80()Return theBLOSUM80amino acid substitution matrix.static SubstitutionMatrixgetBlosum80_50()Return theBLOSUM80.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum85()Return theBLOSUM85amino acid substitution matrix.static SubstitutionMatrixgetBlosum85_50()Return theBLOSUM85.50amino acid substitution matrix.static SubstitutionMatrixgetBlosum90()Return theBLOSUM90amino acid substitution matrix.static SubstitutionMatrixgetBlosum90_50()Return theBLOSUM90.50amino acid substitution matrix.static SubstitutionMatrixgetBlosumn()Return theBLOSUMNamino acid substitution matrix.static SubstitutionMatrixgetBlosumn_50()Return theBLOSUMN.50amino acid substitution matrix.static SubstitutionMatrixgetDayhoff()Return theDAYHOFFamino acid substitution matrix.StringgetDescription()This gives you the description of this matrix if there is one.static SubstitutionMatrixgetGonnet()Return theGONNETamino acid substitution matrix.static SubstitutionMatrixgetIdentity()Return 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.StringgetName()Every substitution matrix has a name like "BLOSUM30" or "PAM160".static SubstitutionMatrixgetNuc4_2()Return theNUC.4.2nucleotide substitution matrix.static SubstitutionMatrixgetNuc4_4()Return theNUC.4.4nucleotide substitution matrix.static SubstitutionMatrixgetPam10()Return thePAM10amino acid substitution matrix.static SubstitutionMatrixgetPam100()Return thePAM100amino acid substitution matrix.static SubstitutionMatrixgetPam110()Return thePAM110amino acid substitution matrix.static SubstitutionMatrixgetPam120()Return thePAM120amino acid substitution matrix.static SubstitutionMatrixgetPam130()Return thePAM130amino acid substitution matrix.static SubstitutionMatrixgetPam140()Return thePAM140amino acid substitution matrix.static SubstitutionMatrixgetPam150()Return thePAM150amino acid substitution matrix.static SubstitutionMatrixgetPam160()Return thePAM160amino acid substitution matrix.static SubstitutionMatrixgetPam170()Return thePAM170amino acid substitution matrix.static SubstitutionMatrixgetPam180()Return thePAM180amino acid substitution matrix.static SubstitutionMatrixgetPam190()Return thePAM190amino acid substitution matrix.static SubstitutionMatrixgetPam20()Return thePAM20amino acid substitution matrix.static SubstitutionMatrixgetPam200()Return thePAM200amino acid substitution matrix.static SubstitutionMatrixgetPam210()Return thePAM210amino acid substitution matrix.static SubstitutionMatrixgetPam220()Return thePAM220amino acid substitution matrix.static SubstitutionMatrixgetPam230()Return thePAM230amino acid substitution matrix.static SubstitutionMatrixgetPam240()Return thePAM240amino acid substitution matrix.static SubstitutionMatrixgetPam250()Return thePAM250amino acid substitution matrix.static SubstitutionMatrixgetPam260()Return thePAM260amino acid substitution matrix.static SubstitutionMatrixgetPam270()Return thePAM270amino acid substitution matrix.static SubstitutionMatrixgetPam280()Return thePAM280amino acid substitution matrix.static SubstitutionMatrixgetPam290()Return thePAM290amino acid substitution matrix.static SubstitutionMatrixgetPam30()Return thePAM30amino acid substitution matrix.static SubstitutionMatrixgetPam300()Return thePAM300amino acid substitution matrix.static SubstitutionMatrixgetPam310()Return thePAM310amino acid substitution matrix.static SubstitutionMatrixgetPam320()Return thePAM320amino acid substitution matrix.static SubstitutionMatrixgetPam330()Return thePAM330amino acid substitution matrix.static SubstitutionMatrixgetPam340()Return thePAM340amino acid substitution matrix.static SubstitutionMatrixgetPam350()Return thePAM350amino acid substitution matrix.static SubstitutionMatrixgetPam360()Return thePAM360amino acid substitution matrix.static SubstitutionMatrixgetPam370()Return thePAM370amino acid substitution matrix.static SubstitutionMatrixgetPam380()Return thePAM380amino acid substitution matrix.static SubstitutionMatrixgetPam390()Return thePAM390amino acid substitution matrix.static SubstitutionMatrixgetPam40()Return thePAM40amino acid substitution matrix.static SubstitutionMatrixgetPam400()Return thePAM400amino acid substitution matrix.static SubstitutionMatrixgetPam410()Return thePAM410amino acid substitution matrix.static SubstitutionMatrixgetPam420()Return thePAM420amino acid substitution matrix.static SubstitutionMatrixgetPam430()Return thePAM430amino acid substitution matrix.static SubstitutionMatrixgetPam440()Return thePAM440amino acid substitution matrix.static SubstitutionMatrixgetPam450()Return thePAM450amino acid substitution matrix.static SubstitutionMatrixgetPam460()Return thePAM460amino acid substitution matrix.static SubstitutionMatrixgetPam470()Return thePAM470amino acid substitution matrix.static SubstitutionMatrixgetPam480()Return thePAM480amino acid substitution matrix.static SubstitutionMatrixgetPam490()Return thePAM490amino acid substitution matrix.static SubstitutionMatrixgetPam50()Return thePAM50amino acid substitution matrix.static SubstitutionMatrixgetPam500()Return 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.SubstitutionMatrixnormalizeMatrix()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.voidprintMatrix()Just to perform some test.voidsetDescription(String desc)Sets the description to the given value.StringstringnifyDescription()Converts the description of the matrix to a String.StringstringnifyMatrix()Creates aStringrepresentation of this matrix.StringtoString()Overrides the inherited method.
-
-
-
Constructor Detail
-
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
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:
NumberFormatExceptionNoSuchElementExceptionBioExceptionIOException
-
-
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:
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
public static SubstitutionMatrix getBlosum100()
Return theBLOSUM100amino acid substitution matrix.- Returns:
- the
BLOSUM100amino acid substitution matrix
-
getBlosum100_50
public static SubstitutionMatrix getBlosum100_50()
Return theBLOSUM100.50amino acid substitution matrix.- Returns:
- the
BLOSUM100.50amino acid substitution matrix
-
getBlosum30
public static SubstitutionMatrix getBlosum30()
Return theBLOSUM30amino acid substitution matrix.- Returns:
- the
BLOSUM30amino acid substitution matrix
-
getBlosum30_50
public static SubstitutionMatrix getBlosum30_50()
Return theBLOSUM30.50amino acid substitution matrix.- Returns:
- the
BLOSUM30.50amino acid substitution matrix
-
getBlosum35
public static SubstitutionMatrix getBlosum35()
Return theBLOSUM35amino acid substitution matrix.- Returns:
- the
BLOSUM35amino acid substitution matrix
-
getBlosum35_50
public static SubstitutionMatrix getBlosum35_50()
Return theBLOSUM35.50amino acid substitution matrix.- Returns:
- the
BLOSUM35.50amino acid substitution matrix
-
getBlosum40
public static SubstitutionMatrix getBlosum40()
Return theBLOSUM40amino acid substitution matrix.- Returns:
- the
BLOSUM40amino acid substitution matrix
-
getBlosum40_50
public static SubstitutionMatrix getBlosum40_50()
Return theBLOSUM40.50amino acid substitution matrix.- Returns:
- the
BLOSUM40.50amino acid substitution matrix
-
getBlosum45
public static SubstitutionMatrix getBlosum45()
Return theBLOSUM45amino acid substitution matrix.- Returns:
- the
BLOSUM45amino acid substitution matrix
-
getBlosum45_50
public static SubstitutionMatrix getBlosum45_50()
Return theBLOSUM45.50amino acid substitution matrix.- Returns:
- the
BLOSUM45.50amino acid substitution matrix
-
getBlosum50
public static SubstitutionMatrix getBlosum50()
Return theBLOSUM50amino acid substitution matrix.- Returns:
- the
BLOSUM50amino acid substitution matrix
-
getBlosum50_50
public static SubstitutionMatrix getBlosum50_50()
Return theBLOSUM50.50amino acid substitution matrix.- Returns:
- the
BLOSUM50.50amino acid substitution matrix
-
getBlosum55
public static SubstitutionMatrix getBlosum55()
Return theBLOSUM55amino acid substitution matrix.- Returns:
- the
BLOSUM55amino acid substitution matrix
-
getBlosum55_50
public static SubstitutionMatrix getBlosum55_50()
Return theBLOSUM55.50amino acid substitution matrix.- Returns:
- the
BLOSUM55.50amino acid substitution matrix
-
getBlosum60
public static SubstitutionMatrix getBlosum60()
Return theBLOSUM60amino acid substitution matrix.- Returns:
- the
BLOSUM60amino acid substitution matrix
-
getBlosum60_50
public static SubstitutionMatrix getBlosum60_50()
Return theBLOSUM60.50amino acid substitution matrix.- Returns:
- the
BLOSUM60.50amino acid substitution matrix
-
getBlosum62
public static SubstitutionMatrix getBlosum62()
Return theBLOSUM62amino acid substitution matrix.- Returns:
- the
BLOSUM62amino acid substitution matrix
-
getBlosum62_50
public static SubstitutionMatrix getBlosum62_50()
Return theBLOSUM62.50amino acid substitution matrix.- Returns:
- the
BLOSUM62.50amino acid substitution matrix
-
getBlosum65
public static SubstitutionMatrix getBlosum65()
Return theBLOSUM65amino acid substitution matrix.- Returns:
- the
BLOSUM65amino acid substitution matrix
-
getBlosum65_50
public static SubstitutionMatrix getBlosum65_50()
Return theBLOSUM65.50amino acid substitution matrix.- Returns:
- the
BLOSUM65.50amino acid substitution matrix
-
getBlosum70
public static SubstitutionMatrix getBlosum70()
Return theBLOSUM70amino acid substitution matrix.- Returns:
- the
BLOSUM70amino acid substitution matrix
-
getBlosum70_50
public static SubstitutionMatrix getBlosum70_50()
Return theBLOSUM70.50amino acid substitution matrix.- Returns:
- the
BLOSUM70.50amino acid substitution matrix
-
getBlosum75
public static SubstitutionMatrix getBlosum75()
Return theBLOSUM75amino acid substitution matrix.- Returns:
- the
BLOSUM75amino acid substitution matrix
-
getBlosum75_50
public static SubstitutionMatrix getBlosum75_50()
Return theBLOSUM75.50amino acid substitution matrix.- Returns:
- the
BLOSUM75.50amino acid substitution matrix
-
getBlosum80
public static SubstitutionMatrix getBlosum80()
Return theBLOSUM80amino acid substitution matrix.- Returns:
- the
BLOSUM80amino acid substitution matrix
-
getBlosum80_50
public static SubstitutionMatrix getBlosum80_50()
Return theBLOSUM80.50amino acid substitution matrix.- Returns:
- the
BLOSUM80.50amino acid substitution matrix
-
getBlosum85
public static SubstitutionMatrix getBlosum85()
Return theBLOSUM85amino acid substitution matrix.- Returns:
- the
BLOSUM85amino acid substitution matrix
-
getBlosum85_50
public static SubstitutionMatrix getBlosum85_50()
Return theBLOSUM85.50amino acid substitution matrix.- Returns:
- the
BLOSUM85.50amino acid substitution matrix
-
getBlosum90
public static SubstitutionMatrix getBlosum90()
Return theBLOSUM90amino acid substitution matrix.- Returns:
- the
BLOSUM90amino acid substitution matrix
-
getBlosum90_50
public static SubstitutionMatrix getBlosum90_50()
Return theBLOSUM90.50amino acid substitution matrix.- Returns:
- the
BLOSUM90.50amino acid substitution matrix
-
getBlosumn
public static SubstitutionMatrix getBlosumn()
Return theBLOSUMNamino acid substitution matrix.- Returns:
- the
BLOSUMNamino acid substitution matrix
-
getBlosumn_50
public static SubstitutionMatrix getBlosumn_50()
Return theBLOSUMN.50amino acid substitution matrix.- Returns:
- the
BLOSUMN.50amino acid substitution matrix
-
getDayhoff
public static SubstitutionMatrix getDayhoff()
Return theDAYHOFFamino acid substitution matrix.- Returns:
- the
DAYHOFFamino acid substitution matrix
-
getGonnet
public static SubstitutionMatrix getGonnet()
Return theGONNETamino acid substitution matrix.- Returns:
- the
GONNETamino acid substitution matrix
-
getIdentity
public static SubstitutionMatrix getIdentity()
Return theIDENTITYamino acid substitution matrix.- Returns:
- the
IDENTITYamino acid substitution matrix
-
getMatch
public static SubstitutionMatrix getMatch()
Return theMATCHamino acid substitution matrix.- Returns:
- the
MATCHamino acid substitution matrix
-
getNuc4_2
public static SubstitutionMatrix getNuc4_2()
Return theNUC.4.2nucleotide substitution matrix.- Returns:
- the
NUC.4.2nucleotide substitution matrix
-
getNuc4_4
public static SubstitutionMatrix getNuc4_4()
Return theNUC.4.4nucleotide substitution matrix.- Returns:
- the
NUC.4.4nucleotide substitution matrix
-
getPam10
public static SubstitutionMatrix getPam10()
Return thePAM10amino acid substitution matrix.- Returns:
- the
PAM10amino acid substitution matrix
-
getPam100
public static SubstitutionMatrix getPam100()
Return thePAM100amino acid substitution matrix.- Returns:
- the
PAM100amino acid substitution matrix
-
getPam110
public static SubstitutionMatrix getPam110()
Return thePAM110amino acid substitution matrix.- Returns:
- the
PAM110amino acid substitution matrix
-
getPam120
public static SubstitutionMatrix getPam120()
Return thePAM120amino acid substitution matrix.- Returns:
- the
PAM120amino acid substitution matrix
-
getPam130
public static SubstitutionMatrix getPam130()
Return thePAM130amino acid substitution matrix.- Returns:
- the
PAM130amino acid substitution matrix
-
getPam140
public static SubstitutionMatrix getPam140()
Return thePAM140amino acid substitution matrix.- Returns:
- the
PAM140amino acid substitution matrix
-
getPam150
public static SubstitutionMatrix getPam150()
Return thePAM150amino acid substitution matrix.- Returns:
- the
PAM150amino acid substitution matrix
-
getPam160
public static SubstitutionMatrix getPam160()
Return thePAM160amino acid substitution matrix.- Returns:
- the
PAM160amino acid substitution matrix
-
getPam170
public static SubstitutionMatrix getPam170()
Return thePAM170amino acid substitution matrix.- Returns:
- the
PAM170amino acid substitution matrix
-
getPam180
public static SubstitutionMatrix getPam180()
Return thePAM180amino acid substitution matrix.- Returns:
- the
PAM180amino acid substitution matrix
-
getPam190
public static SubstitutionMatrix getPam190()
Return thePAM190amino acid substitution matrix.- Returns:
- the
PAM190amino acid substitution matrix
-
getPam20
public static SubstitutionMatrix getPam20()
Return thePAM20amino acid substitution matrix.- Returns:
- the
PAM20amino acid substitution matrix
-
getPam200
public static SubstitutionMatrix getPam200()
Return thePAM200amino acid substitution matrix.- Returns:
- the
PAM200amino acid substitution matrix
-
getPam210
public static SubstitutionMatrix getPam210()
Return thePAM210amino acid substitution matrix.- Returns:
- the
PAM210amino acid substitution matrix
-
getPam220
public static SubstitutionMatrix getPam220()
Return thePAM220amino acid substitution matrix.- Returns:
- the
PAM220amino acid substitution matrix
-
getPam230
public static SubstitutionMatrix getPam230()
Return thePAM230amino acid substitution matrix.- Returns:
- the
PAM230amino acid substitution matrix
-
getPam240
public static SubstitutionMatrix getPam240()
Return thePAM240amino acid substitution matrix.- Returns:
- the
PAM240amino acid substitution matrix
-
getPam250
public static SubstitutionMatrix getPam250()
Return thePAM250amino acid substitution matrix.- Returns:
- the
PAM250amino acid substitution matrix
-
getPam260
public static SubstitutionMatrix getPam260()
Return thePAM260amino acid substitution matrix.- Returns:
- the
PAM260amino acid substitution matrix
-
getPam270
public static SubstitutionMatrix getPam270()
Return thePAM270amino acid substitution matrix.- Returns:
- the
PAM270amino acid substitution matrix
-
getPam280
public static SubstitutionMatrix getPam280()
Return thePAM280amino acid substitution matrix.- Returns:
- the
PAM280amino acid substitution matrix
-
getPam290
public static SubstitutionMatrix getPam290()
Return thePAM290amino acid substitution matrix.- Returns:
- the
PAM290amino acid substitution matrix
-
getPam30
public static SubstitutionMatrix getPam30()
Return thePAM30amino acid substitution matrix.- Returns:
- the
PAM30amino acid substitution matrix
-
getPam300
public static SubstitutionMatrix getPam300()
Return thePAM300amino acid substitution matrix.- Returns:
- the
PAM300amino acid substitution matrix
-
getPam310
public static SubstitutionMatrix getPam310()
Return thePAM310amino acid substitution matrix.- Returns:
- the
PAM310amino acid substitution matrix
-
getPam320
public static SubstitutionMatrix getPam320()
Return thePAM320amino acid substitution matrix.- Returns:
- the
PAM320amino acid substitution matrix
-
getPam330
public static SubstitutionMatrix getPam330()
Return thePAM330amino acid substitution matrix.- Returns:
- the
PAM330amino acid substitution matrix
-
getPam340
public static SubstitutionMatrix getPam340()
Return thePAM340amino acid substitution matrix.- Returns:
- the
PAM340amino acid substitution matrix
-
getPam350
public static SubstitutionMatrix getPam350()
Return thePAM350amino acid substitution matrix.- Returns:
- the
PAM350amino acid substitution matrix
-
getPam360
public static SubstitutionMatrix getPam360()
Return thePAM360amino acid substitution matrix.- Returns:
- the
PAM360amino acid substitution matrix
-
getPam370
public static SubstitutionMatrix getPam370()
Return thePAM370amino acid substitution matrix.- Returns:
- the
PAM370amino acid substitution matrix
-
getPam380
public static SubstitutionMatrix getPam380()
Return thePAM380amino acid substitution matrix.- Returns:
- the
PAM380amino acid substitution matrix
-
getPam390
public static SubstitutionMatrix getPam390()
Return thePAM390amino acid substitution matrix.- Returns:
- the
PAM390amino acid substitution matrix
-
getPam40
public static SubstitutionMatrix getPam40()
Return thePAM40amino acid substitution matrix.- Returns:
- the
PAM40amino acid substitution matrix
-
getPam400
public static SubstitutionMatrix getPam400()
Return thePAM400amino acid substitution matrix.- Returns:
- the
PAM400amino acid substitution matrix
-
getPam410
public static SubstitutionMatrix getPam410()
Return thePAM410amino acid substitution matrix.- Returns:
- the
PAM410amino acid substitution matrix
-
getPam420
public static SubstitutionMatrix getPam420()
Return thePAM420amino acid substitution matrix.- Returns:
- the
PAM420amino acid substitution matrix
-
getPam430
public static SubstitutionMatrix getPam430()
Return thePAM430amino acid substitution matrix.- Returns:
- the
PAM430amino acid substitution matrix
-
getPam440
public static SubstitutionMatrix getPam440()
Return thePAM440amino acid substitution matrix.- Returns:
- the
PAM440amino acid substitution matrix
-
getPam450
public static SubstitutionMatrix getPam450()
Return thePAM450amino acid substitution matrix.- Returns:
- the
PAM450amino acid substitution matrix
-
getPam460
public static SubstitutionMatrix getPam460()
Return thePAM460amino acid substitution matrix.- Returns:
- the
PAM460amino acid substitution matrix
-
getPam470
public static SubstitutionMatrix getPam470()
Return thePAM470amino acid substitution matrix.- Returns:
- the
PAM470amino acid substitution matrix
-
getPam480
public static SubstitutionMatrix getPam480()
Return thePAM480amino acid substitution matrix.- Returns:
- the
PAM480amino acid substitution matrix
-
getPam490
public static SubstitutionMatrix getPam490()
Return thePAM490amino acid substitution matrix.- Returns:
- the
PAM490amino acid substitution matrix
-
getPam50
public static SubstitutionMatrix getPam50()
Return thePAM50amino acid substitution matrix.- Returns:
- the
PAM50amino acid substitution matrix
-
getPam500
public static SubstitutionMatrix getPam500()
Return thePAM500amino acid substitution matrix.- Returns:
- the
PAM500amino acid substitution matrix
-
getPam60
public static SubstitutionMatrix getPam60()
Return thePAM60amino acid substitution matrix.- Returns:
- the
PAM60amino acid substitution matrix
-
getPam70
public static SubstitutionMatrix getPam70()
Return thePAM70amino acid substitution matrix.- Returns:
- the
PAM70amino acid substitution matrix
-
getPam80
public static SubstitutionMatrix getPam80()
Return thePAM80amino acid substitution matrix.- Returns:
- the
PAM80amino acid substitution matrix
-
getPam90
public static SubstitutionMatrix getPam90()
Return thePAM90amino acid substitution matrix.- Returns:
- the
PAM90amino 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 aStringrepresentation 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”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
-
-