Class PSModificationScores
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 Summary
Fields Modifier and Type Field Description static PSModificationScores
dummy
Dummy scores. -
Constructor Summary
Constructors Constructor Description PSModificationScores()
Constructor. -
Method Summary
Modifier and Type Method Description void
addAmbiguousModificationSites(int representativeSite, HashMap<Integer,HashSet<String>> possibleModifications)
Adds a group of modifications to the mapping of ambiguous sites.void
addConfidentModificationSite(String modName, int modificationSite)
Adds a confident modification site.void
addModificationScoring(String modName, ModificationScoring modificationScoring)
Adds a scoring result for the modification of interest.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.boolean
containsModification(String modName)
Indicates whether a modification has been already scored.TreeSet<String>
getAmbiguouslyLocalizedModifications()
Returns a list of modifications presenting at least an ambiguous site.HashMap<Integer,HashSet<String>>
getAmbiguousModificationsAtRepresentativeSite(int representativeSite)
Returns the ambiguous modification assignments registered at the given representative site in a map: secondary site > modifications.HashMap<Integer,HashSet<Integer>>
getAmbiguousModificationsSites(String modName)
Returns the ambiguous modification sites registered for the given modification.TreeSet<String>
getConfidentlyLocalizedModifications()
Returns a list of modifications presenting at least a confident site.HashSet<String>
getConfidentModificationsAt(int site)
Returns the main potential modifications at the given amino acid index.TreeSet<Integer>
getConfidentSites()
Returns a list of all confident modification sites.HashSet<Integer>
getConfidentSitesForModification(String modName)
Returns the confident sites for the given modification.HashSet<String>
getModificationsAtRepresentativeSite(int site)
Returns the modifications which have a representative ambiguous site at the given site.ModificationScoring
getModificationScoring(String modName)
Returns the modification scoring for the desired modification (null if none found).long
getParameterKey()
This method returns the key of the parameter.TreeSet<Integer>
getRepresentativeSites()
Returns a list of all representative sites of ambiguously localized modifications.Set<String>
getScoredModifications()
Returns a list of scored modifications.boolean
isConfidentModificationSite(int site, String modificationName)
Indicates whether a site is already registered as confident modification site.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
dummy
Dummy scores.
-
-
Constructor Details
-
PSModificationScores
public PSModificationScores()Constructor.
-
-
Method Details
-
addModificationScoring
Adds a scoring result for the modification of interest.- Parameters:
modName
- the modification of interestmodificationScoring
- the corresponding scoring
-
getModificationScoring
Returns the modification scoring for the desired modification (null if none found).- Parameters:
modName
- the modification of interest- Returns:
- the scoring
-
containsModification
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
Returns a list of scored modifications.- Returns:
- a list of scored modifications
-
addConfidentModificationSite
Adds a confident modification site.- Parameters:
modName
- the modification namemodificationSite
- 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 grouppossibleModifications
- 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
Indicates whether a site is already registered as confident modification site.- Parameters:
site
- the site of interestmodificationName
- the name of the modification- Returns:
- a boolean indicating whether a site is already registered as confident modification site
-
getConfidentModificationsAt
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
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
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
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
Returns a list of all confident modification sites.- Returns:
- a list of all confident modification sites
-
getRepresentativeSites
Returns a list of all representative sites of ambiguously localized modifications.- Returns:
- a list of all representative sites of ambiguously localized modifications
-
getConfidentlyLocalizedModifications
Returns a list of modifications presenting at least a confident site.- Returns:
- a list of modifications presenting at least a confident site
-
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 interfaceUrParameter
- Returns:
- the parameter key
-