com.compomics.util.experiment.massspectrometry
Class MSnSpectrum

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.massspectrometry.Spectrum
          extended by com.compomics.util.experiment.massspectrometry.MSnSpectrum
All Implemented Interfaces:
Serializable, Cloneable

public class MSnSpectrum
extends Spectrum

This class models an MSn spectrum.

Author:
Marc Vaudel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.compomics.util.experiment.massspectrometry.Spectrum
fileName, level, peakList, scanNumber, scanStartTime, SPECTRUM_KEY_SPLITTER, spectrumTitle
 
Constructor Summary
MSnSpectrum()
          Constructor for the spectrum.
MSnSpectrum(int level, Precursor precursor, String spectrumTitle, HashMap<Double,Peak> peakMap, String fileName)
          Constructor for the spectrum.
MSnSpectrum(int level, Precursor precursor, String spectrumTitle, HashMap<Double,Peak> peakMap, String fileName, double scanStartTime)
          Constructor for the spectrum.
MSnSpectrum(int level, Precursor precursor, String spectrumTitle, String fileName)
          Minimal constructor for the spectrum.
 
Method Summary
 String asMgf()
          Returns the peak list as mgf bloc.
 Precursor getPrecursor()
          Returns the precursor.
 
Methods inherited from class com.compomics.util.experiment.massspectrometry.Spectrum
addPeak, getFileName, getIntensityLimit, getIntensityValuesAsArray, getJFreePeakList, getLevel, getMaxIntensity, getMaxMz, getMinMz, getMzAndIntensityAsArray, getMzValuesAsArray, getPeakList, getPeakMap, getPeaksAboveIntensityThreshold, getScanNumber, getScanStartTime, getSpectrumFile, getSpectrumKey, getSpectrumKey, getSpectrumTitle, getSpectrumTitle, getTotalIntensity, removePeakList, setPeakList, setScanNumber, setScanStartTime
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSnSpectrum

public MSnSpectrum()
Constructor for the spectrum.


MSnSpectrum

public MSnSpectrum(int level,
                   Precursor precursor,
                   String spectrumTitle,
                   String fileName)
Minimal constructor for the spectrum. The peak list is not loaded in order to reduce memory consumption.

Parameters:
level - MS level
precursor - precursor
spectrumTitle - spectrum title
fileName - file name

MSnSpectrum

public MSnSpectrum(int level,
                   Precursor precursor,
                   String spectrumTitle,
                   HashMap<Double,Peak> peakMap,
                   String fileName)
Constructor for the spectrum.

Parameters:
level - MS level
precursor - precursor
spectrumTitle - spectrum title
peakMap - set of peaks
fileName - file name

MSnSpectrum

public MSnSpectrum(int level,
                   Precursor precursor,
                   String spectrumTitle,
                   HashMap<Double,Peak> peakMap,
                   String fileName,
                   double scanStartTime)
Constructor for the spectrum.

Parameters:
level - MS level
precursor - precursor
spectrumTitle - spectrum title
peakMap - set of peaks
fileName - file name
scanStartTime - The timepoint when the spectrum was recorded
Method Detail

getPrecursor

public Precursor getPrecursor()
Returns the precursor.

Returns:
precursor charge

asMgf

public String asMgf()
Returns the peak list as mgf bloc.

Returns:
the peak list as mgf bloc


Copyright © 2012. All Rights Reserved.