manualChromPeaks | R Documentation |
The manualChromPeaks
function allows to manually define chromatographic
peaks, integrate the intensities within the specified peak area and add
them to the object's chromPeaks
matrix. A peak is not added for a sample
if no signal was found in the respective data file.
Because chromatographic peaks are added to eventually previously identified
peaks, it is suggested to run refineChromPeaks()
with the
MergeNeighboringPeaksParam()
approach to merge potentially overlapping
peaks.
The manualFeatures
function allows to manually group identified
chromatographic peaks into features by providing their index in the
object's chromPeaks
matrix.
manualChromPeaks(object, ...)
manualFeatures(object, ...)
## S4 method for signature 'MsExperiment'
manualChromPeaks(
object,
chromPeaks = matrix(numeric()),
samples = seq_along(object),
msLevel = 1L,
chunkSize = 2L,
BPPARAM = bpparam()
)
## S4 method for signature 'XcmsExperiment'
manualChromPeaks(
object,
chromPeaks = matrix(numeric()),
samples = seq_along(object),
msLevel = 1L,
chunkSize = 2L,
BPPARAM = bpparam()
)
## S4 method for signature 'XcmsExperiment'
manualFeatures(object, peakIdx = list(), msLevel = 1L)
## S4 method for signature 'OnDiskMSnExp'
manualChromPeaks(
object,
chromPeaks = matrix(),
samples = seq_along(fileNames(object)),
msLevel = 1L,
BPPARAM = bpparam()
)
## S4 method for signature 'XCMSnExp'
manualChromPeaks(
object,
chromPeaks = matrix(),
samples = seq_along(fileNames(object)),
msLevel = 1L,
BPPARAM = bpparam()
)
## S4 method for signature 'XCMSnExp'
manualFeatures(object, peakIdx = list(), msLevel = 1L)
object |
XcmsExperiment, XCMSnExp or OnDiskMSnExp object. |
... |
ignored. |
chromPeaks |
For |
samples |
For |
msLevel |
|
chunkSize |
|
BPPARAM |
parallel processing settings (see |
peakIdx |
For |
XcmsExperiment
or XCMSnExp
with the manually added
chromatographic peaks or features.
Johannes Rainer
## Read a test dataset.
fls <- c(system.file("microtofq/MM14.mzML", package = "msdata"),
system.file("microtofq/MM8.mzML", package = "msdata"))
## Define a data frame with some sample annotations
ann <- data.frame(
injection_index = 1:2,
sample_id = c("MM14", "MM8"))
## Import the data
library(MsExperiment)
mse <- readMsExperiment(fls)
## Define some arbitrary peak areas
pks <- cbind(
mzmin = c(512, 234.3), mzmax = c(513, 235),
rtmin = c(10, 33), rtmax = c(19, 50)
)
pks
res <- manualChromPeaks(mse, pks)
chromPeaks(res)
## Peaks were only found in the second file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.