Class ModificationScoring
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.peptide_shaker.ModificationScoring
- All Implemented Interfaces:
Serializable
public class ModificationScoring extends ExperimentObject
This class contains stores the modification localization scores.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static int
CONFIDENT
Index for a confident assignment.static int
DOUBTFUL
Index for a doubtful assignment.static int
NOT_FOUND
Index indicating that the modification was not found.static int
RANDOM
Index for a random location choice.static String
SEPARATOR
The separator used to separate locations in the modification location key.static int
VERY_CONFIDENT
Index for a very confident assignment. -
Constructor Summary
Constructors Constructor Description ModificationScoring()
Default constructor Constructor.ModificationScoring(String ptmName)
Constructor. -
Method Summary
Modifier and Type Method Description void
addAll(ModificationScoring anotherScore)
Adds all scores from another score if better.Set<Integer>
getAllPtmLocations()
Returns the sites of all localized PTMs.static String
getConfidenceLevel(int index)
Convenience method returning the given confidence level as a string.ArrayList<Integer>
getConfidentPtmLocations()
Returns the confidently and very confidently localized PTMs.double
getDeltaScore(int site)
Returns the delta score at a given site.Set<Integer>
getDSites()
Returns a set of sites where a D-score is availableint
getLocalizationConfidence(int site)
Returns the confidence of the PTM localization.int
getMinimalLocalizationConfidence()
Returns the minimal confidence among the PTM sites of this scoring.String
getName()
Returns the name of the inspected protein.ArrayList<Integer>
getOrderedDSites()
Returns an ordered list of sites where the D-score was used.ArrayList<Integer>
getOrderedProbabilisticSites()
Returns an ordered list of sites where the probabilistic score was used.ArrayList<Integer>
getOrderedPtmLocations()
Returns sites of all localized PTMs ordered increasingly.static String[]
getPossibleConfidenceLevels()
Convenience method returning all confidence levels as string.double
getProbabilisticScore(int site)
Returns the probabilistic score at a given site.Set<Integer>
getProbabilisticSites()
Returns a set of sites where a probabilistic score is availableHashMap<Integer,Integer>
getPtmLocationAtAA()
Returns the map of the localization.ArrayList<Integer>
getPtmLocations(int confidenceLevel)
Returns the PTM locations at a given confidence level (see static fields).Set<Integer>
getScoredSites()
Returns a set of sites where a score is available.ArrayList<Integer>
getSecondaryPtmLocations()
Returns the not found, randomly or doubtfully localized PTMs.void
setDeltaScore(int site, double score)
Sets the delta score at a given site.void
setProbabilisticScore(int site, double score)
Sets the probabilistic score at a given site.void
setSiteConfidence(int site, int confidenceLevel)
Sets the confidence level of a modification site.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
NOT_FOUND
public static final int NOT_FOUNDIndex indicating that the modification was not found.- See Also:
- Constant Field Values
-
RANDOM
public static final int RANDOMIndex for a random location choice.- See Also:
- Constant Field Values
-
DOUBTFUL
public static final int DOUBTFULIndex for a doubtful assignment.- See Also:
- Constant Field Values
-
CONFIDENT
public static final int CONFIDENTIndex for a confident assignment.- See Also:
- Constant Field Values
-
VERY_CONFIDENT
public static final int VERY_CONFIDENTIndex for a very confident assignment.- See Also:
- Constant Field Values
-
SEPARATOR
The separator used to separate locations in the modification location key.- See Also:
- Constant Field Values
-
-
Constructor Details
-
ModificationScoring
public ModificationScoring()Default constructor Constructor. -
ModificationScoring
Constructor.- Parameters:
ptmName
- the name of the PTM of interest.
-
-
Method Details
-
getName
Returns the name of the inspected protein.- Returns:
- the name of the inspected protein
-
getScoredSites
Returns a set of sites where a score is available.- Returns:
- a set of sites where a score is available
-
setDeltaScore
public void setDeltaScore(int site, double score)Sets the delta score at a given site. First amino acid is 1.- Parameters:
site
- the modification sitescore
- the delta score
-
getDeltaScore
public double getDeltaScore(int site)Returns the delta score at a given site. First amino acid is 1.- Parameters:
site
- the site of interest- Returns:
- the attached delta score. 0 if not found.
-
setProbabilisticScore
public void setProbabilisticScore(int site, double score)Sets the probabilistic score at a given site. First amino acid is 1.- Parameters:
site
- the modification sitescore
- the delta score
-
getProbabilisticScore
public double getProbabilisticScore(int site)Returns the probabilistic score at a given site. First amino acid is 1.- Parameters:
site
- the site of interest- Returns:
- the attached probabilistic score. 0 if not found.
-
getProbabilisticSites
Returns a set of sites where a probabilistic score is available- Returns:
- a set of sites where a probabilistic score is available
-
getOrderedProbabilisticSites
Returns an ordered list of sites where the probabilistic score was used. Sites are ordered by decreasing score. In order to reduce systematic error, if sites score equally their order is random.- Returns:
- a list of sites where the probabilistic score was used
-
getDSites
Returns a set of sites where a D-score is available- Returns:
- a set of sites where a D-score is available
-
getOrderedDSites
Returns an ordered list of sites where the D-score was used. Sites are ordered by decreasing score. In order to reduce systematic error, if sites score equally their order is random.- Returns:
- a list of sites where the D-score was used
-
addAll
Adds all scores from another score if better.- Parameters:
anotherScore
- another score
-
setSiteConfidence
public void setSiteConfidence(int site, int confidenceLevel)Sets the confidence level of a modification site. 1 is the first amino acid.- Parameters:
site
- the modification siteconfidenceLevel
- the confidence level
-
getPtmLocationAtAA
Returns the map of the localization. site > confidence level.- Returns:
- the map of the localization
-
getAllPtmLocations
Returns the sites of all localized PTMs.- Returns:
- the sites of all localized PTMs
-
getOrderedPtmLocations
Returns sites of all localized PTMs ordered increasingly.- Returns:
- sites of all localized PTMs ordered increasingly
-
getLocalizationConfidence
public int getLocalizationConfidence(int site)Returns the confidence of the PTM localization.- Parameters:
site
- the modification site- Returns:
- the confidence of the localization as indexed by the static fields
-
getMinimalLocalizationConfidence
public int getMinimalLocalizationConfidence()Returns the minimal confidence among the PTM sites of this scoring.- Returns:
- the minimal confidence among the PTM sites of this scoring
-
getConfidentPtmLocations
Returns the confidently and very confidently localized PTMs.- Returns:
- the confidently and very confidently localized PTMs
-
getSecondaryPtmLocations
Returns the not found, randomly or doubtfully localized PTMs.- Returns:
- the not found, randomly or doubtfully localized PTMs
-
getPtmLocations
Returns the PTM locations at a given confidence level (see static fields).- Parameters:
confidenceLevel
- the confidence level- Returns:
- the PTM locations at the given confidence level
-
getPossibleConfidenceLevels
Convenience method returning all confidence levels as string.- Returns:
- an array with all confidence levels as string
-
getConfidenceLevel
Convenience method returning the given confidence level as a string.- Parameters:
index
- the confidence level- Returns:
- the corresponding string
-