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
  • Constructor Details

    • ModificationMatch

      public ModificationMatch​(String theoreticPtm, int modifiedSite)
      Constructor for a modification match.
      Parameters:
      theoreticPtm - the theoretic PTM
      modifiedSite - 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

      public String getModification()
      Getter for the theoretic PTM name.
      Returns:
      the theoretic PTM name
    • setModification

      public void setModification​(String modName)
      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

      public boolean isSameAs​(ModificationMatch anotherModificationMatch)
      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

      public ModificationMatch clone()
      Clones the modification match into a new match with the same attributes.
      Overrides:
      clone in class Object
      Returns:
      a new modification match with the same attributes