View source: R/peakPantheR_quickEIC.R
peakPantheR_quickEIC | R Documentation |
Simple plot of an Extracted Ion Chromatogram (EIC) from a raw data file and a provided mz and rt window. Return ggplot plot object.
peakPantheR_quickEIC(
spectraPath,
rt,
mz,
valuesOnly = "Plot",
centroided = TRUE,
msLevel = 1L,
verbose = TRUE
)
spectraPath |
(str) Path to the raw data file to read (uses 'MSnbase::readMSData()') |
rt |
(numeric(2) or two-column matrix) the lower and upper retention time range from which the data should be extracted. If a matrix is passed, each row corresponds to a different window. If not provided, the full retention time range will be extracted. |
mz |
(numeric(2) or two-column matrix) the lower and upper mass range from which the data should be extracted. If a matrix is passed, each row corresponds to a different window. If not provided, the full mass range will be extracted. |
valuesOnly |
(str) If 'Raw' only load the file and return a table of raw extracted values (exported version of 'extractSignalRawData()'). If 'EIC' return a table of EIC data point. Else return the EIC plot (default). |
centroided |
(bool) Indicate to 'MSnbase::readMSData()' whether the spectra file is centroided or not (default to 'TRUE'). |
msLevel |
(int) The MS level at which the data should be extracted (default to MS level 1). |
verbose |
(bool) Output proress information or not. |
Grob (ggplot object) of the EIC plot, if ‘valuesOnly=’Raw'' returns a data.frame of raw datapoints with as columns 'rt', 'mz' and 'int'. If ‘valuesOnly=’EIC'' returns a data.frame of EIC datapoints with as columns 'rt' and 'int'.
## Use a file form the faahKO package and plot an EIC of interest
library(faahKO)
spectraPath <- system.file('cdf/KO/ko15.CDF',package='faahKO')
peakPantheR_quickEIC(spectraPath,
rt = c(3290., 3410.),
mz = c(522.194778, 522.205222))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.