|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpeakml.Annotatable
peakml.IPeak
peakml.Spectrum<gPeak>
gPeak - The type of peak stored in the spectrum, either Centroid or Profile.public class Spectrum<gPeak extends Peak>
Type-binding for a spectrum (a single measurement on a mass spectrometer). It's
simply an extension of IPeakSet, which contains all the needed functionality
already but has not been made specific. In the implementation of this class
the only types that are allowed are those that inherit from Peak.
| Nested Class Summary | |
|---|---|
static class |
Spectrum.DataFormat
The format (centroid or profile) of the data |
static class |
Spectrum.Type
The type of data stored in the spectrum. |
| Nested classes/interfaces inherited from class peakml.IPeak |
|---|
IPeak.AnnotationAscending, IPeak.AnnotationDescending, IPeak.MatchCompare<Type>, IPeak.RelationCompare<Type> |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Spectrum(PeakData<gPeak> peakdata)
Calls the constructor Spectrum(PeakData, Type, Polarity, double) and assumes
for type Spectrum.Type.MS1, for polarity Polarity.NEUTRAL and for precursormass -1. |
|
Spectrum(PeakData<gPeak> peakdata,
Polarity polarity)
Calls the constructor Spectrum(PeakData, Type, Polarity, double) and assumes
for type Spectrum.Type.MS1 and for precursormass -1. |
|
Spectrum(PeakData<gPeak> peakdata,
Spectrum.Type type,
Polarity polarity)
Calls the constructor Spectrum(PeakData, Type, Polarity, double) and assumes
for precursor mass -1. |
|
Spectrum(PeakData<gPeak> peakdata,
Spectrum.Type type,
Polarity polarity,
double precursormass)
Standard constructor for the spectrum. |
|
| Method Summary | |
|---|---|
void |
addMSnSpectrum(Spectrum<gPeak> spectrum)
Adds the given MSn spectrum to the list. |
double |
getIntensity()
Retrieves the measured intensity for this peak. |
double |
getMass()
Retrieves the mass of this peak. |
int |
getMeasurementID()
Returns an optional measurement-id for this peak. |
Spectrum<gPeak> |
getMSnSpectrum(int index)
Returns the MSn spectrum at the given index. |
int |
getNrMSnSpecra()
Returns the number of MSn spectra associated with this spectrum. |
int |
getNrPeaks()
Returns the number of peaks associated to this spectrum. |
int |
getPatternID()
Returns an optional id for the peak. |
PeakData<gPeak> |
getPeakData()
Returns the PeakData container associated to this spectrum. |
java.util.Vector<gPeak> |
getPeaks()
Returns a vector with all the peaks. |
Polarity |
getPolarity()
Returns the polarity of the data in the spectrum. |
double |
getRetentionTime()
Retrieves the retention time for this peak. |
int |
getScanID()
Retrieves the scan-id for this peak. |
Signal |
getSignal()
Calculates the signal for this IPeak object. |
Spectrum.Type |
getType()
Returns the type of the spectrum. |
java.util.Iterator<gPeak> |
iterator()
|
void |
setIntensity(double intensity)
Sets the intensity of this peak, for more information on mass see IPeak.getIntensity(). |
void |
setMass(double mass)
Sets the mass of this peak, for more information on mass see IPeak.getMass(). |
void |
setMeasurementID(int id)
Sets the profile-id of this peak, for more information on mass see IPeak.getMeasurementID(). |
void |
setPatternID(int id)
Sets the pattern-id of this peak, for more information on mass see IPeak.getPatternID(). |
void |
setRetentionTime(double retentiontime)
Sets the retention time for this peak, for more information on retention time see IPeak.setRetentionTime(double). |
void |
setScanID(int scan)
Sets the scan-id for this peak, for more information on scan-id see IPeak.getScanID(). |
| Methods inherited from class peakml.IPeak |
|---|
findRelatedPeaks, getBestPeakOnMass, getBestPeakOnRT, match, match, peaksOfMeasurements, sha1, unpack |
| Methods inherited from class peakml.Annotatable |
|---|
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotations, getAnnotation, getAnnotations, removeAllAnnotations, removeAnnotation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Spectrum(PeakData<gPeak> peakdata)
Spectrum(PeakData, Type, Polarity, double) and assumes
for type Spectrum.Type.MS1, for polarity Polarity.NEUTRAL and for precursormass -1.
peakdata - The PeakData instance containing the data of this spectrum.
public Spectrum(PeakData<gPeak> peakdata,
Polarity polarity)
Spectrum(PeakData, Type, Polarity, double) and assumes
for type Spectrum.Type.MS1 and for precursormass -1.
peakdata - The PeakData instance containing the data of this spectrum.polarity - The polarity of the measurement (positive, negative, neutral).
public Spectrum(PeakData<gPeak> peakdata,
Spectrum.Type type,
Polarity polarity)
Spectrum(PeakData, Type, Polarity, double) and assumes
for precursor mass -1.
peakdata - The PeakData instance containing the data of this spectrum.type - The type of spectrum (ms, msn, pda)polarity - The polarity of the measurement (positive, negative, neutral).
public Spectrum(PeakData<gPeak> peakdata,
Spectrum.Type type,
Polarity polarity,
double precursormass)
IPeakSet.IPeakSet(List). When the spectrum is made up of profile data,
the peak selection must already have been performed and all the data-points making
up a peak in the spectrum have been stored within the Profile class.
peakdata - The PeakData instance containing the data of this spectrum.type - The type of spectrum (ms, msn, pda)polarity - The polarity of the measurement (positive, negative, neutral).precursormass - The precursor mass, only valid if type is Spectrum.Type.MSn.| Method Detail |
|---|
public Spectrum.Type getType()
public Polarity getPolarity()
public int getNrPeaks()
public int getNrMSnSpecra()
public Spectrum<gPeak> getMSnSpectrum(int index)
throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException - Thrown when the index is out of bounds.public void addMSnSpectrum(Spectrum<gPeak> spectrum)
spectrum - The MSn spectrum to be added.public java.util.Vector<gPeak> getPeaks()
public PeakData<gPeak> getPeakData()
PeakData container associated to this spectrum.
public double getRetentionTime()
IPeakdouble rt = peak.getRetentionTime(); int minutes = (int) (rt / 60); int seconds = (int) (rt % 60);
getRetentionTime in class IPeakpublic void setRetentionTime(double retentiontime)
IPeakIPeak.setRetentionTime(double). It is possible that the class
implementing this interface does not support this method.
setRetentionTime in class IPeakretentiontime - The new retention time for this peak.public int getScanID()
IPeak
getScanID in class IPeakpublic void setScanID(int scan)
IPeakIPeak.getScanID(). It is possible that the class implementing this
interface does not support this method.
setScanID in class IPeakscan - The new scan for this peak.public double getIntensity()
IPeak
getIntensity in class IPeakpublic void setIntensity(double intensity)
IPeakIPeak.getIntensity(). It is possible that the class implementing this interface
does not support this method.
setIntensity in class IPeakintensity - The new intensity for this peak.public double getMass()
IPeak
getMass in class IPeakpublic void setMass(double mass)
IPeakIPeak.getMass(). It is possible that the class implementing this interface
does not support this method.
setMass in class IPeakmass - The new mass for this peak.public int getMeasurementID()
IPeakHeader.
getMeasurementID in class IPeakpublic void setMeasurementID(int id)
IPeakIPeak.getMeasurementID(). It is possible that the class implementing this
interface does not support this method.
setMeasurementID in class IPeakid - The new profile-id for this peak.public int getPatternID()
IPeak
getPatternID in class IPeakpublic void setPatternID(int id)
IPeakIPeak.getPatternID(). It is possible that the class implementing this
interface does not support this method.
setPatternID in class IPeakid - The new id for this peakspublic Signal getSignal()
IPeak
getSignal in class IPeakpublic java.util.Iterator<gPeak> iterator()
iterator in interface java.lang.Iterable<gPeak extends Peak>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||