Skip to content
Snippets Groups Projects
Commit 04386f64 authored by Todor Kondic's avatar Todor Kondic
Browse files

Update vectorised and parallel versions of sw.single with lastStep

* R/mix.R(p.sw,v): New argument.
  [lastStep]

* man/p.sw.Rd: New function documentation.

* man/v.Rd: Update.
parent c33f8a7a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
% 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ć
}
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment