com.compomics.util.experiment.identification.ptm
Class PTMLocationScores

java.lang.Object
  extended by com.compomics.util.experiment.identification.ptm.PTMLocationScores

public class PTMLocationScores
extends Object

This class scores PTM locations using various scores.

Author:
Marc

Constructor Summary
PTMLocationScores()
           
 
Method Summary
static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide, ArrayList<PTM> ptms, MSnSpectrum spectrum, HashMap<Ion.IonType,ArrayList<Integer>> iontypes, ArrayList<Integer> charges, int precursorCharge, double mzTolerance)
          Returns the A-score for the best PTM location without accounting for neutral losses.
static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide, ArrayList<PTM> ptms, MSnSpectrum spectrum, HashMap<Ion.IonType,ArrayList<Integer>> iontypes, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, double mzTolerance)
          Returns the A-score for the best PTM location accounting for neutral losses.
static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide, ArrayList<PTM> ptms, MSnSpectrum spectrum, HashMap<Ion.IonType,ArrayList<Integer>> iontypes, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, double mzTolerance, boolean accountNeutralLosses)
          Returns the A-score for the best PTM location.
static HashMap<PeptideFragmentIon,ArrayList<IonMatch>> getPTMPlotData(Peptide peptide, PTM ptm, int nPTM, MSnSpectrum spectrum, HashMap<Ion.IonType,ArrayList<Integer>> iontypes, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, double mzTolerance, double intensityLimit)
          Returns the PTM plot series in the JFreechart format for one PSM.
static PtmtableContent getPTMTableContent(Peptide peptide, PTM ptm, int nPTM, MSnSpectrum spectrum, HashMap<Ion.IonType,ArrayList<Integer>> iontypes, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, double mzTolerance, double intensityLimit)
          Get the PTM table content.
static HashMap<Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum, double mzTolerance)
          Generates a map containing the spectra filtered on intensity with a basis of 20*m/z tolerance indexed by the depth used.
static HashMap<Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum, double mzTolerance, int depthMax)
          Generates a map containing the spectra filtered on intensity with a basis of 20*m/z 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

PTMLocationScores

public PTMLocationScores()
Method Detail

getAScore

public static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide,
                                                           ArrayList<PTM> ptms,
                                                           MSnSpectrum spectrum,
                                                           HashMap<Ion.IonType,ArrayList<Integer>> iontypes,
                                                           ArrayList<Integer> charges,
                                                           int precursorCharge,
                                                           double mzTolerance)
                                                    throws IOException,
                                                           IllegalArgumentException,
                                                           InterruptedException,
                                                           FileNotFoundException,
                                                           ClassNotFoundException
Returns the A-score for the best PTM location without accounting for neutral losses. In case the two best locations score the same they are both given with the score of 0. Note that PTMs found on peptides must be loaded in the PTM factory.

Parameters:
peptide - The peptide of interest
ptms - The PTMs to score, for instance different phosphorylations. These PTMs are considered as indistinguishable, i.e. of same mass.
spectrum - The corresponding spectrum
iontypes - The fragment ions to look for
charges - The fragment ions charges to look for
precursorCharge - The precursor charge
mzTolerance - The m/z tolerance to use
Returns:
a map containing the best or two best PTM location(s) and the corresponding A-score
Throws:
IOException - exception thrown whenever an error occurred while reading a protein sequence
IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
InterruptedException - exception thrown whenever an error occurred while reading a protein sequence
FileNotFoundException
ClassNotFoundException

getAScore

public static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide,
                                                           ArrayList<PTM> ptms,
                                                           MSnSpectrum spectrum,
                                                           HashMap<Ion.IonType,ArrayList<Integer>> iontypes,
                                                           NeutralLossesMap neutralLosses,
                                                           ArrayList<Integer> charges,
                                                           int precursorCharge,
                                                           double mzTolerance)
                                                    throws IOException,
                                                           IllegalArgumentException,
                                                           InterruptedException,
                                                           FileNotFoundException,
                                                           ClassNotFoundException
