|
CycloBranch
|
The class representing a peak list. More...
#include <cPeaksList.h>
Public Member Functions | |
| cPeaksList () | |
| The constructor. | |
| cPeaksList (const cPeaksList &peakslist) | |
| The copy constructor. More... | |
| cPeaksList & | operator= (const cPeaksList &peakslist) |
| Overloaded operator=. More... | |
| void | clear () |
| Clear the peak list. | |
| void | attach (cPeaksList &peaklist) |
| Attach a peak list. More... | |
| void | add (cPeak &peak) |
| Add a peak. More... | |
| void | loadFromPlainTextStream (ifstream &stream) |
| Load the spectrum from a plain text stream (tab separated values m/z ratio and intensity). More... | |
| void | loadFromBAFStream (ifstream &stream) |
| Load the spectrum from a .csv file converted from a .baf file by CompassXport. More... | |
| void | loadFromIBDStream (cImzMLItem &imzmlitem, ifstream &ibdstream, bool use_64bit_float_mz_precision, bool use_64bit_float_intensity_precision) |
| Load the spectrum from .ibd file. More... | |
| void | storeToIBDStream (ofstream &ibdstream, bool use_64bit_float_mz_precision, bool use_64bit_float_intensity_precision) |
| Store the spectrum into .ibd file. More... | |
| void | loadFromMGFStream (ifstream &stream, int timeunit) |
| Load the spectrum from a .mgf file. More... | |
| int | size () |
| The number of peaks. More... | |
| string | print (bool htmlterminatelines=false, bool printgroupid=false) |
| Print the spectrum. More... | |
| void | sortbyMass (int limit=-1) |
| Sort the peaks by mass. More... | |
| void | sortbyRelativeIntensityDesc () |
| Sort the peaks by relative intensity in the descending order. | |
| void | sortbyAbsoluteIntensityDesc () |
| Sort the peaks by absolute intensity in the descending order. | |
| void | sortbyGroupId () |
| Sort the peaks by group id. | |
| void | sortbyOrderId () |
| Sort the peaks by order id. | |
| int | normalizeIntenzity () |
| Normalize intensities of peaks. More... | |
| void | normalizeIntenzityByValue (double value) |
| Normalize intensities of peaks using a value. More... | |
| void | cropRelativeIntenzity (double minimumrelativeintensitythreshold) |
| Remove peaks with relative intensities lower than the threshold. More... | |
| void | cropAbsoluteIntenzity (unsigned minimumabsoluteintensitythreshold) |
| Remove peaks with absolute intensities lower than the threshold. More... | |
| void | cropMinimumMZRatio (double minimummz, double errortolerance) |
| Crop mz ratio lower than a threshold. More... | |
| void | cropMaximumMZRatio (double maximummz, double errortolerance) |
| Crop mz ratio bigger than a threshold. More... | |
| cPeak & | operator[] (int position) |
| Overloaded operator []. More... | |
| void | resize (int size) |
| Resize the peak list. More... | |
| double | getMinimumMZRatio () |
| Get the minimum mz ratio. More... | |
| double | getMaximumMZRatio () |
| Get the maximum mz ratio. More... | |
| void | removeIsotopes (int maximumcharge, double fragmentmasserrortolerance, cMainThread *os=0) |
| Remove isotopic peaks. More... | |
| int | find (double mzratio, double fragmentmasserrortolerance) |
| Get a position of a peak with specified mzratio. More... | |
| void | remove (int position) |
| Remove a peak. More... | |
| void | removeChargeVariants (int maximumcharge, double fragmentmasserrortolerance) |
| Perform a deconvolution. More... | |
| void | removeNeutralLoss (double loss, int maximumcharge, double fragmentmasserrortolerance) |
| Remove neutral losses. More... | |
| void | removeObsolete () |
| Remove peaks having set up the flag removeme == true. | |
| void | maxHighestPeaksInWindow (int maximumnumberofpeaksinwindow, double windowsize) |
| Keep only n highest peaks in a window of a specified size. More... | |
| double | getMaximumRelativeIntensityFromMZInterval (double minmz, double maxmz, bool hidematched, bool hideunmatched, ePeptideType peptidetype, bool hidescrambled) |
| Get the maximum relative intensity from an m/z interval. More... | |
| double | getMaximumAbsoluteIntensityFromMZInterval (double minmz, double maxmz, bool hidematched, bool hideunmatched, ePeptideType peptidetype, bool hidescrambled) |
| Get the maximum absolute intensity from an m/z interval. More... | |
| double | getMaximumRelativeIntensity () |
| Get the maximum relative intensity. More... | |
| double | getMaximumAbsoluteIntensity () |
| Get the maximum absolute intensity. More... | |
| void | setRetentionTime (double rt) |
| Set the retention time. More... | |
| double | getRetentionTime () |
| Get the retention time. More... | |
| void | setRetentionTimeUnit (int unit) |
| Set the retention time unit. More... | |
| int | getRetentionTimeUnit () |
| Get the retention time unit. More... | |
| void | setCoordinates (int x, int y) |
| Set the coordinates. More... | |
| int | getCoordinateX () |
| Get the X coordinate. More... | |
| int | getCoordinateY () |
| Get the Y coordinate. More... | |
| void | store (ofstream &os) |
| Store the structure into an output stream. More... | |
| void | load (ifstream &is, int fileversionpart1, int fileversionpart2, int fileversionpart3) |
| Load the structure from an input stream. More... | |
| string & | getTitle () |
| Get the title. More... | |
| void | setTitle (string &title) |
| Set the title. More... | |
| void | reducePeakDescriptions (unordered_map< string, int > &peakdesctoid) |
| Reduce redundant descriptions of peaks. More... | |
| void | reduceIsotopeFormulaDescriptions (unordered_map< string, int > &isotopeformuladesctoid) |
| Reduce redundant descriptions of isotope formulas. More... | |
| void | fillOrderIDs () |
| Define order ids of peaks. | |
| void | setIsotopeFlags (bool value) |
| Set isotope flags. More... | |
| void | markIsotopes () |
| Mark isotopic peaks in isotopic patterns. | |
| bool | equals (cPeaksList &secondpeaklist) |
| Check if the object equals to another object. More... | |
The class representing a peak list.
| cPeaksList::cPeaksList | ( | const cPeaksList & | peakslist | ) |
The copy constructor.
| peakslist | reference to a cPeaksList |
| void cPeaksList::add | ( | cPeak & | peak | ) |
Add a peak.
| peak | peak which will be added |
| void cPeaksList::attach | ( | cPeaksList & | peaklist | ) |
Attach a peak list.
| peaklist | peaklist which will be attached |
| void cPeaksList::cropAbsoluteIntenzity | ( | unsigned | minimumabsoluteintensitythreshold | ) |
Remove peaks with absolute intensities lower than the threshold.
| minimumabsoluteintensitythreshold | minimum threshold of absolute intensity |
| void cPeaksList::cropMaximumMZRatio | ( | double | maximummz, |
| double | errortolerance | ||
| ) |
Crop mz ratio bigger than a threshold.
| maximummz | maximum threshold of mz ratio |
| errortolerance | mz error tolerance in ppm |
| void cPeaksList::cropMinimumMZRatio | ( | double | minimummz, |
| double | errortolerance | ||
| ) |
Crop mz ratio lower than a threshold.
| minimummz | minimum threshold of mz ratio |
| errortolerance | mz error tolerance in ppm |
| void cPeaksList::cropRelativeIntenzity | ( | double | minimumrelativeintensitythreshold | ) |
Remove peaks with relative intensities lower than the threshold.
| minimumrelativeintensitythreshold | minimum threshold of relative intensity |
| bool cPeaksList::equals | ( | cPeaksList & | secondpeaklist | ) |
Check if the object equals to another object.
| secondpeaklist | object for comparison |
| bool | true if the objects are equals |
| int cPeaksList::find | ( | double | mzratio, |
| double | fragmentmasserrortolerance | ||
| ) |
Get a position of a peak with specified mzratio.
| mzratio | of searched peak |
| fragmentmasserrortolerance | mz error tolerance |
| int | position; -1 when the peak is not found |
| int cPeaksList::getCoordinateX | ( | ) |
Get the X coordinate.
| int | X coordinate |
| int cPeaksList::getCoordinateY | ( | ) |
Get the Y coordinate.
| int | Y coordinate |
| double cPeaksList::getMaximumAbsoluteIntensity | ( | ) |
Get the maximum absolute intensity.
| double | maximum absolute intensity |
| double cPeaksList::getMaximumAbsoluteIntensityFromMZInterval | ( | double | minmz, |
| double | maxmz, | ||
| bool | hidematched, | ||
| bool | hideunmatched, | ||
| ePeptideType | peptidetype, | ||
| bool | hidescrambled | ||
| ) |
Get the maximum absolute intensity from an m/z interval.
| minmz | minimum mz ratio |
| maxmz | maximum mz ratio |
| hidematched | true, if matched peaks are hidden |
| hideunmatched | true, if unmatched peaks are hidden |
| peptidetype | the type of peptide |
| hidescrambled | true, if scrambled peaks are hidden |
| double | maximum absolute intensity |
| double cPeaksList::getMaximumMZRatio | ( | ) |
Get the maximum mz ratio.
| double | maximum mz ratio |
| double cPeaksList::getMaximumRelativeIntensity | ( | ) |
Get the maximum relative intensity.
| double | maximum relative intensity |
| double cPeaksList::getMaximumRelativeIntensityFromMZInterval | ( | double | minmz, |
| double | maxmz, | ||
| bool | hidematched, | ||
| bool | hideunmatched, | ||
| ePeptideType | peptidetype, | ||
| bool | hidescrambled | ||
| ) |
Get the maximum relative intensity from an m/z interval.
| minmz | minimum mz ratio |
| maxmz | maximum mz ratio |
| hidematched | true, if matched peaks are hidden |
| hideunmatched | true, if unmatched peaks are hidden |
| peptidetype | the type of peptide |
| hidescrambled | true, if scrambled peaks are hidden |
| double | maximum relative intensity |
| double cPeaksList::getMinimumMZRatio | ( | ) |
Get the minimum mz ratio.
| double | minimum mz ratio |
| double cPeaksList::getRetentionTime | ( | ) |
Get the retention time.
| double | retention time |
| int cPeaksList::getRetentionTimeUnit | ( | ) |
Get the retention time unit.
| int | 0 == second, 1 == minute |
| string & cPeaksList::getTitle | ( | ) |
Get the title.
| string | title |
| void cPeaksList::load | ( | ifstream & | is, |
| int | fileversionpart1, | ||
| int | fileversionpart2, | ||
| int | fileversionpart3 | ||
| ) |
Load the structure from an input stream.
| is | an input stream |
| fileversionpart1 | first number of .res the file version |
| fileversionpart2 | second number of .res the file version |
| fileversionpart3 | third number of .res the file version |
| void cPeaksList::loadFromBAFStream | ( | ifstream & | stream | ) |
Load the spectrum from a .csv file converted from a .baf file by CompassXport.
| stream | source stream |
| void cPeaksList::loadFromIBDStream | ( | cImzMLItem & | imzmlitem, |
| ifstream & | ibdstream, | ||
| bool | use_64bit_float_mz_precision, | ||
| bool | use_64bit_float_intensity_precision | ||
| ) |
Load the spectrum from .ibd file.
| imzmlitem | cImzML containing the offset in the ibd file |
| ibdstream | an input binary file stream |
| use_64bit_float_mz_precision | if true, 64bit mz precision is used; if false, 32bit precision is used |
| use_64bit_float_intensity_precision | if true, 64bit intensity precision is used; if false, 32bit precision is used |
| void cPeaksList::loadFromMGFStream | ( | ifstream & | stream, |
| int | timeunit | ||
| ) |
Load the spectrum from a .mgf file.
| stream | source stream |
| timeunit | rt unit |
| void cPeaksList::loadFromPlainTextStream | ( | ifstream & | stream | ) |
Load the spectrum from a plain text stream (tab separated values m/z ratio and intensity).
| stream | source stream |
| void cPeaksList::maxHighestPeaksInWindow | ( | int | maximumnumberofpeaksinwindow, |
| double | windowsize | ||
| ) |
Keep only n highest peaks in a window of a specified size.
| maximumnumberofpeaksinwindow | maximum number of peaks in a window |
| windowsize | size of a window |
| int cPeaksList::normalizeIntenzity | ( | ) |
Normalize intensities of peaks.
| int | 0 == success, -1 == maximum intensity <= 0 |
| void cPeaksList::normalizeIntenzityByValue | ( | double | value | ) |
Normalize intensities of peaks using a value.
| value | normalization value |
| cPeaksList & cPeaksList::operator= | ( | const cPeaksList & | peakslist | ) |
Overloaded operator=.
| peakslist | reference to a cPeaksList |
| cPeak & cPeaksList::operator[] | ( | int | position | ) |
Overloaded operator [].
| position | position of a peak in the peak list |
| cPeak | reference to the peak |
| string cPeaksList::print | ( | bool | htmlterminatelines = false, |
| bool | printgroupid = false |
||
| ) |
Print the spectrum.
| htmlterminatelines | true if the html line endings should be used |
| printgroupid | true if the groupid should be printed |
| string | string with a printed spectrum |
| void cPeaksList::reduceIsotopeFormulaDescriptions | ( | unordered_map< string, int > & | isotopeformuladesctoid | ) |
Reduce redundant descriptions of isotope formulas.
| isotopeformuladesctoid | map of isotope formula descriptions to ids |
| void cPeaksList::reducePeakDescriptions | ( | unordered_map< string, int > & | peakdesctoid | ) |
Reduce redundant descriptions of peaks.
| peakdesctoid | map of peak descriptions to ids |
| void cPeaksList::remove | ( | int | position | ) |
Remove a peak.
| position | position of a peak |
| void cPeaksList::removeChargeVariants | ( | int | maximumcharge, |
| double | fragmentmasserrortolerance | ||
| ) |
Perform a deconvolution.
| maximumcharge | charge of the precursor |
| fragmentmasserrortolerance | mz error tolerance |
| void cPeaksList::removeIsotopes | ( | int | maximumcharge, |
| double | fragmentmasserrortolerance, | ||
| cMainThread * | os = 0 |
||
| ) |
Remove isotopic peaks.
| maximumcharge | charge of the precursor |
| fragmentmasserrortolerance | mz error tolerance |
| os | reference to a main thread of the application (stream, respectively) |
| void cPeaksList::removeNeutralLoss | ( | double | loss, |
| int | maximumcharge, | ||
| double | fragmentmasserrortolerance | ||
| ) |
Remove neutral losses.
| loss | mass change |
| maximumcharge | charge of the precursor |
| fragmentmasserrortolerance | mz error tolerance |
| void cPeaksList::resize | ( | int | size | ) |
Resize the peak list.
| size | number of peaks |
| void cPeaksList::setCoordinates | ( | int | x, |
| int | y | ||
| ) |
Set the coordinates.
| x | X coordinate |
| y | Y coordinate |
| void cPeaksList::setIsotopeFlags | ( | bool | value | ) |
Set isotope flags.
| value | flag value |
| void cPeaksList::setRetentionTime | ( | double | rt | ) |
Set the retention time.
| rt | retention time |
| void cPeaksList::setRetentionTimeUnit | ( | int | unit | ) |
Set the retention time unit.
| unit | 0 == second, 1 == minute |
| void cPeaksList::setTitle | ( | string & | title | ) |
Set the title.
| title | title |
| int cPeaksList::size | ( | ) |
The number of peaks.
| int | number of peaks |
| void cPeaksList::sortbyMass | ( | int | limit = -1 | ) |
Sort the peaks by mass.
| limit | sort first limit peaks only; if limit == -1 then all peaks are sorted |
| void cPeaksList::store | ( | ofstream & | os | ) |
Store the structure into an output stream.
| os | an output stream |
| void cPeaksList::storeToIBDStream | ( | ofstream & | ibdstream, |
| bool | use_64bit_float_mz_precision, | ||
| bool | use_64bit_float_intensity_precision | ||
| ) |
Store the spectrum into .ibd file.
| ibdstream | an output binary file stream |
| use_64bit_float_mz_precision | if true, 64bit mz precision is used; if false, 32bit precision is used |
| use_64bit_float_intensity_precision | if true, 64bit intensity precision is used; if false, 32bit precision is used |