Description Usage Arguments Value Examples
View source: R/generateIonChromatogram.R
On the input raw data, aggregate intensites across the mz range at each retention time to generate an ion chromatogram: sum
for EIC/TIC, max
, min
or mean
. The number of data points returned correspond to the number of unique scans/retention time measurements in the input data
1 | generateIonChromatogram(ROIDataPoint, aggregationFunction = "sum")
|
ROIDataPoint |
(data.frame) retention time "rt", mass "mz" and intensity "int" (as column) of each raw data points (as row) to use for the ion chromatogram |
aggregationFunction |
(str) Function to use in order to aggregate intensities across mz in each scan. One of |
A data.frame of retention time "rt" and aggregated intensities "int"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
## Input data points
in_rt <- c(3362.102, 3362.102, 3363.667, 3363.667, 3365.232, 3365.232, 3366.797, 3366.797,
3368.362, 3368.362)
in_mz <- c(496.2, 497.2, 496.2, 497.2, 496.2, 497.2, 496.2, 497.2, 496.2, 497.2)
in_int <- c(39616, 11432, 63344, 18224, 107352, 30936, 182144, 51776, 295232, 81216)
input_ROIDataPoints <- data.frame(rt=in_rt, mz=in_mz, int=in_int)
## Aggregate mz to generate EIC
EIC <- generateIonChromatogram(input_ROIDataPoints, aggregationFunction='sum')
EIC
# rt int
# 1 3362.102 51048
# 2 3363.667 81568
# 3 3365.232 138288
# 4 3366.797 233920
# 5 3368.362 376448
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.