Class InputMap

java.lang.Object
eu.isas.peptideshaker.scoring.maps.InputMap
All Implemented Interfaces:
Serializable

public class InputMap extends Object implements Serializable
This class contains basic information about the hits as imported from the various search engine result files.
Author:
Marc Vaudel
See Also:
  • Constructor Details

    • InputMap

      public InputMap()
      Constructor.
  • Method Details

    • isMultipleAlgorithms

      public boolean isMultipleAlgorithms()
      Returns true for multiple search engines investigations.
      Returns:
      true for multiple search engines investigations
    • getNalgorithms

      public int getNalgorithms()
      Returns the number of algorithms in the input map.
      Returns:
      the number of algorithms in the input map
    • getInputAlgorithms

      public Set<Integer> getInputAlgorithms()
      Returns a set containing the indexes of the algorithms scored in this input map.
      Returns:
      a set containing the indexes of the algorithms scored in this input map
    • getInputAlgorithmsSorted

      public TreeSet<Integer> getInputAlgorithmsSorted()
      Returns the indexes of the algorithms scored in this input map.
      Returns:
      a set containing the indexes of the algorithms scored in this input map
    • getIntermediateScoreInputAlgorithms

      public Set<Integer> getIntermediateScoreInputAlgorithms(String fileName)
      Returns the algorithms having an intermediate score for the given spectrum file.
      Parameters:
      fileName - the name of the spectrum file of interest
      Returns:
      the algorithm having an intermediate score for this file
    • getTargetDecoyMap

      public TargetDecoyMap getTargetDecoyMap(int algorithm)
      Returns the target decoy map attached to the given algorithm.
      Parameters:
      algorithm - the utilities index of the algorithm of interest
      Returns:
      the target decoy map of interest
    • getTargetDecoyMap

      public TargetDecoyMap getTargetDecoyMap(int algorithm, String fileName)
      Returns the target decoy map attached to the given algorithm for a specific spectrum file. Null if not found.
      Parameters:
      algorithm - the utilities index of the algorithm of interest
      fileName - the name of the spectrum file of interest
      Returns:
      the target decoy map of interest
    • getMap

      public TargetDecoyMap getMap()
      Returns the first target/decoy map of the input map in case a single algorithm was used.
      Returns:
      the first target/decoy map of the input map
    • estimateProbabilities

      public void estimateProbabilities(com.compomics.util.waiting.WaitingHandler waitingHandler)
      Estimates the posterior error probability for each search engine.
      Parameters:
      waitingHandler - the handler displaying feedback to the user
    • getProbability

      public double getProbability(int searchEngine, double eValue)
      returns the posterior error probability associated to the given e-value for the given search-engine (indexed by its utilities index)
      Parameters:
      searchEngine - The search engine
      eValue - The e-value
      Returns:
      the posterior error probability corresponding
    • addEntry

      public void addEntry(int searchEngine, String spectrumFileName, double eValue, boolean isDecoy)
      Adds an entry to the input map.
      Parameters:
      searchEngine - The search engine used referenced by its compomics index
      spectrumFileName - the name of the inspected spectrum file
      eValue - The search engine e-value
      isDecoy - boolean indicating whether the hit was decoy
    • getNEntries

      public int getNEntries()
      Returns the number of entries in the input map.
      Returns:
      the number of entries
    • getNEntriesSpecific

      public int getNEntriesSpecific()
      Returns the number of entries in the specific input map.
      Returns:
      the number of entries
    • resetAdvocateContributions

      public void resetAdvocateContributions(String fileName)
      Resets the advocate contribution mappings for the given file.
      Parameters:
      fileName - the file of interest
    • resetAdvocateContributions

      public void resetAdvocateContributions()
      Resets the advocate contribution mappings.
    • addAdvocateContribution

      public void addAdvocateContribution(int advocateId, String fileName, boolean unique)
      Adds an advocate contribution.
      Parameters:
      advocateId - the index of the advocate
      fileName - the name of the spectrum file of interest
      unique - boolean indicating whether the advocate was the only advocate for the considered assumption
    • addPeptideShakerHit

      public void addPeptideShakerHit(String fileName, boolean unique)
      Adds a PeptideShaker hit for the given file.
      Parameters:
      fileName - the name of the spectrum file of interest
      unique - boolean indicating whether the advocate was the only advocate for the considered assumption
    • getAdvocateContribution

      public int getAdvocateContribution(int advocateId, String fileName)
      Returns the contribution of validated hits of the given advocate for the given file.
      Parameters:
      advocateId - the advocate index
      fileName - the name of the spectrum file
      Returns:
      the number of validated hits supported by this advocate
    • getPeptideShakerHits

      public int getPeptideShakerHits(String fileName)
      Returns the number of validated hits for the given file.
      Parameters:
      fileName - the name of the spectrum file
      Returns:
      the number of validated hits supported by this advocate
    • getAdvocateContribution

      public int getAdvocateContribution(int advocateId)
      Returns the contribution of validated hits of the given advocate for the entire dataset.
      Parameters:
      advocateId - the advocate index
      Returns:
      the number of validated hits supported by this advocate
    • getPeptideShakerHits

      public int getPeptideShakerHits()
      Returns the number of PeptideShaker validated hits for the entire dataset.
      Returns:
      the number of validated hits supported by this advocate
    • getAdvocateUniqueContribution

      public int getAdvocateUniqueContribution(int advocateId, String fileName)
      Returns the contribution of unique validated hits of the given advocate for the given file.
      Parameters:
      advocateId - the advocate index
      fileName - the name of the spectrum file
      Returns:
      the number of validated hits uniquely supported by this advocate
    • getPeptideShakerUniqueContribution

      public int getPeptideShakerUniqueContribution(String fileName)
      Returns the contribution of unique validated hits from PeptideShaker for the given file.
      Parameters:
      fileName - the name of the spectrum file
      Returns:
      the number of validated hits uniquely supported by PeptideShaker
    • getAdvocateUniqueContribution

      public int getAdvocateUniqueContribution(int advocateId)
      Returns the contribution of unique validated hits of the given advocate for the entire dataset.
      Parameters:
      advocateId - the advocate index
      Returns:
      the number of validated hits uniquely supported by this advocate
    • getPeptideShakerUniqueContribution

      public int getPeptideShakerUniqueContribution()
      Returns the contribution of unique validated hits by PeptideShaker for the entire dataset.
      Returns:
      the number of validated hits uniquely supported by this advocate
    • getTargetDecoyMaps

      public ArrayList<TargetDecoyMap> getTargetDecoyMaps()
      Returns a list of all target decoy maps contained in this mapping.
      Returns:
      all target decoy maps contained in this mapping
    • hasAdvocateContribution

      public boolean hasAdvocateContribution()
      Indicates whether the advocate contributions are present in this map.
      Returns:
      a boolean indicating whether the advocate contributions are present in this map
    • setIntermediateScore

      public void setIntermediateScore(String fileName, int advocateIndex, int scoreIndex, double score, boolean decoy, com.compomics.util.parameters.identification.advanced.PsmScoringParameters psmScoringPreferences)
      Adds an intermediate score for a given match.
      Parameters:
      fileName - the name of the spectrum file of interest
      advocateIndex - the index of the advocate
      scoreIndex - the index of the score
      score - the score of the match
      decoy - indicates whether the match maps to a target or a decoy protein
      psmScoringPreferences - the psm scoring preferences
    • getIntermediateScoreMap

      public TargetDecoyMap getIntermediateScoreMap(String fileName, int advocateIndex, int scoreIndex)
      Returns the target decoy map associated to a given spectrum file, advocate and score type. Null if not found.
      Parameters:
      fileName - the name of the spectrum file
      advocateIndex - the index of the advocate
      scoreIndex - the index of the score
      Returns:
      the target decoy map associated to the given spectrum file, advocate and score type