public class IsotopicDistributionSpectrum extends Object implements SpectrumFile
Constructor and Description |
---|
IsotopicDistributionSpectrum() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Method that compares an IsotopicDistributionSpectrum
|
int |
getCharge()
Getter for the charge
|
String |
getFilename()
Getter for the filename
|
double |
getHighestIntensity()
Method that find the intensity of the most intense peak
|
double |
getIntensity()
Getter for the precursor intensity (here always zero)
|
HashMap |
getPeaks()
Getter for the peaks
|
double |
getPrecursorMZ()
Getter for the precursor MZ
|
double |
getTotalIntensity()
Method calculates the total intensity of the peaks
|
void |
setCharge(int aCharge)
Setter for the charge
|
void |
setFilename(String aFilename)
Setter for the filename
|
void |
setIntensity(double aIntensity)
Setter for the intensity.
|
void |
setPeaks(HashMap aPeaks)
Setter for the peaks
|
void |
setPrecursorMZ(double aPrecursorMZ)
Setter for the precursor MZ
|
void |
writeToFile(File aParentDir)
Method to write to a given file
|
void |
writeToStream(OutputStream aOut)
Method to write to a givern stream
|
public int getCharge()
getCharge
in interface SpectrumFile
public void setCharge(int aCharge)
setCharge
in interface SpectrumFile
aCharge
- int with the charge of the precursor ion.public String getFilename()
getFilename
in interface SpectrumFile
public void setFilename(String aFilename)
setFilename
in interface SpectrumFile
aFilename
- String with the filename for the file.public HashMap getPeaks()
getPeaks
in interface SpectrumFile
public void setPeaks(HashMap aPeaks)
setPeaks
in interface SpectrumFile
aPeaks
- HashMap with Doubles as keys (the masses) and Doubles as values (the intensities).public double getPrecursorMZ()
getPrecursorMZ
in interface SpectrumFile
public void setPrecursorMZ(double aPrecursorMZ)
setPrecursorMZ
in interface SpectrumFile
aPrecursorMZ
- double with the precursor M/Zpublic double getIntensity()
getIntensity
in interface SpectrumFile
public void setIntensity(double aIntensity)
setIntensity
in interface SpectrumFile
aIntensity
- double with the intensity of the precursor ion.public double getTotalIntensity()
getTotalIntensity
in interface SpectrumFile
public double getHighestIntensity()
getHighestIntensity
in interface SpectrumFile
public void writeToStream(OutputStream aOut) throws IOException
writeToStream
in interface SpectrumFile
aOut
- OutputStream to write the file to. This Stream
will NOT be closed by this method.IOException
- if an IOException occurspublic void writeToFile(File aParentDir) throws IOException
writeToFile
in interface SpectrumFile
aParentDir
- File with the parent directory to put the file in.IOException
- if an IOException occurspublic int compareTo(Object o)
compareTo
in interface Comparable
o
- Another IsotopicDistributionSpectrumCopyright © 2016. All rights reserved.