Class AminoAcid
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.aminoacids.AminoAcid
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Alanine
,Arginine
,Asparagine
,AsparticAcid
,B
,Cysteine
,GlutamicAcid
,Glutamine
,Glycine
,Histidine
,Isoleucine
,J
,Leucine
,Lysine
,Methionine
,Phenylalanine
,Proline
,Pyrrolysine
,Selenocysteine
,Serine
,Threonine
,Tryptophan
,Tyrosine
,Valine
,X
,Z
public abstract class AminoAcid extends ExperimentObject
Class representing amino acids.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AminoAcid.Property
Properties of the amino acids. -
Field Summary
Fields Modifier and Type Field Description static AminoAcid
A
static String[]
AMINO_ACID_STRINGS
The amino acid one letter codes as string array.protected char[]
aminoAcidCombinations
The amino acid combinations.static AminoAcid
B
static AminoAcid
C
static AminoAcid
D
static AminoAcid
E
static AminoAcid
F
static AminoAcid
G
static AminoAcid
H
static AminoAcid
I
static AminoAcid
J
static AminoAcid
K
static AminoAcid
L
static AminoAcid
M
protected AtomChain
monoisotopicAtomChain
The monoisotopic atom chain.static AminoAcid
N
String
name
Name of the amino acid.static AminoAcid
O
static AminoAcid
P
static AminoAcid
Q
static AminoAcid
R
static AminoAcid
S
String
singleLetterCode
Single letter code of the amino acid.protected String[]
standardGeneticCode
The standard genetic code.protected char[]
subAminoAcidsWithCombination
The sub amino acids with combination.protected char[]
subAminoAcidsWithoutCombination
The sub amino acids without combination.static AminoAcid
T
String
threeLetterCode
Three letter code of the amino acid.static AminoAcid
U
static AminoAcid
V
static AminoAcid
W
static AminoAcid
X
static AminoAcid
Y
static AminoAcid
Z
-
Constructor Summary
Constructors Constructor Description AminoAcid()
Empty default constructor. -
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
static AminoAcid
getAminoAcid(char aa)
Returns the amino acid corresponding to the single letter code given.static AminoAcid
getAminoAcid(String aa)
Returns the amino acid corresponding to the letter given.static AminoAcid
getAminoAcidFromGeneticCode(String geneticCode)
Returns the amino acid from the standard genetic code.static char[]
getAminoAcids()
Convenience method returning an array of all implemented amino acids represented by their singe letter code.static List<String>
getAminoAcidsList()
Convenience method returning an arrayList of all implemented amino acids.abstract double
getBasicity()
Returns the basicity according to PMID 14730315.char[]
getCombinations()
Returns the amino acids combinations which might represent this amino acid.abstract double
getHelicity()
Returns the helicity according to PMID 14730315.abstract double
getHydrophobicity()
Returns the hydrophobicity according to PMID 14730315.static int
getIndex(char aa)
Returns an index for the amino acid excluding combinations.static char
getMatchingAminoAcid(char aa, SequenceMatchingParameters sequenceMatchingPreferences)
Returns a matching amino acid using the given preferences.static String
getMatchingSequence(String sequence, SequenceMatchingParameters sequenceMatchingPreferences)
Returns the matching sequence of a given sequence.AtomChain
getMonoisotopicAtomChain()
Returns the monoisotopic atom chain representing this amino acid.double
getMonoisotopicMass()
Returns the mass of the amino acid.static int
getNUnique()
Returns the number of amino acids excluding combinations.abstract double
getPI()
Returns the pI.abstract double
getPK1()
Returns the pK1.abstract double
getPK2()
Returns the pK2.abstract double
getPKa()
Returns the pKa.double
getProperty(AminoAcid.Property property)
Returns a property of the amino acid.char
getSingleLetterCodeAsChar()
Returns the single letter code as character.String[]
getStandardGeneticCode()
Returns the standard genetic triplets associated to this amino acid.protected String[]
getStandardGeneticCodeForCombination()
Returns the genetic code as combination of the sub amino acid genetic codes.char[]
getSubAminoAcids()
In case of a combination of amino acids, returns the comprised amino acids or amino acid groups represented by their single letter code including sub combinations.char[]
getSubAminoAcids(boolean includeCombinations)
In case of a combination of amino acids, returns the comprised amino acids or amino acid groups represented by their single letter code.static char[]
getUniqueAminoAcids()
Returns a char array of the one letter code of amino acids without combinations of amino acids.static int
getUniqueIndex(char aa)
Returns an index for the amino acid excluding combinations.abstract int
getVanDerWaalsVolume()
Returns the van der Waals volume in Å3.static boolean
isAa(char aa)
Returns a boolean indicating whether the given character is a supported amino acid.static boolean
isAa(int aa)
Returns a boolean indicating whether the given character is a supported amino acid.abstract boolean
iscombination()
Indicates whether the amino acid object refers to a combination of amino acids like B, J, Z or X.static boolean
isUniqueAa(char aa)
Returns a boolean indicating whether the given character is a supported amino acid excluding combinations.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
A
-
C
-
D
-
E
-
F
-
G
-
H
-
I
-
K
-
L
-
M
-
N
-
P
-
Q
-
R
-
S
-
T
-
V
-
W
-
Y
-
U
-
O
-
B
-
J
-
Z
-
X
-
singleLetterCode
Single letter code of the amino acid. -
threeLetterCode
Three letter code of the amino acid. -
name
Name of the amino acid. -
monoisotopicAtomChain
The monoisotopic atom chain. -
subAminoAcidsWithoutCombination
protected char[] subAminoAcidsWithoutCombinationThe sub amino acids without combination. -
subAminoAcidsWithCombination
protected char[] subAminoAcidsWithCombinationThe sub amino acids with combination. -
aminoAcidCombinations
protected char[] aminoAcidCombinationsThe amino acid combinations. -
standardGeneticCode
The standard genetic code. -
AMINO_ACID_STRINGS
The amino acid one letter codes as string array.
-
-
Constructor Details
-
AminoAcid
public AminoAcid()Empty default constructor.
-
-
Method Details
-
getAminoAcids
public static char[] getAminoAcids()Convenience method returning an array of all implemented amino acids represented by their singe letter code.- Returns:
- an array of all implemented amino acids
-
getSingleLetterCodeAsChar
public char getSingleLetterCodeAsChar()Returns the single letter code as character.- Returns:
- the single letter code as character
-
getAminoAcidsList
Convenience method returning an arrayList of all implemented amino acids.- Returns:
- an arrayList of all implemented amino acids represented by their character
-
getUniqueAminoAcids
public static char[] getUniqueAminoAcids()Returns a char array of the one letter code of amino acids without combinations of amino acids.- Returns:
- a char array of the one letter code of amino acids without combinations of amino acids
-
getAminoAcid
Returns the amino acid corresponding to the letter given. Throws an exception if not implemented. If more than one letter is given only the first one will be accounted for.- Parameters:
aa
- the amino acid single letter code as a String- Returns:
- the corresponding amino acid
- Throws:
IllegalArgumentException
- if the amino acid is not implemented
-
getAminoAcid
Returns the amino acid corresponding to the single letter code given. Throws an exception if not implemented.- Parameters:
aa
- the single letter code of the amino acid- Returns:
- the corresponding amino acid
- Throws:
IllegalArgumentException
- if the amino acid is not implemented
-
iscombination
public abstract boolean iscombination()Indicates whether the amino acid object refers to a combination of amino acids like B, J, Z or X.- Returns:
- an boolean indicating whether the amino acid object refers to a combination of amino acids like B, J, Z or X
-
getSubAminoAcids
public char[] getSubAminoAcids()In case of a combination of amino acids, returns the comprised amino acids or amino acid groups represented by their single letter code including sub combinations. Example: Z > {G, Q}.- Returns:
- the actual amino acids
-
getSubAminoAcids
public char[] getSubAminoAcids(boolean includeCombinations)In case of a combination of amino acids, returns the comprised amino acids or amino acid groups represented by their single letter code. Example: Z > {G, Q}.- Parameters:
includeCombinations
- if true, sub-amino acids which are amino acids combinations like Z will also be included- Returns:
- the actual amino acids
-
getCombinations
public char[] getCombinations()Returns the amino acids combinations which might represent this amino acid. Example: g > {Z, X}.- Returns:
- the amino acids combinations which might represent this amino acid
-
getMatchingAminoAcid
public static char getMatchingAminoAcid(char aa, SequenceMatchingParameters sequenceMatchingPreferences)Returns a matching amino acid using the given preferences. The amino acid is unique when different possibilities are found, then for instance I is returned for both I and L. The first of the amino acid string array is returned.- Parameters:
aa
- the single letter code of the amino acid of interestsequenceMatchingPreferences
- the sequence matching preferences- Returns:
- a matching amino acid using the given matching type and massTolerance
-
getMatchingSequence
public static String getMatchingSequence(String sequence, SequenceMatchingParameters sequenceMatchingPreferences)Returns the matching sequence of a given sequence. For example both PEPTLDE and PEPTIDE will return PEPTIDE when I and L are considered as indistinguishable. See getMatchingAminoAcid for more details.- Parameters:
sequence
- the sequence of interestsequenceMatchingPreferences
- the sequence matching preferences- Returns:
- the matching sequence
-
getStandardGeneticCode
Returns the standard genetic triplets associated to this amino acid.- Returns:
- the standard genetic triplets associated to this amino acid
-
getAminoAcidFromGeneticCode
Returns the amino acid from the standard genetic code. Null if not coding for an amino acid.- Parameters:
geneticCode
- the three letter genetic code of the desired amino acid- Returns:
- the amino acid from the standard genetic code
-
getStandardGeneticCodeForCombination
Returns the genetic code as combination of the sub amino acid genetic codes.- Returns:
- the genetic code as combination of the sub amino acid genetic codes
-
getMonoisotopicAtomChain
Returns the monoisotopic atom chain representing this amino acid.- Returns:
- the monoisotopic atom chain representing this amino acid
-
getMonoisotopicMass
public double getMonoisotopicMass()Returns the mass of the amino acid.- Returns:
- the mass of the amino acid
-
getHydrophobicity
public abstract double getHydrophobicity()Returns the hydrophobicity according to PMID 14730315.- Returns:
- the hydrophobicity
-
getHelicity
public abstract double getHelicity()Returns the helicity according to PMID 14730315.- Returns:
- the helicity
-
getBasicity
public abstract double getBasicity()Returns the basicity according to PMID 14730315.- Returns:
- the basicity
-
getPI
public abstract double getPI()Returns the pI.- Returns:
- the pI
-
getPK1
public abstract double getPK1()Returns the pK1.- Returns:
- the pK1
-
getPK2
public abstract double getPK2()Returns the pK2.- Returns:
- the pK2
-
getPKa
public abstract double getPKa()Returns the pKa. 0.0 if none.- Returns:
- the pKa
-
getVanDerWaalsVolume
public abstract int getVanDerWaalsVolume()Returns the van der Waals volume in Å3.- Returns:
- the van der Waals volume
-
getProperty
Returns a property of the amino acid.- Parameters:
property
- the property of interest- Returns:
- the property of the amino acid
-
getNUnique
public static int getNUnique()Returns the number of amino acids excluding combinations.- Returns:
- the number of amino acids excluding combinations
-
getUniqueIndex
public static int getUniqueIndex(char aa)Returns an index for the amino acid excluding combinations. The amino acid must be provided as upper case single letter code. No sanity check is done.- Parameters:
aa
- the upper case single letter code of the amino acid.- Returns:
- an index for the amino acid
-
getIndex
public static int getIndex(char aa)Returns an index for the amino acid excluding combinations. The amino acid must be provided as upper case single letter code. No sanity check is done.- Parameters:
aa
- the upper case single letter code of the amino acid.- Returns:
- an index for the amino acid
-
isAa
public static boolean isAa(char aa)Returns a boolean indicating whether the given character is a supported amino acid.- Parameters:
aa
- the amino acid as single character code- Returns:
- a boolean indicating whether the given character is a supported amino acid
-
isAa
public static boolean isAa(int aa)Returns a boolean indicating whether the given character is a supported amino acid.- Parameters:
aa
- the amino acid as single character code- Returns:
- a boolean indicating whether the given character is a supported amino acid
-
isUniqueAa
public static boolean isUniqueAa(char aa)Returns a boolean indicating whether the given character is a supported amino acid excluding combinations.- Parameters:
aa
- the amino acid as single character code- Returns:
- a boolean indicating whether the given character is a supported amino acid excluding combinations
-
equals
-