Which of these methods is preferred to create a temporary directory to use in _JAVA_OPTS during a workflow?
Option 1 - Create in a separate step and pass to tool:
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
- entryname: empty_dir
entry: "$({class: 'Directory', listing: []})"
writable: true
arguments: [touch, empty_dir/placeholder]
inputs: []
outputs:
empty_dir:
type: Directory
outputBinding:
glob: empty_dir
Option 2 - Create with expression inside of tool itself:
cwlVersion: v1.0
class: CommandLineTool
arguments:
- java
- -Xmx50g
- -Djava.io.tmpdir=$(runtime.tmpdir)
- -jar
- abra.jar
requirements:
InlineJavascriptRequirement: {}
inputs:
working_directory:
type: Directory?
inputBinding:
prefix: --tmpdir
valueFrom: $(runtime.tmpdir)