Entering edit mode
5.1 years ago
Tony.D
•
0
Hi everyone,
I am creating a CWL pipeline for a simple R script (runs in a docker container) that reads in a .csv file and subsequently analyzes it via a R package. I am able to read in the file by passing the file from the command line to the R script using commandArgs(trailingOnly=TRUE) in the script. However, is there any other way of reading in a file (i.e csv file) into a R script using CWL? I feel like commandArgs(trailingOnly=TRUE) may not be the best option.
Here is my .cwl and .yml file
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
requirements:
ResourceRequirement:
ramMin: 2096
hints:
DockerRequirement:
dockerPull: docker/image
inputs:
script:
type: File
inputBinding:
position: 1
annotation:
type: File
inputBinding:
position: 2
baseCommand: [ Rscript ]
outputs:
getFile:
type: File
outputBinding:
glob: getFile.RData
.yml
script:
class: File
path: script_final.R
annotation:
class: File
path: annotation_full.csv
Thank you for your help.