|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpeakml.Annotatable
peakml.IPeak
peakml.IPeakSet<Type>
Type - The type of peaks stored in the peakset.public class IPeakSet<Type extends IPeak>
Implementation of a class maintaining a set of peaks. The constructor of this class efficiently pre-calculates a large number of properties from the set of peaks, like min, max and mean values of intensity, mass and scan; furthermore it provides a convenient interface for efficiently looking for specific masses in a large list of peaks by employing a binary search approach.
This class implements theIterable interface, making it possible to
use the construct:
IPeakSetpeakset = ...; for (IPeak peak : peakset) ...;
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class peakml.IPeak |
|---|
IPeak.AnnotationAscending, IPeak.AnnotationDescending, IPeak.MatchCompare<Type>, IPeak.RelationCompare<Type> |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
IPeakSet(java.util.List<Type> set)
Constructs a new peakset with the given set of peaks. |
|
IPeakSet(Type t)
|
|
IPeakSet(Type[] set)
Constructs a new peakset with the given set of peaks. |
|
| Method Summary | |
|---|---|
Type |
get(int pos)
Returns the peak at the given position. |
java.lang.Class<? extends java.lang.Object> |
getContainerClass()
Returns the type of peaks stored in the peakset. |
double |
getIntensity()
Retrieves the measured intensity for this peak. |
double |
getMass()
Retrieves the mass of this peak. |
double |
getMassStdDev()
Calculates the standard deviation on the mass. |
double |
getMaxIntensity()
Returns the maximum intensity of all the peaks stored in this peakset. |
double |
getMaxMass()
Returns the maximum mass of all the peaks stored in this peakset. |
double |
getMaxRetentionTime()
Returns the maximum retention time of all the peaks stored in this peakset. |
int |
getMaxScanID()
Returns the maximum scan-id of all the peaks stored in this peakset. |
double |
getMeanIntensity()
Returns the mean intensity of all the peaks stored in this peakset. |
double |
getMeanMass()
Returns the mean mass of all the peaks stored in this peakset. |
double |
getMeanRetentionTime()
Returns the mean retention time of all the peaks stored in this peakset. |
int |
getMeanScanID()
Returns the mean scan-id of all the peaks stored in this peakset. |
int |
getMeasurementID()
Returns an optional measurement-id for this peak. |
double |
getMedianIntensity()
Returns the median intensity of all the peaks stored in this peakset. |
double |
getMedianMass()
Returns the median mass of all the peaks stored in this peakset. |
double |
getMinIntensity()
Returns the minimum intensity of all the peaks stored in this peakset. |
double |
getMinMass()
Returns the minimum mass of all the peaks stored in this peakset. |
double |
getMinRetentionTime()
Returns the minimum retention time of all the peaks stored in this peakset. |
int |
getMinScanID()
Returns the minimum scan-id of all the peaks stored in this peakset. |
int |
getPatternID()
Returns an optional id for the peak. |
java.util.Vector<Type> |
getPeaks()
Returns the list of peaks stored in this peakset. |
java.util.Vector<Type> |
getPeaksInMassRange(double minmass,
double maxmass)
Returns all the peaks in this peakset with a mass in the range minmass .. |
java.util.Vector<Type> |
getPeaksInRetentionTimeRange(double minrt,
double maxrt)
Returns all the peaks in the given retention time range. |
java.util.Vector<Type> |
getPeaksInScanRange(int minscan,
int maxscan)
Returns all the peaks in the given scan-range. |
java.util.Vector<Type> |
getPeaksOfMass(double mass,
double delta)
Returns all the peaks in this peakset with a mass in the range mass-delta .. |
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. |
int |
indexOfMass(double mass)
Implementation of a binary search for the mass in the peak-list. |
int |
indexOfRetentionTime(double rt)
Implementation of a binary search for a retention time in the peak-list. |
int |
indexOfScan(int scanid)
Implementation of a binary search for a scan in the peak-list. |
java.util.Iterator<Type> |
iterator()
Iterable.iterator() |
void |
resetPatternIDs(int id)
This method sets the pattern id of the peaks stored in this peakset to the given id. |
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(). |
int |
size()
Returns the number of peaks in this peakset. |
| 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 IPeakSet(Type t)
throws java.lang.RuntimeException
java.lang.RuntimeException
public IPeakSet(Type[] set)
throws java.lang.RuntimeException
IPeakSet(List).
set - An array of peaks to be stored in the peakset.
java.lang.RuntimeException - Thrown when a set of size 0 or 1 is passed.
public IPeakSet(java.util.List<Type> set)
throws java.lang.RuntimeException
set - A list of peaks to be stored in the peakset.
java.lang.RuntimeException - Thrown when a set of size 0 or 1 is passed.| Method Detail |
|---|
public java.lang.Class<? extends java.lang.Object> getContainerClass()
public int getMinScanID()
public int getMaxScanID()
public int getMeanScanID()
public double getMinRetentionTime()
public double getMaxRetentionTime()
public double getMeanRetentionTime()
public double getMinMass()
public double getMaxMass()
public double getMeanMass()
public double getMedianMass()
public double getMinIntensity()
public double getMaxIntensity()
public double getMeanIntensity()
public double getMedianIntensity()
public double getMassStdDev()
public int indexOfMass(double mass)
mass - The mass to look for.
public java.util.Vector<Type> getPeaksOfMass(double mass,
double delta)
indexOfMass(double), making the
retrieval very speedy.
mass - The mass to look for.delta - The delta around the mass.
public java.util.Vector<Type> getPeaksInMassRange(double minmass,
double maxmass)
indexOfMass(double), making the
retrieval very speedy.
minmass - The minimum mass to look for.maxmass - The maximum mass to look for.
public int indexOfScan(int scanid)
scanid - The scan to look for.
public java.util.Vector<Type> getPeaksInScanRange(int minscan,
int maxscan)
indexOfScan(int) for optimal
searching.
minscan - The scan where to start collecting peaks.maxscan - The scan where to end collecting peaks.
public int indexOfRetentionTime(double rt)
rt - The retention time to look for.
public java.util.Vector<Type> getPeaksInRetentionTimeRange(double minrt,
double maxrt)
indexOfRetentionTime(double) for optimal
searching.
minrt - The retention time where to start collecting peaks.maxrt - The retention time where to end collecting peaks.
public void resetPatternIDs(int id)
id - The id for the peaks in the set.public int size()
public Type get(int pos)
throws java.lang.IndexOutOfBoundsException
size() an IndexOutOfBoundsException
is thrown.
pos - The position in the list of the peak to be retrieved.
java.lang.IndexOutOfBoundsException - When the given position is smaller than 0 or larger or equal to size().public final java.util.Vector<Type> getPeaks()
public java.util.Iterator<Type> iterator()
Iterable.iterator()
iterator in interface java.lang.Iterable<Type extends IPeak>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 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 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 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 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 IPeak
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||