peakml
Class ChromatographyMS<gPeak extends Peak>

java.lang.Object
  extended by peakml.ChromatographyMS<gPeak>
Type Parameters:
gPeak - The type of peak stored in the spectra, either Centroid or Profile.
All Implemented Interfaces:
java.lang.Iterable<Spectrum<gPeak>>, Measurement

public class ChromatographyMS<gPeak extends Peak>
extends java.lang.Object
implements Measurement, java.lang.Iterable<Spectrum<gPeak>>

This class combines the information from a setup combining a chromatograph (LC or GC) with a mass spectrometer. The data is acquired in separate scans over an amount of time. All these scans are collected within an instance of this class.


Constructor Summary
ChromatographyMS()
           
ChromatographyMS(java.util.Vector<Spectrum<gPeak>> scans)
           
 
Method Summary
 java.util.Vector<gPeak> getAllPeaks()
          This method makes a collection of all the peaks in this class.
 double getEndTime()
           
 int getNrScans()
          Returns the number of scans stored in this class.
 Spectrum<gPeak> getScan(int index)
          Returns the scan at the given index.
 java.util.Vector<Spectrum<gPeak>> getScans()
          Returns a reference to the vector with scans stored in this class.
 double getStartTime()
           
 java.util.Iterator<Spectrum<gPeak>> iterator()
          Iterable.iterator()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChromatographyMS

public ChromatographyMS()

ChromatographyMS

public ChromatographyMS(java.util.Vector<Spectrum<gPeak>> scans)
Method Detail

getNrScans

public int getNrScans()
Returns the number of scans stored in this class.

Returns:
The number of scans.

getScan

public Spectrum<gPeak> getScan(int index)
                                     throws java.lang.IndexOutOfBoundsException
Returns the scan at the given index. This index is identical to the scan-id found in the IPeak classes.

Parameters:
index - The index or scanid.
Returns:
The scan at the given index or scanid.
Throws:
java.lang.IndexOutOfBoundsException - Thrown when the given index is out of bounds of the scan-vector.

getScans

public java.util.Vector<Spectrum<gPeak>> getScans()
Returns a reference to the vector with scans stored in this class. As this is a reference the vector should not be resorted or elements added or removed.

Returns:
A vector with all the scans in this class.

getAllPeaks

public java.util.Vector<gPeak> getAllPeaks()
This method makes a collection of all the peaks in this class. This collection can be sorted to retrieve additional information about the data, without affecting the contents of this class.

Returns:
A vector with all the peaks in this class.

getStartTime

public double getStartTime()

getEndTime

public double getEndTime()

iterator

public java.util.Iterator<Spectrum<gPeak>> iterator()
Iterable.iterator()

Specified by:
iterator in interface java.lang.Iterable<Spectrum<gPeak extends Peak>>