Returns the A-score for the best PTM location accounting for neutral losses. In case the two best locations score the same they are both given with the score of 0. Note that PTMs found on peptides must be loaded in the PTM factory.

Parameters:
peptide - The peptide of interest
ptms - The PTMs to score, for instance different phosphorylations. These PTMs are considered as indistinguishable, i.e. of same mass.
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
Returns:
a map containing the best or two best PTM location(s) and the corresponding A-score
Throws:
IOException - exception thrown whenever an error occurred while reading a protein sequence
IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
InterruptedException - exception thrown whenever an error occurred while reading a protein sequence
FileNotFoundException
ClassNotFoundException

getAScore

public static HashMap<ArrayList<Integer>,Double> getAScore(Peptide peptide,
                                                           ArrayList<PTM> ptms,
                                                           MSnSpectrum spectrum,
                                                           HashMap<Ion.IonType,ArrayList<Integer>> iontypes,
                                                           NeutralLossesMap neutralLosses,
                                                           ArrayList<Integer> charges,
                                                           int precursorCharge,
                                                           double mzTolerance,
                                                           boolean accountNeutralLosses)
                                                    throws IOException,
                                                           IllegalArgumentException,
                                                           InterruptedException,
                                                           FileNotFoundException,
                                                           ClassNotFoundException
Returns the A-score for the best PTM location. In case the two best locations score the same they are both given with the score of 0. 0 is the first amino-acid. Note that PTMs found on peptides must be loaded in the PTM factory.

Parameters:
peptide - The peptide of interest
ptms - The PTMs to score, for instance different phosphorylations. These PTMs are considered as indistinguishable, i.e. of same mass.
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:
IOException - exception thrown whenever an error occurred while reading a protein sequence
IllegalArgumentException - exception thrown whenever an error occurred while reading a protein sequence
InterruptedException - exception thrown whenever an error occurred while reading a protein sequence
FileNotFoundException
ClassNotFoundException

getReducedSpectra

public static HashMap<Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum,
                                                             double mzTolerance)
Generates a map containing the spectra filtered on intensity with a basis of 20*m/z 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 HashMap<Integer,MSnSpectrum> getReducedSpectra(MSnSpectrum baseSpectrum,
                                                             double mzTolerance,
                                                             int depthMax)
Generates a map containing the spectra filtered on intensity with a basis of 20*m/z 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.

getPTMPlotData

public static HashMap<PeptideFragmentIon,ArrayList<IonMatch>> getPTMPlotData(Peptide peptide,
                                                                             PTM ptm,
                                                                             int nPTM,
                                                                             MSnSpectrum spectrum,
                                                                             HashMap<Ion.IonType,ArrayList<Integer>> iontypes,
                                                                             NeutralLossesMap neutralLosses,
                                                                             ArrayList<Integer> charges,
                                                                             int precursorCharge,
                                                                             double mzTolerance,
                                                                             double intensityLimit)
Returns the PTM plot series in the JFreechart format for one PSM.

Parameters:
peptide - The peptide of interest
ptm - The PTM to score
nPTM - The amount of times the PTM is expected
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
intensityLimit -
Returns:
the PTM plot series in the JFreechart format for one PSM.

getPTMTableContent

public static PtmtableContent getPTMTableContent(Peptide peptide,
                                                 PTM ptm,
                                                 int nPTM,
                                                 MSnSpectrum spectrum,
                                                 HashMap<Ion.IonType,ArrayList<Integer>> iontypes,
                                                 NeutralLossesMap neutralLosses,
                                                 ArrayList<Integer> charges,
                                                 int precursorCharge,
                                                 double mzTolerance,
                                                 double intensityLimit)
Get the PTM table content.

Parameters:
peptide - The peptide of interest
ptm - The PTM to score
nPTM - The amount of times the PTM is expected
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
intensityLimit -
Returns:
the PtmtableContent object


Copyright © 2013. All Rights Reserved.