check.output.Rd
This function returns a data.frame
indicating the number of existing files
and how many files are missing.
check.output(sysargs, type="data.frame")
check.outfiles(sysargs, type="data.frame")
object of class SYSargs2
or SYSargsList
.
return object option. It can be data.frame
or list
.
data.frame
or list
containing all the outfiles
file information.
## Construct SYSargs2 object
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
#> Instance of 'SYSargs2':
#> Slot names/accessors:
#> targets: 18 (M1A...V12B), targetsheader: 4 (lines)
#> modules: 1
#> wf: 0, clt: 1, yamlinput: 7 (inputs)
#> input: 18, output: 18
#> cmdlist: 18
#> Sub Steps:
#> 1. hisat2-mapping-se (rendered: TRUE)
#>
#>
## Check output
check.output(WF)
#> Targets Total_Files Existing_Files Missing_Files
#> 1 M1A 1 0 1
#> 2 M1B 1 0 1
#> 3 A1A 1 0 1
#> 4 A1B 1 0 1
#> 5 V1A 1 0 1
#> 6 V1B 1 0 1
#> 7 M6A 1 0 1
#> 8 M6B 1 0 1
#> 9 A6A 1 0 1
#> 10 A6B 1 0 1
#> 11 V6A 1 0 1
#> 12 V6B 1 0 1
#> 13 M12A 1 0 1
#> 14 M12B 1 0 1
#> 15 A12A 1 0 1
#> 16 A12B 1 0 1
#> 17 V12A 1 0 1
#> 18 V12B 1 0 1
check.output(WF, "list")
#> M1A M1B A1A A1B V1A V1B M6A M6B A6A A6B V6A V6B M12A
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> M12B A12A A12B V12A V12B
#> FALSE FALSE FALSE FALSE FALSE
## Construct SYSargsList object
sal <- SPRproject(overwrite=TRUE)
#> Recreating directory '/home/runner/work/systemPipeR/systemPipeR/docs/reference/.SPRproject'
#> Creating file '/home/runner/work/systemPipeR/systemPipeR/docs/reference/.SPRproject/SYSargsList.yml'
targetspath <- system.file("extdata/cwl/example/targets_example.txt", package="systemPipeR")
appendStep(sal) <- SYSargsList(step_name = "echo",
targets=targetspath, dir=TRUE,
wf_file="example/workflow_example.cwl", input_file="example/example.yml",
dir_path = system.file("extdata/cwl", package="systemPipeR"),
inputvars = c(Message = "_STRING_", SampleName = "_SAMPLE_"))
## Check outfiles
check.outfiles(sal)
#> Warning: path[1]="results/M1.txt": No such file or directory
#> Warning: path[1]="results/M2.txt": No such file or directory
#> Warning: path[1]="results/M3.txt": No such file or directory
#> $echo
#> Targets Total_Files Existing_Files Missing_Files
#> 1 M1 1 0 1
#> 2 M2 1 0 1
#> 3 M3 1 0 1
#>