Class AaSubstitutionMatrix
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.variants.AaSubstitutionMatrix
- All Implemented Interfaces:
Serializable
public class AaSubstitutionMatrix extends ExperimentObject
Matrix of amino acid substitutions. This class contains pre-implemented
matrices.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static AaSubstitutionMatrix
allSubstitutions
Substitution matrix allowing all substitutions.static AaSubstitutionMatrix[]
defaultMutationMatrices
Returns the implemented default substitution matrices.static AaSubstitutionMatrix
noSubstitution
Empty substitution matrix.static AaSubstitutionMatrix
singleBaseSubstitution
Substitution matrix allowing for a single base substitution.static AaSubstitutionMatrix
synonymousVariant
Substitution matrix grouping synonymous amino acids.static AaSubstitutionMatrix
transitionsSingleBaseSubstitution
Substitution matrix allowing for a single base transition variant.static AaSubstitutionMatrix
transversalSingleBaseSubstitution
Substitution matrix allowing for a single base transversion variant. -
Constructor Summary
Constructors Constructor Description AaSubstitutionMatrix()
Empty default constructorAaSubstitutionMatrix(String name, String description)
Constructor. -
Method Summary
Modifier and Type Method Description void
add(AaSubstitutionMatrix otherMatrix)
Adds the content of a substitution matrix in this matrix.void
addSubstitution(Character originalAa, Character substitutionAa)
Adds a possible substitution.String
getDescription()
Returns the description of this substitution matrix.String
getName()
Returns the name of this substitution matrix.HashSet<Character>
getOriginalAminoAcids()
Returns the amino acids where a substitution has been registered.HashSet<Character>
getOriginalAminoAcids(Character substitutedAminoAcid)
Returns the possible original amino acids for the given substituted amino acid as a list of their single letter code.HashSet<Character>
getSubstitutionAminoAcids()
Returns the possible substituted amino acids.HashSet<Character>
getSubstitutionAminoAcids(Character originalAminoAcid)
Returns the possible substituted amino acids for the given amino acid as a list of their single letter code.boolean
isSameAs(AaSubstitutionMatrix aaSubstitutionMatrix)
Indicates whether the given AaSubstitutionMatrix is the same as this one.void
setDescription(String description)
Sets the description of this substitution matrix.void
setName(String name)
Sets the name of this substitution matrix.String
toString()
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
noSubstitution
Empty substitution matrix. -
singleBaseSubstitution
Substitution matrix allowing for a single base substitution. -
transitionsSingleBaseSubstitution
Substitution matrix allowing for a single base transition variant. -
transversalSingleBaseSubstitution
Substitution matrix allowing for a single base transversion variant. -
allSubstitutions
Substitution matrix allowing all substitutions. -
synonymousVariant
Substitution matrix grouping synonymous amino acids. Amino acids are grouped according to their side chain properties: - Non-polar aliphatic groups: {'G', 'A', 'V', 'L', 'M', 'I'} - Aromatic groups: {'F', 'Y', 'W'} - Polar neutral groups: {'S', 'T', 'C', 'P', 'N', 'Q'} - Basic groups: {'K', 'R', 'H'} - Acidic groups: {'D', 'E'}. -
defaultMutationMatrices
Returns the implemented default substitution matrices.
-
-
Constructor Details
-
AaSubstitutionMatrix
public AaSubstitutionMatrix()Empty default constructor -
AaSubstitutionMatrix
Constructor.- Parameters:
name
- the name of this substitution matrixdescription
- the description of the substitution matrix
-
-
Method Details
-
addSubstitution
Adds a possible substitution.- Parameters:
originalAa
- the original amino acid represented by its single letter codesubstitutionAa
- the substituted amino acid represented by its single letter code
-
getSubstitutionAminoAcids
Returns the possible substituted amino acids for the given amino acid as a list of their single letter code. Null if none found.- Parameters:
originalAminoAcid
- the amino acid of interest- Returns:
- the possible substituted amino acids
-
getOriginalAminoAcids
Returns the possible original amino acids for the given substituted amino acid as a list of their single letter code. Null if none found.- Parameters:
substitutedAminoAcid
- the substitution amino acid of interest- Returns:
- the possible original amino acids for the given substituted amino acid
-
getOriginalAminoAcids
Returns the amino acids where a substitution has been registered.- Returns:
- the amino acids where a substitution has been registered
-
getSubstitutionAminoAcids
Returns the possible substituted amino acids.- Returns:
- the possible substituted amino acids
-
add
Adds the content of a substitution matrix in this matrix.- Parameters:
otherMatrix
- the other matrix to add
-
getName
Returns the name of this substitution matrix.- Returns:
- the name of this substitution matrix
-
setName
Sets the name of this substitution matrix.- Parameters:
name
- the name of this substitution matrix
-
getDescription
Returns the description of this substitution matrix.- Returns:
- the description of this substitution matrix
-
setDescription
Sets the description of this substitution matrix.- Parameters:
description
- the description of this substitution matrix
-
isSameAs
Indicates whether the given AaSubstitutionMatrix is the same as this one.- Parameters:
aaSubstitutionMatrix
- the substitution matrix- Returns:
- a boolean indicating whether the given AaSubstitutionMatrix is the same as this one
-
toString
-