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 Details

    • NOT_GROUP

      public static final int NOT_GROUP
      Static 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 RELATED
      Static 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_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).
      See Also:
      Constant Field Values
    • UNRELATED

      public static final int UNRELATED
      Static index for a protein group: 3 - unrelated proteins proteins or peptide shared by unrelated proteins.
      See Also:
      Constant Field Values
    • dummy

      public static final PSParameter dummy
      An empty parameter used for instantiation.
  • Constructor Details

  • 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

      public Double 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

      public void setQcFilters​(HashMap<String,​Boolean> qcFilters)
      Sets the qc filters.
      Parameters:
      qcFilters - the qc filters
    • getMatchValidationLevel

      public MatchValidationLevel getMatchValidationLevel()
      Returns the validation level of the match.
      Returns:
      the validation level of the match
    • setMatchValidationLevel

      public void setMatchValidationLevel​(MatchValidationLevel matchValidationLevel)
      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

      public String getProteinInferenceClassAsString()
      Returns the protein inference class as a string for the given integer-based class
      Returns:
      the group class description
    • getProteinInferenceClassAsString

      public static String getProteinInferenceClassAsString​(int matchClass)
      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

      public HashMap<String,​Integer> getValidatedPeptidesPerFraction()
      Returns the number of validated peptides per fraction.
      Returns:
      the number of validated peptides per fraction
    • getValidatedSpectraPerFraction

      public HashMap<String,​Integer> getValidatedSpectraPerFraction()
      Returns the number of validated spectra per fraction.
      Returns:
      the number of validated spectra per fraction
    • setFractionScore

      public void setFractionScore​(String fraction, double confidence)
      Sets the fraction confidence.
      Parameters:
      fraction - the fraction
      confidence - the confidence
    • setFractionScore

      public void setFractionScore​(HashMap<String,​Double> fractionScore)
      Sets the fraction score map.
      Parameters:
      fractionScore - the fraction score map
    • getFractionScore

      public Double getFractionScore​(String fraction)
      Returns the fraction score. Null if not found.
      Parameters:
      fraction - the fraction
      Returns:
      the fraction score
    • getFractions

      public Set<String> getFractions()
      Return the fractions where this match was found. Null if not found.
      Returns:
      the fractions where this match was found
    • getFractionScore

      public HashMap<String,​Double> getFractionScore()
      Return the fractions where this match was found. Null if not found.
      Returns:
      the fractions where this match was found
    • setFractionPEP

      public void setFractionPEP​(String fraction, Double confidence)
      Sets the fraction confidence.
      Parameters:
      fraction - the fraction
      confidence - the confidence
    • setFractionPEP

      public void setFractionPEP​(HashMap<String,​Double> fractionPEP)
    • getFractionPEP

      public Double getFractionPEP​(String fraction)
      Returns the fraction pep. Null if not found.
      Parameters:
      fraction - the fraction
      Returns:
      the fraction pep
    • getFractionPEP

      public HashMap<String,​Double> getFractionPEP()
      Returns the fraction pep map.
      Returns:
      the fraction pep map
    • getFractionConfidence

      public Double getFractionConfidence​(String fraction)
      Returns the fraction confidence. Null if not found.
      Parameters:
      fraction - the fraction
      Returns:
      the fraction confidence
    • getFractionValidatedPeptides

      public int getFractionValidatedPeptides​(String fraction)
      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

      public void setValidatedPeptidesPerFraction​(HashMap<String,​Integer> validatedPeptidesPerFraction)
      Get the number of validated peptides in the given fraction.
      Parameters:
      validatedPeptidesPerFraction - the validated peptides per fraction map
    • getFractionValidatedSpectra

      public Integer getFractionValidatedSpectra​(String fraction)
      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

      public void setValidatedSpectraPepFraction​(HashMap<String,​Integer> validatedSpectraPerFraction)
      Get the number of validated spectra in the given fraction.
      Parameters:
      validatedSpectraPerFraction - the validated spectra per fraction map
    • getPrecursorIntensityPerFraction

      public ArrayList<Double> getPrecursorIntensityPerFraction​(String fraction)
      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

      public HashMap<String,​ArrayList<Double>> 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

      public Double getPrecursorIntensityAveragePerFraction​(String fraction)
      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

      public HashMap<String,​Double> getPrecursorIntensityAveragePerFraction()
      Returns the fraction precursor intensity average map.
      Returns:
      the fraction precursor intensity average map
    • getPrecursorIntensitySummedPerFraction

      public Double getPrecursorIntensitySummedPerFraction​(String fraction)
      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

      public HashMap<String,​Double> 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

      public void setQcResult​(String criterion, boolean validated)
      Sets whether the match passed a quality control check.
      Parameters:
      criterion - the QC criterion
      validated - boolean indicating whether the test was passed
    • isQcPassed

      public Boolean isQcPassed​(String criterion)
      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

      public Set<String> 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

      public HashMap<String,​Boolean> 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

      public void setIntermediateScore​(Integer scoreId, Double score)
      Adds an intermediate score.
      Parameters:
      scoreId - the index of the score
      score - the value of the score
    • setIntermediateScores

      public void setIntermediateScores​(HashMap<Integer,​Double> intermediateScores)
    • createIntermediateScoreMap

      public void createIntermediateScoreMap()
      Instantiates the intermediate scores map if null.
    • getIntermediateScore

      public Double getIntermediateScore​(int scoreId)
      Returns the desired intermediate score. Null if not found.
      Parameters:
      scoreId - the index of the score
      Returns:
      the intermediate score
    • getIntermediateScores

      public HashMap<Integer,​Double> 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 interface UrParameter
      Returns:
      the parameter key