|
||||||||||
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
public abstract class Spectrum
This class models a spectrum
Field Summary | |
---|---|
protected String |
fileName
spectrum file name |
protected int |
level
The MS level |
protected HashSet<Peak> |
peakList
peak list |
protected String |
scanNumber
scan number or range |
protected double |
scanStartTime
The timepoint when the spectrum was recorded (scan start time in mzML files) |
static String |
SPECTRUM_KEY_SPLITTER
The splitter in the key between spectrumFile and spectrumTitle. |
protected String |
spectrumTitle
spectrum title |
Constructor Summary | |
---|---|
Spectrum()
|
Method Summary | |
---|---|
String |
getFileName()
Returns the file name. |
double |
getIntensityLimit(boolean annotateMostIntensePeaks)
Returns the intensity limit. |
double[] |
getIntensityValuesAsArray()
Returns the intensity values as an array. |
double[][] |
getJFreePeakList()
Format the peaks so they can be plot in JFreeChart. |
int |
getLevel()
Returns at which level the spectrum was recorded. |
double |
getMaxIntensity()
Returns the max intensity value. |
double |
getMaxMz()
Returns the max mz value. |
double |
getMinMz()
Returns the min mz value. |
double[] |
getMzValuesAsArray()
Returns the mz values as an array. |
HashSet<Peak> |
getPeakList()
Returns the peak list. |
HashMap<Double,Peak> |
getPeakMap()
Returns a peak map. |
ArrayList<Double> |
getPeaksAboveIntensityThreshold(double threshold)
Returns an array containing the intensity of all peak above the provided threshold. |
String |
getScanNumber()
Getter for the scan number. |
double |
getScanStartTime()
Returns the scan start time. |
static String |
getSpectrumFile(String spectrumKey)
Convenience method to retrieve the name of a file from the spectrum key. |
String |
getSpectrumKey()
Returns the key of the spectrum. |
static String |
getSpectrumKey(String spectrumFile,
String spectrumTitle)
Convenience method returning the key for a spectrum. |
String |
getSpectrumTitle()
Returns the spectrum title. |
static String |
getSpectrumTitle(String spectrumKey)
Convenience method to retrieve the name of a spectrum from the spectrum key. |
double |
getTotalIntensity()
Returns the total intensity of the spectrum. |
void |
removePeakList()
This method will remove the peak list in order to reduce memory consumption of the model. |
void |
setPeakList(HashSet<Peak> peakList)
Sets the peak list |
void |
setScanNumber(String scanNumber)
Setter for the scan number or range. |
void |
setScanStartTime(double scanStartTime)
Sets the scan start time. |
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject |
---|
addUrParam, getUrParam |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String spectrumTitle
protected String fileName
protected int level
protected HashSet<Peak> peakList
protected String scanNumber
protected double scanStartTime
public static final String SPECTRUM_KEY_SPLITTER
Constructor Detail |
---|
public Spectrum()
Method Detail |
---|
public static String getSpectrumKey(String spectrumFile, String spectrumTitle)
spectrumFile
- The spectrum filespectrumTitle
- The spectrum title
public static String getSpectrumFile(String spectrumKey)
spectrumKey
- the spectrum key
public static String getSpectrumTitle(String spectrumKey)
spectrumKey
- the spectrum key
public String getSpectrumKey()
public String getSpectrumTitle()
public double[][] getJFreePeakList()
public HashMap<Double,Peak> getPeakMap()
public String getScanNumber()
public void setScanNumber(String scanNumber)
scanNumber
- or rangepublic String getFileName()
public int getLevel()
public HashSet<Peak> getPeakList()
public void setPeakList(HashSet<Peak> peakList)
peakList
- HashSet of peaks containing the peaks of the spectrumpublic double getScanStartTime()
public void setScanStartTime(double scanStartTime)
scanStartTime
- the timepoint when the spectrum was recordedpublic void removePeakList()
public double[] getMzValuesAsArray()
public double[] getIntensityValuesAsArray()
public double getTotalIntensity()
public double getMaxIntensity()
public double getMaxMz()
public double getMinMz()
public ArrayList<Double> getPeaksAboveIntensityThreshold(double threshold)
threshold
- the lower threshold
public double getIntensityLimit(boolean annotateMostIntensePeaks)
annotateMostIntensePeaks
- returns 0 if set to false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |