|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.massspectrometry.Spectrum
com.compomics.util.experiment.massspectrometry.MSnSpectrum
public class MSnSpectrum
This class models an MSn spectrum.
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 an mgf bloc. |
String |
asMgf(HashMap<String,String> additionalTags)
Returns the peak list as an mgf bloc. |
Precursor |
getPrecursor()
Returns the precursor. |
void |
setPrecursor(Precursor precursor)
Set the precursor. |
void |
writeMgf(BufferedWriter writer1)
Writes the spectrum in the mgf format using the given writer. |
void |
writeMgf(BufferedWriter mgfWriter,
HashMap<String,String> additionalTags)
Writes the spectrum in the mgf format using the given writer. |
Methods inherited from class com.compomics.util.experiment.massspectrometry.Spectrum |
---|
addPeak, getFileName, getIntensityLimit, getIntensityValuesAsArray, getJFreePeakList, getLevel, getMaxIntensity, getMaxMz, getMinMz, getMzAndIntensityAsArray, getMzValuesAsArray, getPeakList, getPeakMap, getPeaksAboveIntensityThreshold, getRecalibratedPeakList, getScanNumber, getScanStartTime, getSpectrumFile, getSpectrumKey, getSpectrumKey, getSpectrumTitle, getSpectrumTitle, getTotalIntensity, removePeakList, setPeakList, setPeaks, setScanNumber, setScanStartTime, setSpectrumTitle |
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 |
---|
public MSnSpectrum()
public MSnSpectrum(int level, Precursor precursor, String spectrumTitle, String fileName)
level
- MS levelprecursor
- precursorspectrumTitle
- spectrum titlefileName
- file namepublic MSnSpectrum(int level, Precursor precursor, String spectrumTitle, HashMap<Double,Peak> peakMap, String fileName)
level
- MS levelprecursor
- precursorspectrumTitle
- spectrum titlepeakMap
- set of peaksfileName
- file namepublic MSnSpectrum(int level, Precursor precursor, String spectrumTitle, HashMap<Double,Peak> peakMap, String fileName, double scanStartTime)
level
- MS levelprecursor
- precursorspectrumTitle
- spectrum titlepeakMap
- set of peaksfileName
- file namescanStartTime
- The time point when the spectrum was recordedMethod Detail |
---|
public Precursor getPrecursor()
public void setPrecursor(Precursor precursor)
precursor
- the precursor to setpublic String asMgf()
public String asMgf(HashMap<String,String> additionalTags)
additionalTags
- additional tags which will be added after the BEGIN
IONS tag in alphabetic order
public void writeMgf(BufferedWriter writer1) throws IOException
writer1
- a buffered writer where the spectrum will be written
IOException
public void writeMgf(BufferedWriter mgfWriter, HashMap<String,String> additionalTags) throws IOException
mgfWriter
- a buffered writer where the spectrum will be writtenadditionalTags
- additional tags which will be added after the BEGIN
IONS tag in alphabetic order
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |