diff --git a/R/mix.R b/R/mix.R index fdbbae35a5ac8b84a9a92a15e1995b411c282dbd..1b912993f53f5ce3f12cdbd06bee8abc9d2cc40b 100644 --- a/R/mix.R +++ b/R/mix.R @@ -194,10 +194,11 @@ mb.single<-function(mb,infodir,fn_stgs) { ##' @param mode Same as in msmsRead. ##' @param readMethod Same as in msmsRead. ##' @param archdir Name of the archive. +##' @param lastStep The last step of the spectral workflow. ##' @return A named list of spectral workspaces. The names are derived ##' from data filenames. ##' @author Todor Kondić -v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive") { +v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive",lastStep=8) { f<-Vectorize(single.sw,vectorize.args=c("wd","fn_data","stgs_alist"),SIMPLIFY=F) x<-f(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod=readMethod,archdir=archdir) names(x)<-basename(fn_data) @@ -215,13 +216,14 @@ v<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="ar ##' @param mode Same as in msmsRead. ##' @param readMethod Same as in msmsRead. ##' @param archdir Name of the archive. +##' @param lastStep The last step in spectral workflow. ##' @param cl Cluster. ##' @return A named list of spectral workspaces. The names are derived ##' from data filenames. ##' @author Todor Kondić -p.sw<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive",cl=NULL) { +p.sw<-function(fn_data,stgs_alist,wd,fn_cmpd_list,mode,readMethod="mzR",archdir="archive",lastStep=8,cl=NULL) { f<-function(fn,stgs,wd) { - single.sw(fn,stgs,wd,fn_cmpd_list,mode,readMethod,archdir) + single.sw(fn,stgs,wd,fn_cmpd_list,mode,readMethod,archdir,lastStep) } x<-parallel::clusterMap(cl,f,fn_data,stgs_alist,wd) diff --git a/man/p.sw.Rd b/man/p.sw.Rd new file mode 100644 index 0000000000000000000000000000000000000000..c5608c9823fb08387c3fec94f6a945a929ef51cc --- /dev/null +++ b/man/p.sw.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/mix.R +\name{p.sw} +\alias{p.sw} +\title{Parallel Spectral Workflow.} +\usage{ +p.sw(fn_data, stgs_alist, wd, fn_cmpd_list, mode, readMethod = "mzR", + archdir = "archive", lastStep = 8, cl = NULL) +} +\arguments{ +\item{fn_data}{A sequence of mzML input files.} + +\item{stgs_alist}{A list of named list of settings, or a list of +filenames of YAML files containing the settings.} + +\item{wd}{The list of working directories.} + +\item{fn_cmpd_list}{The compound list characterising the mixtures.} + +\item{mode}{Same as in msmsRead.} + +\item{readMethod}{Same as in msmsRead.} + +\item{archdir}{Name of the archive.} + +\item{lastStep}{The last step in spectral workflow.} + +\item{cl}{Cluster.} +} +\value{ +A named list of spectral workspaces. The names are derived +from data filenames. +} +\description{ +Interface to parallel spectral workflow. +} +\author{ +Todor Kondić +} diff --git a/man/v.Rd b/man/v.Rd index e7a38b32d942993f6a412cc6e106bcd5715f4bd3..29e840e74b1342365c4a8cc020fec42c26c50736 100644 --- a/man/v.Rd +++ b/man/v.Rd @@ -5,7 +5,7 @@ \title{Vectorised Spectral Workflow.} \usage{ v(fn_data, stgs_alist, wd, fn_cmpd_list, mode, readMethod = "mzR", - archdir = "archive") + archdir = "archive", lastStep = 8) } \arguments{ \item{fn_data}{A sequence of mzML input files.} @@ -22,6 +22,8 @@ filenames of YAML files containing the settings.} \item{readMethod}{Same as in msmsRead.} \item{archdir}{Name of the archive.} + +\item{lastStep}{The last step of the spectral workflow.} } \value{ A named list of spectral workspaces. The names are derived