View source: R/Resume_functions.R
running.plan | R Documentation |
define a plan for resumalbe running
running.plan(plan = NULL, ...)
plan |
ResummingPlan object. The object is generated by 'InitializaPlan' function. |
... |
Multiple Processing commands can be input here. |
will return a defined plan
Zhiqiang Pang zhiqiang.pang@mail.mcgill.ca Jeff Xia jeff.xia@mcgill.ca Mcgill University License: GNU GPL (>= 2)
ExecutePlan
for the this resumable running pipeline.
##' Download the raw spectra data
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)
##' Initialize your plan
plan <- InitializaPlan("raw_opt")
##' Define your plan
plan <- running.plan(plan,
mSet <- PerformROIExtraction(datapath = DataFiles[c(1:2)], rt.idx = 0.025,
plot = FALSE, rmConts = FALSE,
running.controller = rc),
param_initial <- SetPeakParam(),
best_parameters <- PerformParamsOptimization(mSet = mSet, param_initial,
ncore = 1,
running.controller = rc),
param <- best_parameters,
plotSettings1 <- SetPlotParam(Plot=TRUE),
plotSettings2 <- SetPlotParam(Plot=TRUE),
mSet <- ImportRawMSData(mSet = mSet, path = DataFiles,
metadata = pd,
plotSettings = plotSettings1,
running.controller = rc),
mSet <- PerformPeakProfiling(mSet = mSet, Params = param,
plotSettings = plotSettings2, ncore = 1,
running.controller = rc),
annParams <- SetAnnotationParam(polarity = 'negative',
mz_abs_add = 0.025),
mSet <- PerformPeakAnnotation(mSet = mSet,
annotaParam = annParams, ncore =1,
running.controller = rc),
mSet <- FormatPeakList(mSet = mSet, annParams,
filtIso =FALSE, filtAdducts = FALSE,
missPercent = 1));
##' Run it!
# result <- ExecutePlan(plan);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.