Description Usage Arguments Value Author(s) See Also Examples
Convenience write function for generating targets files with updated
FileName
columns containing the paths to files generated
by input/output processes. These processes can be commandline- or R-based software.
Typically, the paths to the inputs are stored in the targets infile
(targetsin(args)
for SYSargs
objects or targets.as.df(targets(WF))
for SYSargs2
objects) and the outputs are stored in the targets outfile
(targetsout(args)
for SYSargs
objects or output(WF)
) for
SYSargs2
objects. Note: by default the function cannot overwrite
any existing files. If a file exists then the user has to explicitly
remove it or set overwrite=TRUE
.
1 |
x |
Object of class |
file |
Name and path of the output file. If set to "default" then the name of the output file will have the pattern 'targets_<software>.txt', where <software> will be what |
silent |
If set to |
overwrite |
If set to |
step |
Name or numeric position of the step in the workflow to write the output files. The names can be check running |
new_col |
A vector of character strings of the new column name to add to target file. |
new_col_output_index |
A vector of numeric index positions of the file in |
... |
To pass on additional arguments. |
Writes tabular targes files containing the header/comment lines from targetsheader(x)
and the columns from targetsout(x)
.
Daniela Cassol and Thomas Girke
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 | #########################################
## Examples with \code{SYSargs} object ##
#########################################
## Create SYSargs object
param <- system.file("extdata", "tophat.param", package="systemPipeR")
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
args <- systemArgs(sysma=param, mytargets=targets)
## Not run:
## Write targets out file
writeTargetsout(x=args, file="default")
## End(Not run)
##########################################
## Examples with \code{SYSargs2} object ##
##########################################
## Construct SYSargs2 object
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
## Not run:
## Write targets out file
names(WF$clt)
writeTargetsout(x=WF, file="default", step=1, new_col=c("sam_file"), new_col_output_index=c(1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.