SYSargs2-class | R Documentation |
"SYSargs2"
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 loadWF
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. 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 parameters
file
clt
:Object of class "list"
storing data from each CommandLineTool
substep in the Workflow or the single CommandLineTool
CWL parameters
file
yamlinput
:Object of class "list"
storing data from input (*.yml)
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
files
:Object of class "list"
paths to input
and CWL parameters
files
inputvars
:Object of class "list"
storing data from each inputvars
cmdToCwl
:Object of class "list"
storing data from each cmdToCwl
status
:Object of class "list"
storing data from each status
internal_outfiles
:Object of class "list"
storing raw data from each output
Subsetting of class with bracket operator.
Subsetting of class with bracket operator.
Replacement method for "SYSargs2"
class.
Extracting slots elements by name.
Extracts number of samples.
Extracts slot names.
Summary view of SYSargs2
objects.
signature(from = "list", to = "SYSargs2")
: as(list, "SYSargs2")
signature(from = "SYSargs2", to = "list")
as(SYSargs2, "list")
signature(from = "SYSargs2", to = "DataFrame")
: as(x, "DataFrame")
; for targets slot.
Coerce back to list as(SYSargs2, "list")
Extract data from targets
slot.
Extracts data from targetsheader
slot.
Extracts data from modules
slot.
Extracts data from wf
slot.
Extracts data from clt
slot.
Extracts data from yamlinput
slot.
Extracts data from cmdlist
slot.
Extracts data from input
slot.
Extracts data from cmdlist
slot.
Extracts data from files
slot.
Extracts data from inputvars
slot.
Extracts data from cmdToCwl
slot.
Extracts data from status
slot.
extracting paths to first FASTQ file.
extracting paths to second FASTQ file if data is PE.
Extracts baseCommand from command-line used to execute external software.
Extracts all samples names.
Replacement method for yamlinput
slot input.
Daniela Cassol and Thomas Girke
loadWF
and renderWF
and runCommandline
and clusterRun
showClass("SYSargs2")
## Construct SYSargs2 object from CWl param, CWL input, and targets files
targetspath <- system.file("extdata/cwl/example/targets_example.txt", package="systemPipeR")
dir_path <- system.file("extdata/cwl", package="systemPipeR")
WF <- loadWorkflow(targets=targetspath,
wf_file="example/workflow_example.cwl",
input_file="example/example.yml",
dir_path=dir_path)
WF <- renderWF(WF, inputvars=c(Message = "_STRING_", SampleName = "_SAMPLE_"))
WF
## Methods
names(WF)
length(WF)
baseCommand(WF)
SampleName(WF)
## Accessors
targets(WF)
targetsheader(WF)
modules(WF)
yamlinput(WF)
cmdlist(WF)
input(WF)
output(WF)
files(WF)
inputvars(WF)
cmdToCwl(WF)
status(WF)
## The subsetting operator '[' allows to select specific command-line/sample
WF2 <- WF[1:2]
## Not run:
## Execute SYSargs2 on single machine
WF2 <- runCommandline(WF2)
## End(Not run)
## Not run:
## 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(WF, FUN = runCommandline, conffile=".batchtools.conf.R",
template="batchtools.slurm.tmpl", Njobs=2, runid="01", resourceList=resources)
## Monitor progress of submitted jobs
getStatus(reg=reg)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.