View source: R/Perform_functions.R
PerformPeakProfiling | R Documentation |
This function performs feature extraction of user's raw MS data using the rawData object created using the ImportRawMSData function.
PerformPeakProfiling(
mSet,
Params = NULL,
plotSettings,
ncore,
running.controller = NULL
)
mSet |
The object created using the ImportRawMSData function, containing the raw MS data. |
Params |
The object created using the SetPeakParam function, containing user's specified or default parameters for downstream raw MS data pre-processing. |
plotSettings |
List, plotting parameters produced by SetPlotParam Function. Defaut is set to true. |
ncore |
Numeric, used to define the cores' number for Peak Profiling. |
running.controller |
The resuming pipeline running controller. Optional. Don't need to define by hand. |
will return a complete mSet object with the whole processes finished
Zhiqiang Pang zhiqiang.pang@mail.mcgill.ca, Jasmine Chong jasmine.chong@mail.mcgill.ca, and Jeff Xia jeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)
##' Get raw spectra files
DataFiles <- dir(system.file("mzData", package = "mtbls2"), full.names = TRUE,
recursive = TRUE)[c(10:12, 14:16)]
##' Create a phenodata data.frame
pd <- data.frame(sample_name = sub(basename(DataFiles), pattern = ".mzData",
replacement = "", fixed = TRUE),
sample_group = c(rep("col0", 3), rep("cyp79", 3)),
stringsAsFactors = FALSE)
##' Import raw spectra
mSet <- ImportRawMSData(path = DataFiles, metadata = pd);
##' Perform spectra profiling
mSet <- PerformPeakProfiling(mSet, Params = SetPeakParam(ppm = 15,
bw = 10,
mzdiff = 0.001,
max_peakwidth = 15,
min_peakwidth = 10),
ncore = 2,
plotSettings = SetPlotParam(Plot = TRUE))
##' Set peak annotation parameters
annParams <- SetAnnotationParam(polarity = 'positive',
mz_abs_add = 0.035);
##' Perform peak annotation
mSet <- PerformPeakAnnotation(mSet = mSet,
annotaParam = annParams,
ncore =1)
##' Format the PeakList
mSet <- FormatPeakList(mSet = mSet,
annParams,
filtIso =FALSE,
filtAdducts = FALSE,
missPercent = 1)
##' Export the annotation result
Export.Annotation(mSet, path = tempdir());
##' Export the Peak Table
Export.PeakTable(mSet, path = tempdir());
##' Export the Peak summary
Export.PeakSummary(mSet, path = tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.