Class PSParameter
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.peptide_shaker.PSParameter
- All Implemented Interfaces:
UrParameter
,Serializable
public class PSParameter extends ExperimentObject implements UrParameter
PeptideShaker compomics utilities experiment customizable parameter. This
parameter will be added to spectrum, peptide and protein matches to score
them, indicate the estimated posterior error probability associated and flag
whether they have been validated or not.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static PSParameter
dummy
An empty parameter used for instantiation.static int
NOT_GROUP
Static index for a protein inference group: 0 - not a protein group or unique peptide of single protein group.static int
RELATED
Static index for a protein group: 1 - related proteins or peptide from related protein groups (not necessarily unique to the group).static int
RELATED_AND_UNRELATED
Static index for a protein group: 2 - related and a unrelated proteins or peptide shared by related and unrelated proteins (not necessarily unique to the group).static int
UNRELATED
Static index for a protein group: 3 - unrelated proteins proteins or peptide shared by unrelated proteins. -
Constructor Summary
Constructors Constructor Description PSParameter()
Constructor. -
Method Summary
Modifier and Type Method Description void
createIntermediateScoreMap()
Instantiates the intermediate scores map if null.Double
getAlgorithmDeltaPEP()
Returns the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine.double
getConfidence()
Returns the confidence.double
getDeltaPEP()
Returns the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines.Double
getFractionConfidence(String fraction)
Returns the fraction confidence.HashMap<String,Double>
getFractionPEP()
Returns the fraction pep map.Double
getFractionPEP(String fraction)
Returns the fraction pep.Set<String>
getFractions()
Return the fractions where this match was found.HashMap<String,Double>
getFractionScore()
Return the fractions where this match was found.Double
getFractionScore(String fraction)
Returns the fraction score.int
getFractionValidatedPeptides(String fraction)
Get the number of validated peptides in the given fraction.Integer
getFractionValidatedSpectra(String fraction)
Get the number of validated spectra in the given fraction.boolean
getHidden()
Returns whether a match is hidden or not.Double
getIntermediateScore(int scoreId)
Returns the desired intermediate score.HashMap<Integer,Double>
getIntermediateScores()
Returns the intermediate scores map.boolean
getManualValidation()
Indicates whether the match validation was manually inspected.MatchValidationLevel
getMatchValidationLevel()
Returns the validation level of the match.long
getParameterKey()
This method returns the key of the parameter.HashMap<String,Double>
getPrecursorIntensityAveragePerFraction()
Returns the fraction precursor intensity average map.Double
getPrecursorIntensityAveragePerFraction(String fraction)
Get the average precursor intensity in the given fraction.HashMap<String,ArrayList<Double>>
getPrecursorIntensityPerFraction()
Returns the precursor intensity per fraction map.ArrayList<Double>
getPrecursorIntensityPerFraction(String fraction)
Get the precursor intensity in the given fraction.HashMap<String,Double>
getPrecursorIntensitySummedPerFraction()
Returns the fraction summed intensity map.Double
getPrecursorIntensitySummedPerFraction(String fraction)
Get the summed precursor intensity in the given fraction.double
getProbability()
Returns the match probability.String
getProteinInferenceClassAsString()
Returns the protein inference class as a string for the given integer-based classstatic String
getProteinInferenceClassAsString(int matchClass)
Returns the protein inference class as a string for the given integer-based class.int
getProteinInferenceGroupClass()
Returns the protein inference class of the protein match.Set<String>
getQcCriteria()
Returns the list of QC checks made for this match.HashMap<String,Boolean>
getQcFilters()
Returns the qc filters map.double
getScore()
Returns the score.boolean
getStarred()
Returns whether a match is starred or not.double
getTransformedScore()
Returns the log transformed score.HashMap<String,Integer>
getValidatedPeptidesPerFraction()
Returns the number of validated peptides per fraction.HashMap<String,Integer>
getValidatedSpectraPerFraction()
Returns the number of validated spectra per fraction.boolean
hasQcFilters()
Indicates whether QC filters were implemented for this match.Boolean
isQcPassed(String criterion)
Indicates whether the given QC check was passed.void
resetQcResults()
Resets the results of the QC filters.void
setAlgorithmDeltaPEP(double deltaPEP)
Sets the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine.void
setDeltaPEP(double deltaPEP)
Sets the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines.void
setFractionPEP(String fraction, Double confidence)
Sets the fraction confidence.void
setFractionPEP(HashMap<String,Double> fractionPEP)
void
setFractionScore(String fraction, double confidence)
Sets the fraction confidence.void
setFractionScore(HashMap<String,Double> fractionScore)
Sets the fraction score map.void
setGroupClass(int groupClass)
void
setHidden(boolean hidden)
Hide/Unhide a match.void
setIntermediateScore(Integer scoreId, Double score)
Adds an intermediate score.void
setIntermediateScores(HashMap<Integer,Double> intermediateScores)
void
setManualValidation(boolean manualValidation)
Sets whether the match validation was manually inspected.void
setMatchValidationLevel(MatchValidationLevel matchValidationLevel)
Sets the validation level of the match.void
setPrecursorIntensityAveragePerFraction(HashMap<String,Double> precursorIntensityAveragePerFraction)
Sets the precursor intensity per fraction map.void
setPrecursorIntensityPerFraction(HashMap<String,ArrayList<Double>> precursorIntensityPerFraction)
Get the precursor intensity in the given fraction.void
setPrecursorIntensitySummedPerFraction(HashMap<String,Double> precursorIntensitySummedPerFraction)
Sets the summed precursor intensity per fraction map.void
setProbability(double probability)
Set the probability.void
setProteinInferenceClass(int groupClass)
Sets the protein group class.void
setQcFilters(HashMap<String,Boolean> qcFilters)
Sets the qc filters.void
setQcResult(String criterion, boolean validated)
Sets whether the match passed a quality control check.void
setScore(double score)
Set the peptide score.void
setStarred(boolean starred)
Star/Unstar a match.void
setValidatedPeptidesPerFraction(HashMap<String,Integer> validatedPeptidesPerFraction)
Get the number of validated peptides in the given fraction.void
setValidatedSpectraPepFraction(HashMap<String,Integer> validatedSpectraPerFraction)
Get the number of validated spectra in the given fraction.static double
transformScore(double rawScore)
Returns a score from a raw score where the score = -10*log(rawScore).Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
NOT_GROUP
public static final int NOT_GROUPStatic index for a protein inference group: 0 - not a protein group or unique peptide of single protein group.- See Also:
- Constant Field Values
-
RELATED
public static final int RELATEDStatic index for a protein group: 1 - related proteins or peptide from related protein groups (not necessarily unique to the group).- See Also:
- Constant Field Values
-
RELATED_AND_UNRELATED
public static final int RELATED_AND_UNRELATEDStatic index for a protein group: 2 - related and a unrelated proteins or peptide shared by related and unrelated proteins (not necessarily unique to the group).- See Also:
- Constant Field Values
-
UNRELATED
public static final int UNRELATEDStatic index for a protein group: 3 - unrelated proteins proteins or peptide shared by unrelated proteins.- See Also:
- Constant Field Values
-
dummy
An empty parameter used for instantiation.
-
-
Constructor Details
-
PSParameter
public PSParameter()Constructor.
-
-
Method Details
-
getProbability
public double getProbability()Returns the match probability.- Returns:
- the match probability
-
setProbability
public void setProbability(double probability)Set the probability.- Parameters:
probability
- the new peptide posterior error probability
-
setGroupClass
public void setGroupClass(int groupClass) -
getScore
public double getScore()Returns the score.- Returns:
- the score
-
getTransformedScore
public double getTransformedScore()Returns the log transformed score.- Returns:
- the log transformed score
-
setScore
public void setScore(double score)Set the peptide score.- Parameters:
score
- the score
-
getConfidence
public double getConfidence()Returns the confidence.- Returns:
- the confidence
-
getAlgorithmDeltaPEP
Returns the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine.- Returns:
- the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine
-
setAlgorithmDeltaPEP
public void setAlgorithmDeltaPEP(double deltaPEP)Sets the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine.- Parameters:
deltaPEP
- the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference for the given search engine
-
getDeltaPEP
public double getDeltaPEP()Returns the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines.- Returns:
- the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines
-
setDeltaPEP
public void setDeltaPEP(double deltaPEP)Sets the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines.- Parameters:
deltaPEP
- the difference in identification algorithm level PEP with the next best peptide assumption with sequence difference across all search engines
-
setQcFilters
Sets the qc filters.- Parameters:
qcFilters
- the qc filters
-
getMatchValidationLevel
Returns the validation level of the match.- Returns:
- the validation level of the match
-
setMatchValidationLevel
Sets the validation level of the match.- Parameters:
matchValidationLevel
- the validation level of the match
-
setHidden
public void setHidden(boolean hidden)Hide/Unhide a match.- Parameters:
hidden
- boolean indicating whether the match should be hidden
-
getHidden
public boolean getHidden()Returns whether a match is hidden or not.- Returns:
- boolean indicating whether a match is hidden or not
-
setStarred
public void setStarred(boolean starred)Star/Unstar a match.- Parameters:
starred
- boolean indicating whether the match should be starred
-
getStarred
public boolean getStarred()Returns whether a match is starred or not.- Returns:
- boolean indicating whether a match is starred or not
-
getProteinInferenceGroupClass
public int getProteinInferenceGroupClass()Returns the protein inference class of the protein match.- Returns:
- the protein inference class of the protein match.
-
getProteinInferenceClassAsString
Returns the protein inference class as a string for the given integer-based class- Returns:
- the group class description
-
getProteinInferenceClassAsString
Returns the protein inference class as a string for the given integer-based class.- Parameters:
matchClass
- the protein inference class as integer (see static fields)- Returns:
- the group class description
-
setProteinInferenceClass
public void setProteinInferenceClass(int groupClass)Sets the protein group class.- Parameters:
groupClass
- the protein group class
-
getValidatedPeptidesPerFraction
Returns the number of validated peptides per fraction.- Returns:
- the number of validated peptides per fraction
-
getValidatedSpectraPerFraction
Returns the number of validated spectra per fraction.- Returns:
- the number of validated spectra per fraction
-
setFractionScore
Sets the fraction confidence.- Parameters:
fraction
- the fractionconfidence
- the confidence
-
setFractionScore
Sets the fraction score map.- Parameters:
fractionScore
- the fraction score map
-
getFractionScore
Returns the fraction score. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the fraction score
-
getFractions
Return the fractions where this match was found. Null if not found.- Returns:
- the fractions where this match was found
-
getFractionScore
Return the fractions where this match was found. Null if not found.- Returns:
- the fractions where this match was found
-
setFractionPEP
Sets the fraction confidence.- Parameters:
fraction
- the fractionconfidence
- the confidence
-
setFractionPEP
-
getFractionPEP
Returns the fraction pep. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the fraction pep
-
getFractionPEP
Returns the fraction pep map.- Returns:
- the fraction pep map
-
getFractionConfidence
Returns the fraction confidence. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the fraction confidence
-
getFractionValidatedPeptides
Get the number of validated peptides in the given fraction. Zero if not found.- Parameters:
fraction
- the fraction- Returns:
- the number of validated peptides in the given fraction
-
setValidatedPeptidesPerFraction
Get the number of validated peptides in the given fraction.- Parameters:
validatedPeptidesPerFraction
- the validated peptides per fraction map
-
getFractionValidatedSpectra
Get the number of validated spectra in the given fraction. Zero if not found.- Parameters:
fraction
- the fraction- Returns:
- the number of validated spectra in the given fraction
-
setValidatedSpectraPepFraction
Get the number of validated spectra in the given fraction.- Parameters:
validatedSpectraPerFraction
- the validated spectra per fraction map
-
getPrecursorIntensityPerFraction
Get the precursor intensity in the given fraction. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the precursor intensity in the given fraction
-
getPrecursorIntensityPerFraction
Returns the precursor intensity per fraction map.- Returns:
- the precursor intensity per fraction map
-
setPrecursorIntensityAveragePerFraction
public void setPrecursorIntensityAveragePerFraction(HashMap<String,Double> precursorIntensityAveragePerFraction)Sets the precursor intensity per fraction map.- Parameters:
precursorIntensityAveragePerFraction
- the precursor intensity per fraction map
-
setPrecursorIntensitySummedPerFraction
public void setPrecursorIntensitySummedPerFraction(HashMap<String,Double> precursorIntensitySummedPerFraction)Sets the summed precursor intensity per fraction map.- Parameters:
precursorIntensitySummedPerFraction
- the summed precursor intensity per fraction map
-
setPrecursorIntensityPerFraction
public void setPrecursorIntensityPerFraction(HashMap<String,ArrayList<Double>> precursorIntensityPerFraction)Get the precursor intensity in the given fraction.- Parameters:
precursorIntensityPerFraction
- the precursor intensities per fraction map
-
getPrecursorIntensityAveragePerFraction
Get the average precursor intensity in the given fraction. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the average precursor intensity in the given fraction
-
getPrecursorIntensityAveragePerFraction
Returns the fraction precursor intensity average map.- Returns:
- the fraction precursor intensity average map
-
getPrecursorIntensitySummedPerFraction
Get the summed precursor intensity in the given fraction. Null if not found.- Parameters:
fraction
- the fraction- Returns:
- the summed precursor intensity in the given fraction
-
getPrecursorIntensitySummedPerFraction
Returns the fraction summed intensity map.- Returns:
- the fraction summed intensity map
-
getManualValidation
public boolean getManualValidation()Indicates whether the match validation was manually inspected.- Returns:
- a boolean indicating whether the match validation was manually inspected
-
setManualValidation
public void setManualValidation(boolean manualValidation)Sets whether the match validation was manually inspected.- Parameters:
manualValidation
- a boolean indicating whether the match validation was manually inspected
-
setQcResult
Sets whether the match passed a quality control check.- Parameters:
criterion
- the QC criterionvalidated
- boolean indicating whether the test was passed
-
isQcPassed
Indicates whether the given QC check was passed. Null if not found.- Parameters:
criterion
- the QC criterion- Returns:
- a boolean indicating whether the test was passed
-
getQcCriteria
Returns the list of QC checks made for this match. Null if not found.- Returns:
- the list of QC checks made for this match in a set
-
getQcFilters
Returns the qc filters map.- Returns:
- the qc filters map
-
resetQcResults
public void resetQcResults()Resets the results of the QC filters. -
hasQcFilters
public boolean hasQcFilters()Indicates whether QC filters were implemented for this match.- Returns:
- a boolean indicating whether QC filters were implemented for this match
-
setIntermediateScore
Adds an intermediate score.- Parameters:
scoreId
- the index of the scorescore
- the value of the score
-
setIntermediateScores
-
createIntermediateScoreMap
public void createIntermediateScoreMap()Instantiates the intermediate scores map if null. -
getIntermediateScore
Returns the desired intermediate score. Null if not found.- Parameters:
scoreId
- the index of the score- Returns:
- the intermediate score
-
getIntermediateScores
Returns the intermediate scores map.- Returns:
- the intermediate scores map
-
transformScore
public static double transformScore(double rawScore)Returns a score from a raw score where the score = -10*log(rawScore). The maximum score is 100 and raw scores smaller or equal to zero have a score of 100.- Parameters:
rawScore
- the raw score- Returns:
- the score
-
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
-