Description Objects from the Class Slots Methods Author(s) See Also Examples
SYSargs2 class
stores all the information and instructions needed for processing a set of input files with a specific command-line or a series of command-line within a workflow. The SYSargs2
S4 class object is created from the loadWorkflow
and renderWF
function, which populates all the command-line for each sample in each step of the particular workflow. Each sample level input/outfile operation uses its own SYSargs2
instance. The output of SYSargs2
define all the expected output files for each step in the workflow, which usually it is the sample input for the next step in an SYSargs2
instance. Between different instances, this connectivity is established by writing the subsetting output with the writeTargetsout
function to a new targets file that serves as input to the next loadWorkflow
and renderWF
call. By chaining several SYSargs2
steps together one can construct complex workflows involving many sample-level input/output file operations with any combination of command-line or R-based software.
Objects can be created by calls of the form new("SYSargs2", ...)
.
targets
:Object of class "list"
storing data from each sample from targets
file
targetsheader
:Object of class "list"
storing header/comment lines of targets file
modules
:Object of class "list"
storing software versions from module system
wf
:Object of class "list"
storing data from Workflow CWL param
file
clt
:Object of class "list"
storing data from each CommandLineTool step in the Workflow or the single CommandLineTool CWL param
file
yamlinput
:Object of class "list"
storing data from input
file
cmdlist
:Object of class "list"
storing all command-line used to execute external software
input
:Object of class "list"
storing data from each target defined in inputvars
output
:Object of class "list"
paths to final outputs files
cwlfiles
:Object of class "list"
paths to input
and CWL param
files
inputvars
:Object of class "list"
storing data from each inputvars
signature(x = "SYSargs2")
: subsetting of class with bracket operator
signature(x = "SYSargs2", i = "ANY", j = "missing")
: subsetting of class with bracket operator
signature(x = "SYSargs2")
: replacement method for SYSargs2 class
signature(x = "SYSargs2")
: extracting slots elements by name
signature(x = "SYSargs2")
: extracts data from clt
slot
signature(x = "SYSargs2")
: extracts data from cmdlist
slot
signature(from = "list", to = "SYSargs2")
: as(list, "SYSargs2")
signature(x = "SYSargs2")
: extracts data from cwlfiles
slot
signature(x = "SYSargs2")
: extracting paths to first FASTQ file
signature(x = "SYSargs2")
: extracting paths to second FASTQ file if data is PE
signature(x = "SYSargs2")
: extracts data from input
slot
signature(x = "SYSargs2")
: extracts data from inputvars
slot
signature(x = "SYSargs2")
: extracts number of samples
signature(x = "SYSargs2")
: extracts data from modules
slot
signature(x = "SYSargs2")
: extracts slot names
signature(x = "SYSargs2")
: extracts data from cmdlist
slot
signature(object = "SYSargs2")
: summary view of SYSargs2
objects
signature(x = "SYSargs2")
: Coerce back to list as(SYSargs2, "list")
signature(x = "SYSargs2")
: extract data from targets
slot
signature(x = "SYSargs2")
: extracts data from targetsheader
slot
signature(x = "SYSargs2")
: extracts data from wf
slot
signature(x = "SYSargs2")
: extracts data from yamlinput
slot
Daniela Cassol and Thomas Girke
loadWorkflow
and renderWF
and runCommandline
and clusterRun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | showClass("SYSargs2")
## Construct SYSargs2 object from CWl param, CWL input, and targets files
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
dir_path <- system.file("extdata/cwl/hisat2/hisat2-se", package="systemPipeR")
WF <- loadWorkflow(targets=targets, wf_file="hisat2-mapping-se.cwl",
input_file="hisat2-mapping-se.yml", dir_path=dir_path)
WF <- renderWF(WF, inputvars=c(FileName="_FASTQ_PATH1_", SampleName="_SampleName_"))
WF
names(WF); modules(WF); targets(WF)[1]; cmdlist(WF)[1:2]; output(WF)
## The subsetting operator '[' allows to select specific command-line
cmdlist(WF)[1:2]
## Not run:
## Execute SYSargs2 on single machine
WF <- runCommandline(args=WF)
## Execute SYSargs2 on multiple machines of a compute cluster. The following
## example uses the conf and template files for the Slurm scheduler. Please
## read the instructions on how to obtain the corresponding files for other schedulers.
file.copy(system.file("extdata", ".batchtools.conf.R", package="systemPipeR"), ".")
file.copy(system.file("extdata", "batchtools.slurm.tmpl", package="systemPipeR"), ".")
resources <- list(walltime=120, ntasks=1, ncpus=4, memory=1024)
reg <- clusterRun(args, FUN = runCommandline, conffile=".batchtools.conf.R", template="batchtools.slurm.tmpl", Njobs=18, runid="01", resourceList=resources)
## Monitor progress of submitted jobs
getStatus(reg=reg)
## Updates the path in the object \code{output(WF)}
WF <- output_update(WF, dir=FALSE, replace=TRUE, extension=c(".sam", ".bam"))
## Alignment stats
read_statsDF <- alignStats(WF)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.