Class ModificationMatch
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.matches.ModificationMatch
- All Implemented Interfaces:
Serializable
public class ModificationMatch extends ExperimentObject
This class models the match between theoretic PTM and identification results.
- Author:
- Marc Vaudel, Dominik Kopczynski
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ModificationMatch()
Default constructor for a modification match.ModificationMatch(String theoreticPtm, int modifiedSite)
Constructor for a modification match. -
Method Summary
Modifier and Type Method Description ModificationMatch
clone()
Clones the modification match into a new match with the same attributes.boolean
getConfident()
Returns a boolean indicating whether the modification is confidently localized on the sequence.boolean
getInferred()
Returns a boolean indicating whether the modification is inferred from another peptide.String
getModification()
Getter for the theoretic PTM name.int
getSite()
Getter for the modification site.boolean
isSameAs(ModificationMatch anotherModificationMatch)
Indicates whether this modification match is the same of another one.void
setConfident(boolean confident)
Sets whether the modification is confidently localized on the sequence.void
setInferred(boolean inferred)
Sets whether the modification is inferred from another peptide.void
setModification(String modName)
Sets the theoretic PTM.void
setSite(int site)
Setter for the modification site, 1 is the first amino acid.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
ModificationMatch
Constructor for a modification match.- Parameters:
theoreticPtm
- the theoretic PTMmodifiedSite
- the position of the modification in the sequence, 1 is the first residue
-
ModificationMatch
public ModificationMatch()Default constructor for a modification match.
-
-
Method Details
-
getModification
Getter for the theoretic PTM name.- Returns:
- the theoretic PTM name
-
setModification
Sets the theoretic PTM.- Parameters:
modName
- the theoretic PTM name
-
getSite
public int getSite()Getter for the modification site. N-term modifications are at index 0, C-term at index sequence length + 1, and other modifications at amino acid index starting from 1. An error is thrown if attempting to stack modifications.- Returns:
- the index of the modification in the sequence
-
setSite
public void setSite(int site)Setter for the modification site, 1 is the first amino acid.- Parameters:
site
- the index of the modification in the sequence
-
getConfident
public boolean getConfident()Returns a boolean indicating whether the modification is confidently localized on the sequence.- Returns:
- a boolean indicating whether the modification is confidently localized on the sequence
-
setConfident
public void setConfident(boolean confident)Sets whether the modification is confidently localized on the sequence.- Parameters:
confident
- a boolean indicating whether the modification is confidently localized on the sequence
-
getInferred
public boolean getInferred()Returns a boolean indicating whether the modification is inferred from another peptide.- Returns:
- a boolean indicating whether the modification is inferred from another peptide
-
setInferred
public void setInferred(boolean inferred)Sets whether the modification is inferred from another peptide.- Parameters:
inferred
- a boolean indicating whether the modification is inferred from another peptide
-
isSameAs
Indicates whether this modification match is the same of another one. The match is only compared based on the theoretic PTM and the variability. The localization and its confidence is not taken into account.- Parameters:
anotherModificationMatch
- another modification match- Returns:
- a boolean indicating whether both modification matches are the same.
-
clone
Clones the modification match into a new match with the same attributes.
-