View source: R/sysargs2_utilities.R
loadWorkflow | R Documentation |
The constructor functions create an SYSargs2
S4 class object from three
input files: a CWL param
and input
files, and one simple tabular
or yml file, a targets
file. The latter is optional for workflow steps
lacking input files. TheCWL param
provides all the parameters required
for running command-line software, following the standard and specification
defined on Common Workflow Language (CWL).
The input
file provides additional information for the command-line,
allowing each sample level input/outfile operation uses its own SYSargs2
instance. In the targets
file users could provide the paths to the initial
sample input files (e.g. FASTQ) along with sample labels, and if appropriate
biological replicate and contrast information for controlling differential
abundance analyses.
The renderWF
function 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. Between different instances,
this connectivity is established by `appendStep<-`
method. Please
check more details from SYSargsList-class
class.
loadWorkflow(targets = NULL, wf_file, input_file, dir_path = "param/cwl", id = "SampleName")
renderWF(WF, inputvars = NULL)
updateWF(WF, write.yaml=FALSE, name.yaml="default", new_targets=NULL,
new_targetsheader=NULL, inputvars=NULL, silent=FALSE)
targets |
either the path to |
wf_file |
name and path to |
input_file |
name and path to |
dir_path |
path to the |
id |
A column from |
WF |
Object of class |
inputvars |
named character vector. Variables defined in the |
write.yaml |
logical. If set to |
name.yaml |
name and path to |
new_targets |
new targets files as list. 'targets' |
new_targetsheader |
character. New header/comment lines of targets file. Default is |
silent |
If set to |
SYSargs2
object.
Daniela Cassol and Thomas Girke
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", package="systemPipeR")
WF <- loadWorkflow(targets=targets, wf_file="hisat2/hisat2-mapping-se.cwl",
input_file="hisat2/hisat2-mapping-se.yml", dir_path=dir_path)
WF <- renderWF(WF, inputvars=c(FileName="_FASTQ_PATH1_", SampleName="_SampleName_"))
WF
## If required to update the object
yamlinput(WF, "thread") <- 6L
WF <- updateWF(WF)
cmdlist(WF)[1]
yamlinput(WF)$thread
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.