java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores
All Implemented Interfaces:
UrParameter, Serializable

public class PSModificationScores
extends ExperimentObject
implements UrParameter
This class contains the scores for the locations of the possible modifications.
Author:
Marc Vaudel
See Also:
Serialized Form
  • Field Details

  • Constructor Details

  • Method Details

    • addModificationScoring

      public void addModificationScoring​(String modName, ModificationScoring modificationScoring)
      Adds a scoring result for the modification of interest.
      Parameters:
      modName - the modification of interest
      modificationScoring - the corresponding scoring
    • getModificationScoring

      public ModificationScoring getModificationScoring​(String modName)
      Returns the modification scoring for the desired modification (null if none found).
      Parameters:
      modName - the modification of interest
      Returns:
      the scoring
    • containsModification

      public boolean containsModification​(String modName)
      Indicates whether a modification has been already scored.
      Parameters:
      modName - the modification of interest
      Returns:
      a boolean indicating whether the modification is in the map
    • getScoredModifications

      public Set<String> getScoredModifications()
      Returns a list of scored modifications.
      Returns:
      a list of scored modifications
    • addConfidentModificationSite

      public void addConfidentModificationSite​(String modName, int modificationSite)
      Adds a confident modification site.
      Parameters:
      modName - the modification name
      modificationSite - the modification site
    • addAmbiguousModificationSites

      public void addAmbiguousModificationSites​(int representativeSite, HashMap<Integer,​HashSet<String>> possibleModifications)
      Adds a group of modifications to the mapping of ambiguous sites.
      Parameters:
      representativeSite - the representative site of this modification group
      possibleModifications - the possible modifications in a map: site > modification name
    • changeRepresentativeSite

      public void changeRepresentativeSite​(String modName, String originalModName, int originalRepresentativeSite, int newRepresentativeSite, int nMod, ModificationProvider modificationProvider)
      Changes the representative site for a given ambiguously localized modification in all maps.
      Parameters:
      modName - The name of the modification at the new site.
      originalModName - The name of the modification at the original site.
      originalRepresentativeSite - The original representative site.
      newRepresentativeSite - The new representative site.
      nMod - The occurrence of modifications of the exact same mass in this peptide.
      modificationProvider - The modification provider to use.
    • isConfidentModificationSite

      public boolean isConfidentModificationSite​(int site, String modificationName)
      Indicates whether a site is already registered as confident modification site.
      Parameters:
      site - the site of interest
      modificationName - the name of the modification
      Returns:
      a boolean indicating whether a site is already registered as confident modification site
    • getConfidentModificationsAt

      public HashSet<String> getConfidentModificationsAt​(int site)
      Returns the main potential modifications at the given amino acid index.
      Parameters:
      site - the index in the sequence (1 is first amino acid)
      Returns:
      a list containing all potential modifications as main match, an empty list if none found
    • getModificationsAtRepresentativeSite

      public HashSet<String> getModificationsAtRepresentativeSite​(int site)
      Returns the modifications which have a representative ambiguous site at the given site.
      Parameters:
      site - the index in the sequence (0 is first amino acid)
      Returns:
      a list of modifications which have a representative ambiguous site at the given site
    • getConfidentSitesForModification

      public HashSet<Integer> getConfidentSitesForModification​(String modName)
      Returns the confident sites for the given modification. An empty list if none found.
      Parameters:
      modName - the name of the modification of interest
      Returns:
      the confident sites for the given modification
    • getAmbiguousModificationsAtRepresentativeSite

      public HashMap<Integer,​HashSet<String>> getAmbiguousModificationsAtRepresentativeSite​(int representativeSite)
      Returns the ambiguous modification assignments registered at the given representative site in a map: secondary site > modifications.
      Parameters:
      representativeSite - the representative site of interest
      Returns:
      the ambiguous modification assignments registered at the given representative site
    • getAmbiguousModificationsSites

      public HashMap<Integer,​HashSet<Integer>> getAmbiguousModificationsSites​(String modName)
      Returns the ambiguous modification sites registered for the given modification.
      Parameters:
      modName - the name of the modification of interest
      Returns:
      the ambiguous modification sites registered for the given modification
    • getConfidentSites

      public TreeSet<Integer> getConfidentSites()
      Returns a list of all confident modification sites.
      Returns:
      a list of all confident modification sites
    • getRepresentativeSites

      public TreeSet<Integer> getRepresentativeSites()
      Returns a list of all representative sites of ambiguously localized modifications.
      Returns:
      a list of all representative sites of ambiguously localized modifications
    • getConfidentlyLocalizedModifications

      public TreeSet<String> getConfidentlyLocalizedModifications()
      Returns a list of modifications presenting at least a confident site.
      Returns:
      a list of modifications presenting at least a confident site
    • getAmbiguouslyLocalizedModifications

      public TreeSet<String> getAmbiguouslyLocalizedModifications()
      Returns a list of modifications presenting at least an ambiguous site.
      Returns:
      a list of modifications presenting at least an ambiguous site
    • getParameterKey

      public long getParameterKey()
      Description copied from interface: UrParameter
      This method returns the key of the parameter. The key must be unique to the type of parameter.
      Specified by:
      getParameterKey in interface UrParameter
      Returns:
      the parameter key