Class RunMzDeviation

java.lang.Object
eu.isas.peptideshaker.recalibration.RunMzDeviation

public class RunMzDeviation
extends Object
This class computes the mz deviations for a a given run (i.e. file).
Author:
Marc Vaudel
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int mzBinSize
    The bin size in m/z in number of MS/MS spectra.
    static int rtBinSize
    The bin size in retention time in number of MS/MS spectra.
  • Constructor Summary

    Constructors 
    Constructor Description
    RunMzDeviation​(String spectrumFileNameWithoutExtension, com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.waiting.WaitingHandler waitingHandler)
    Creates a map of m/z deviations for a given run.
  • Method Summary

    Modifier and Type Method Description
    double getFragmentMzError​(double precursorRT, double fragmentMZ)
    Returns the fragment error at the given retention time and fragment m/z.
    ArrayList<Double> getFragmentMZList​(double precursorRT)
    Returns the list for fragment ion m/z bins at a given retention time point.
    double getOffset​(double rtBin)
    Returns the precursor m/z deviation offset at a given retention time point.
    double getPrecursorMzCorrection​(double precursorMz, double precursorRT)
    Returns an interpolation of the median error in the bins surrounding the given precursor m/z when recalibrating with m/z only.
    ArrayList<Double> getPrecursorRTList()
    Returns the list of precursor retention time bins.
    double getSlope​(double rtBin)
    Returns the precursor m/z deviation slope at a given retention time point.
    double[] recalibrateFragmentMz​(double precursorRT, double[] originalMz)
    Recalibrate an m/z array.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • RunMzDeviation

      public RunMzDeviation​(String spectrumFileNameWithoutExtension, com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.waiting.WaitingHandler waitingHandler)
      Creates a map of m/z deviations for a given run.
      Parameters:
      spectrumFileNameWithoutExtension - the name of the file of the run
      identification - the corresponding identification
      sequenceProvider - the protein sequence provider
      spectrumProvider - the spectrum provider
      identificationParameters - the identification parameters
      waitingHandler - a waiting handler displaying the progress and allowing the user to cancel the process. Can be null
  • Method Details

    • getPrecursorRTList

      public ArrayList<Double> getPrecursorRTList()
      Returns the list of precursor retention time bins.
      Returns:
      the list of precursor retention time bins
    • getFragmentMZList

      public ArrayList<Double> getFragmentMZList​(double precursorRT)
      Returns the list for fragment ion m/z bins at a given retention time point.
      Parameters:
      precursorRT - the precursor retention time
      Returns:
      the list for fragment ion m/z bins
    • getSlope

      public double getSlope​(double rtBin)
      Returns the precursor m/z deviation slope at a given retention time point.
      Parameters:
      rtBin - the retention time bin
      Returns:
      the precursor m/z deviation slope
    • getOffset

      public double getOffset​(double rtBin)
      Returns the precursor m/z deviation offset at a given retention time point.
      Parameters:
      rtBin - the retention time bin
      Returns:
      the precursor m/z deviation offset
    • getPrecursorMzCorrection

      public double getPrecursorMzCorrection​(double precursorMz, double precursorRT)
      Returns an interpolation of the median error in the bins surrounding the given precursor m/z when recalibrating with m/z only.
      Parameters:
      precursorMz - the precursor m/z
      precursorRT - the precursor retention time
      Returns:
      the median error
    • getFragmentMzError

      public double getFragmentMzError​(double precursorRT, double fragmentMZ)
      Returns the fragment error at the given retention time and fragment m/z.
      Parameters:
      precursorRT - the precursor retention time
      fragmentMZ - the fragment m/z
      Returns:
      the error found
    • recalibrateFragmentMz

      public double[] recalibrateFragmentMz​(double precursorRT, double[] originalMz)
      Recalibrate an m/z array.
      Parameters:
      precursorRT - the precursor retention time
      originalMz - the original m/z
      Returns:
      the recalibrated m/z