public class MSnSpectrum extends Spectrum
fileName, level, peakList, scanNumber, scanStartTime, SPECTRUM_KEY_SPLITTER, spectrumTitle
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
addUrParam, getParameterKey, getUrParam
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 recordedpublic 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 orderpublic void writeMgf(BufferedWriter writer1) throws IOException
writer1
- a buffered writer where the spectrum will be writtenIOException
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 orderIOException
Copyright © 2013. All Rights Reserved.