Class TargetDecoyMap

java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyMap
All Implemented Interfaces:
Serializable

public class TargetDecoyMap extends com.compomics.util.experiment.personalization.ExperimentObject
This map contains the information of a target/decoy strategy.
Author:
Marc Vaudel
See Also:
  • Field Summary

    Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject

    NO_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    TargetDecoyMap(Integer minDecoysInBin)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAll(TargetDecoyMap anOtherMap)
    Adds all the points from another target/decoy map.
    void
    Removes empty points and clears dependent metrics if needed.
    createTargetDecoyPoint(double score)
    Creates the target decoy point of the map at the given score if no other thread has done it before.
    void
    estimateProbabilities(com.compomics.util.waiting.WaitingHandler waitingHandler)
    Estimates the posterior error probabilities in this map.
    int
    Returns the size of the map.
    double
    Returns the minimal FDR which can be achieved in this dataset.
    int
    getNDecoy(double score)
    Returns the number of decoy hits found at the given score.
    int
    Returns the Nmax metric.
    int
    getNTarget(double score)
    Returns the number of target hits found at the given score.
    Returns the number of target hits before the first decoy hit.
    double
    getProbability(double score)
    Returns the posterior error probability estimated at the given score.
    double
    Returns the minimal detectable PEP variation in percent.
    Returns the sorted scores implemented in this map.
    Returns the current target decoy results.
    Returns the target decoy series.
    int
    Returns the window size used for pep estimation.
    void
    put(double score, boolean isDecoy)
    Puts a new point in the target/decoy map at the given score.
    void
    remove(double score, boolean isDecoy)
    Removes a point in the target/decoy map at the given score.
    void
    setWindowSize(int windowSize)
    Sets the window size used for pep estimation.
    boolean
    suspiciousInput(double initialFDR)
    Returns a boolean indicating if a suspicious input was detected.

    Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject

    addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TargetDecoyMap

      public TargetDecoyMap()
      Constructor.
    • TargetDecoyMap

      public TargetDecoyMap(Integer minDecoysInBin)
      Constructor.
      Parameters:
      minDecoysInBin - the number of decoy matches to include in the first bin to set the bin size
  • Method Details

    • getProbability

      public double getProbability(double score)
      Returns the posterior error probability estimated at the given score.
      Parameters:
      score - the given score
      Returns:
      the estimated posterior error probability
    • getNTarget

      public int getNTarget(double score)
      Returns the number of target hits found at the given score.
      Parameters:
      score - the given score
      Returns:
      the number of target hits found at the given score
    • getNDecoy

      public int getNDecoy(double score)
      Returns the number of decoy hits found at the given score.
      Parameters:
      score - the given score
      Returns:
      the number of decoy hits found at the given score
    • put

      public void put(double score, boolean isDecoy)
      Puts a new point in the target/decoy map at the given score.
      Parameters:
      score - The given score
      isDecoy - boolean indicating whether the hit is decoy
    • createTargetDecoyPoint

      public TargetDecoyPoint createTargetDecoyPoint(double score)
      Creates the target decoy point of the map at the given score if no other thread has done it before.
      Parameters:
      score - the score of interest
      Returns:
      the target decoy point of the map at the given score
    • remove

      public void remove(double score, boolean isDecoy)
      Removes a point in the target/decoy map at the given score. Note: it is necessary to run cleanUp() afterwards to clean up the map.
      Parameters:
      score - the given score
      isDecoy - boolean indicating whether the hit is decoy
    • cleanUp

      public void cleanUp()
      Removes empty points and clears dependent metrics if needed.
    • estimateProbabilities

      public void estimateProbabilities(com.compomics.util.waiting.WaitingHandler waitingHandler)
      Estimates the posterior error probabilities in this map.
      Parameters:
      waitingHandler - the handler displaying feedback to the user
    • getnMax

      public int getnMax()
      Returns the Nmax metric.
      Returns:
      the Nmax metric
    • getMinFdr

      public double getMinFdr()
      Returns the minimal FDR which can be achieved in this dataset.
      Returns:
      the minimal FDR which can be achieved in this dataset
    • getResolution

      public double getResolution()
      Returns the minimal detectable PEP variation in percent.
      Returns:
      the minimal detectable PEP variation in percent
    • getnTargetOnly

      public Integer getnTargetOnly()
      Returns the number of target hits before the first decoy hit.
      Returns:
      the number of target hits before the first decoy hit
    • getScores

      public ArrayList<Double> getScores()
      Returns the sorted scores implemented in this map.
      Returns:
      the sorted scores implemented in this map.
    • addAll

      public void addAll(TargetDecoyMap anOtherMap)
      Adds all the points from another target/decoy map.
      Parameters:
      anOtherMap - another target/decoy map
    • suspiciousInput

      public boolean suspiciousInput(double initialFDR)
      Returns a boolean indicating if a suspicious input was detected.
      Parameters:
      initialFDR - the minimal FDR requested for a group
      Returns:
      a boolean indicating if a suspicious input was detected
    • getTargetDecoyResults

      public TargetDecoyResults getTargetDecoyResults()
      Returns the current target decoy results.
      Returns:
      the current target decoy results
    • getTargetDecoySeries

      public TargetDecoySeries getTargetDecoySeries()
      Returns the target decoy series.
      Returns:
      the target decoy series
    • getWindowSize

      public int getWindowSize()
      Returns the window size used for pep estimation.
      Returns:
      the window size used for pep estimation
    • setWindowSize

      public void setWindowSize(int windowSize)
      Sets the window size used for pep estimation.
      Parameters:
      windowSize - the window size used for pep estimation
    • getMapSize

      public int getMapSize()
      Returns the size of the map.
      Returns:
      the size of the map