Description Usage Arguments Value Author(s) See Also Examples
UPDATE: the extractMsData
and plotMsData
functions are deprecated
and as(x, "data.frame")
and plot(x, type = "XIC")
(x
being an
OnDiskMSnExp
or XCMSnExp
object) should be used instead. See examples
below. Be aware that filtering the raw object might however drop the
adjusted retention times. In such cases it is advisable to use the
applyAdjustedRtime()
function prior to filtering.
Extract a data.frame
of retention time, mz and intensity
values from each file/sample in the provided rt-mz range (or for the full
data range if rt
and mz
are not defined).
1 2 3 4 5 6 | ## S4 method for signature 'OnDiskMSnExp'
extractMsData(object, rt, mz, msLevel = 1L)
## S4 method for signature 'XCMSnExp'
extractMsData(object, rt, mz, msLevel = 1L,
adjustedRtime = hasAdjustedRtime(object))
|
object |
A |
rt |
|
mz |
|
msLevel |
|
adjustedRtime |
(for |
A list
of length equal to the number of samples/files in
object
. Each element being a data.frame
with columns
"rt"
, "mz"
and "i"
with the retention time, mz and
intensity tuples of a file. If no data is available for the mz-rt range
in a file a data.frame
with 0 rows is returned for that file.
Johannes Rainer
XCMSnExp
for the data object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Read some files from the test data package.
library(faahKO)
library(xcms)
library(magrittr)
fls <- dir(system.file("cdf/KO", package = "faahKO"), recursive = TRUE,
full.names = TRUE)
raw_data <- readMSData(fls[1:2], mode = "onDisk")
## Extract the full data as a data.frame
ms_all <- as(raw_data, "data.frame")
head(ms_all)
nrow(ms_all)
## Read the full MS data for a defined mz-rt region.
res <- raw_data %>%
filterRt(rt = c(2700, 2900)) %>%
filterMz(mz = c(300, 320)) %>%
as("data.frame")
head(res)
nrow(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.