Learn R Programming

systemPipeR (version 1.6.0)

runCommandline: Execute SYSargs

Description

Function to execute system parameters specified in SYSargs object

Usage

runCommandline(args, runid = "01", ...)

Arguments

args
object of class SYSargs
runid
Run identifier used for log file to track system call commands. Default is "01".
...
Additional plotting arguments to pass on to runCommandline().

Value

Output files, their paths can be obtained with outpaths() from SYSargs container. In addition, a character vector is returned containing the same paths.

Examples

Run this code
## Construct SYSargs object from param and targets files 
param <- system.file("extdata", "tophat.param", package="systemPipeR")
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
args <- systemArgs(sysma=param, mytargets=targets)
args
names(args); modules(args); cores(args); outpaths(args); sysargs(args)

## Not run: 
# ## Execute SYSargs on single machine
# runCommandline(args=args)
# 
# ## Execute SYSargs on multiple machines of a compute cluster 
# resources <- list(walltime="00:25:00", nodes=paste0("1:ppn=", cores(args)), memory="2gb")
# reg <- clusterRun(args, conffile=".BatchJobs.R", template="torque.tmpl", Njobs=18, runid="01", resourceList=resources)
# 
# ## Monitor progress of submitted jobs
# showStatus(reg)
# file.exists(outpaths(args))
# sapply(1:length(args), function(x) loadResult(reg, x)) # Works once all jobs have completed successfully.
# 
# ## Alignment stats
# read_statsDF <- alignStats(fqpaths=tophatargs$infile1, bampaths=bampaths, fqgz=TRUE) 
# read_statsDF <- cbind(read_statsDF[targets$FileName,], targets)
# write.table(read_statsDF, "results/alignStats.xls", row.names=FALSE, quote=FALSE, sep="\t")
# ## End(Not run)

Run the code above in your browser using DataLab