com.compomics.util.experiment.identification
Class SpectrumAnnotator

java.lang.Object
  extended by com.compomics.util.experiment.identification.SpectrumAnnotator

public class SpectrumAnnotator
extends Object

The spectrum annotator annotates peaks in a spectrum.

Author:
Marc

Nested Class Summary
 class SpectrumAnnotator.SpectrumAnnotationMap
          A support class for "hiding" the HashMap inside an object for easier use in other methods.
 
Constructor Summary
SpectrumAnnotator()
          Constructor
 
Method Summary
 SpectrumAnnotator.SpectrumAnnotationMap annotateSpectrum(Peptide peptide, MSnSpectrum spectrum, double massTolerance, double intensityLimit)
          Annotates a spectrum and returns a map containing the annotations: ion type -> charge -> Ion match
 Vector<DefaultSpectrumAnnotation> getSpectrumAnnotations(Peptide peptide, MSnSpectrum spectrum, double massTolerance, double intensityLimit)
          Annotates a spectrum and returns the annotations as a vector of DefaultSpectrumAnnotation that can be added to a SpectrumPanel.
 Vector<DefaultSpectrumAnnotation> getSpectrumAnnotations(SpectrumAnnotator.SpectrumAnnotationMap annotations)
          Annotates a spectrum and returns the annotations as a vector of DefaultSpectrumAnnotation that can be added to a SpectrumPanel.
 ArrayList<IonMatch> matchPeak(Peptide peptide, Peak peak, double massTolerance, Charge charge)
          This method matches the potential fragment ions of a given peptide with a given peak.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpectrumAnnotator

public SpectrumAnnotator()
Constructor

Method Detail

matchPeak

public ArrayList<IonMatch> matchPeak(Peptide peptide,
                                     Peak peak,
                                     double massTolerance,
                                     Charge charge)
This method matches the potential fragment ions of a given peptide with a given peak.

Parameters:
peptide - The peptide
peak - The peak to match
massTolerance - The mass tolerance to use (in Dalton)
charge - The charge of the fragment to search for
Returns:
A list of potential ion matches

getSpectrumAnnotations

public Vector<DefaultSpectrumAnnotation> getSpectrumAnnotations(Peptide peptide,
                                                                MSnSpectrum spectrum,
                                                                double massTolerance,
                                                                double intensityLimit)
Annotates a spectrum and returns the annotations as a vector of DefaultSpectrumAnnotation that can be added to a SpectrumPanel.

Parameters:
peptide - The theoretic peptide to match
spectrum - The spectrum
massTolerance - The mass tolerance to use (in Dalton)
intensityLimit - The minimal intensity to search for
Returns:
a vector of DefaultSpectrumAnnotations

getSpectrumAnnotations

public Vector<DefaultSpectrumAnnotation> getSpectrumAnnotations(SpectrumAnnotator.SpectrumAnnotationMap annotations)
Annotates a spectrum and returns the annotations as a vector of DefaultSpectrumAnnotation that can be added to a SpectrumPanel.

Parameters:
annotations - the annotations to transform into DefaultSpectrumAnnotations
Returns:
a vector of DefaultSpectrumAnnotations

annotateSpectrum

public SpectrumAnnotator.SpectrumAnnotationMap annotateSpectrum(Peptide peptide,
                                                                MSnSpectrum spectrum,
                                                                double massTolerance,
                                                                double intensityLimit)
Annotates a spectrum and returns a map containing the annotations: ion type -> charge -> Ion match

Parameters:
peptide - The theoretic peptide to match
spectrum - The spectrum
massTolerance - The mass tolerance to use (in Dalton)
intensityLimit - The minimal intensity to search for
Returns:
a map containing the annotations


Copyright © 2011. All Rights Reserved.