running.plan: running.plan

View source: R/Resume_functions.R

running.planR Documentation

running.plan

Description

define a plan for resumalbe running

Usage

running.plan(plan = NULL, ...)

Arguments

plan

ResummingPlan object. The object is generated by 'InitializaPlan' function.

...

Multiple Processing commands can be input here.

Value

will return a defined plan

Author(s)

Zhiqiang Pang zhiqiang.pang@mail.mcgill.ca Jeff Xia jeff.xia@mcgill.ca Mcgill University License: GNU GPL (>= 2)

See Also

ExecutePlan for the this resumable running pipeline.

Examples

##' 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);

xia-lab/OptiLCMS documentation built on Nov. 6, 2024, 11:01 a.m.