Hello,
I have a tool that takes a directory (--dir ~/Run4_forR) with a samples.csv file as input, and the tool creates and outputs a directory of folders and files in the same input directory as shown by tree below. It runs okay normally, but when I wrap it in CWL, it cannot create the directory tree because of the tmp paths prepended by CWL ('/tmp/tmpWCW3do/Run4_forR/L1'). How should I solve this issue? thanks
Command: Rscript /home/dz/MakeBarcodeTablesV3.R --dir ~/Run4_forR/
Output:
dz@v:~/Run4_forR$ tree
.
├── samples.csv
├── L1
│ ├── barcode1.txt
│ └── library_params1.txt
├── L2
│ ├── barcode2.txt
│ └── library_params2.txt
├── L3
│ ├── barcode3.txt
│ └── library_params3.txt
├── L4
│ ├── barcode4.txt
│ └── library_params4.txt
├── L5
│ ├── barcode5.txt
│ └── library_params5.txt
├── L6
│ ├── barcode6.txt
│ └── library_params6.txt
├── L7
│ ├── barcode7.txt
│ └── library_params7.txt
└── L8
├── barcode8.txt
└── library_params8.txt
cwl-runner warnings:
Warning messages: 1: In dir.create(paste(location, "L", l, sep = ""), showWarnings = TRUE, : cannot create dir '/tmp/tmpWCW3do/Run4_forR/L1', reason 'No such file or directory'
Hello Michael,
Thank you for your reply.
I tried it, but cwl-runner prepended tmp paths to the directory input and then the wrapped tool cannot find the directory because of the prepend (see log below).
Also, in the 'cannot open file . . .' message below, it's missing a '/' before the file in the directory. It should be '...Run4_forR/hp1.csv'.
Any suggestions? Thanks!!
Could be an error with the script, it is normal to specify a directory without a trailing slash
If you absolutely can't fix the Rscript to add the directory separator ('/' on unix) then you will need to add
valueFrom: ${ return self + '/'; }
to theinputBinding
withInlineJavascriptRequirement
added to therequirements