From 1adebc07623124f6a975dc1db62a0ce1aa71491b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu> Date: Mon, 24 Jun 2019 00:14:48 +0200 Subject: [PATCH] Add presc.do * R/run.R(presc.do): New function. Top level prescreening function. * NAMESPACE: New exports. * man: Update doc. --- NAMESPACE | 1 + R/run.R | 25 +++++++++++++++++++++++++ man/presc.do.Rd | 27 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 man/presc.do.Rd diff --git a/NAMESPACE b/NAMESPACE index ed32db2..d1c6afe 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,7 @@ export(mb.do) export(mb.prep) +export(presc.do) export(presc.p) export(presc.single) export(presc.v) diff --git a/R/run.R b/R/run.R index 0479082..629a1a8 100644 --- a/R/run.R +++ b/R/run.R @@ -8,6 +8,31 @@ attch<-function(...) paste(...,sep='') +##' Do the prescreening. +##' +##' @title Prescreening on bunch of files. +##' @param fn_data The mzML files. Basis for the out directory name +##' generation. +##' @param fn_cmpd_list The compound list CSV. +##' @param mode RMB mode. +##' @param proc Amount of processors, or FALSE. +##' @return Nothing useful. +##' @author Todor Kondić +##' @export +presc.do<-function(fn_data,fn_cmpd_list,mode,proc=F) { + + + if (proc) { + cl<-parallel::makeCluster(proc) + presc.p(fn_data,fn_cmpd_l=fn_cmpd_list,mode=mode,cl=cl) + } else { + presc.v(fn_data,fn_cmpd_l=fn_cmpd_list,mode) + } +} + + + + ##' Performs massbank workflow on multiple mzML files: ##' ##' diff --git a/man/presc.do.Rd b/man/presc.do.Rd new file mode 100644 index 0000000..f001b9b --- /dev/null +++ b/man/presc.do.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/run.R +\name{presc.do} +\alias{presc.do} +\title{Prescreening on bunch of files.} +\usage{ +presc.do(fn_data, fn_cmpd_list, mode, proc = F) +} +\arguments{ +\item{fn_data}{The mzML files. Basis for the out directory name +generation.} + +\item{fn_cmpd_list}{The compound list CSV.} + +\item{mode}{RMB mode.} + +\item{proc}{Amount of processors, or FALSE.} +} +\value{ +Nothing useful. +} +\description{ +Do the prescreening. +} +\author{ +Todor Kondić +} -- GitLab