com.compomics.util.experiment.identification.scoring
Class PsmScores

java.lang.Object
  extended by com.compomics.util.experiment.identification.scoring.PsmScores

public class PsmScores
extends java.lang.Object

This class contains different ways of scoring a match.

Author:
Marc Vaudel

Constructor Summary
PsmScores()
           
 
Method Summary
static double getAScorePeptideScore(Peptide peptide, MSnSpectrum spectrum, java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes, NeutralLossesMap neutralLosses, java.util.ArrayList<java.lang.Integer> charges, int precursorCharge, double mzTolerance, boolean accountNeutralLosses)
          Returns a PSM score like the peptide score calculated for the A-score.
static java.util.HashMap<java.lang.Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum, double mzTolerance)
          Generates a map containing the spectra filtered on intensity with a basis of 20*mz tolerance indexed by the depth used.
static java.util.HashMap<java.lang.Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum, double mzTolerance, int depthMax)
          Generates a map containing the spectra filtered on intensity with a basis of 20*mz tolerance indexed by the depth used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsmScores

public PsmScores()
Method Detail

getAScorePeptideScore

public static double getAScorePeptideScore(Peptide peptide,
                                           MSnSpectrum spectrum,
                                           java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes,
                                           NeutralLossesMap neutralLosses,
                                           java.util.ArrayList<java.lang.Integer> charges,
                                           int precursorCharge,
                                           double mzTolerance,
                                           boolean accountNeutralLosses)
                                    throws java.io.IOException,
                                           java.lang.IllegalArgumentException,
                                           java.lang.InterruptedException
Returns a PSM score like the peptide score calculated for the A-score.

Parameters:
peptide - The peptide of interest
spectrum - The corresponding spectrum
iontypes - The fragment ions to look for
neutralLosses - The neutral losses to look for
charges - The fragment ions charges to look for
precursorCharge - The precursor charge
mzTolerance - The m/z tolerance to use
accountNeutralLosses - a boolean indicating whether or not the calculation shall account for neutral losses.
Returns:
a map containing the best or two best PTM location(s) and the corresponding A-score
Throws:
java.io.IOException - exception thrown whenever an error occurred while reading a protein sequence
java.lang.IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
java.lang.InterruptedException - exception thrown whenever an error occurred while reading a protein sequence

getReducedSpectra

public static java.util.HashMap<java.lang.Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum,
                                                                                 double mzTolerance)
Generates a map containing the spectra filtered on intensity with a basis of 20*mz tolerance indexed by the depth used. (see A-score paper for more details).

Parameters:
baseSpectrum - the base spectrum
mzTolerance - the m/z tolerance
Returns:
a map containing the spectra filtered indexed by peak depth.

getReducedSpectra

public static java.util.HashMap<java.lang.Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum,
                                                                                 double mzTolerance,
                                                                                 int depthMax)
Generates a map containing the spectra filtered on intensity with a basis of 20*mz tolerance indexed by the depth used. (see A-score paper for more details).

Parameters:
baseSpectrum - the base spectrum
mzTolerance - the m/z tolerance
depthMax - the depth to look into (10 for A-score). If -1 the maximal depth will be used
Returns:
a map containing the spectra filtered indexed by peak depth.


Copyright © 2013. All Rights Reserved.