Open adamstruck opened 6 years ago
A single input is mapped to two entries in the TES message.
CWL:
cwlVersion: v1.0 class: CommandLineTool doc: "Invoke 'samtools index' to create a 'BAI' index" requirements: - class: DockerRequirement dockerPull: biocontainers/samtools:latest - class: InitialWorkDirRequirement listing: [ $(inputs.alignments) ] inputs: alignments: type: File inputBinding: position: 1 valueFrom: $(self.basename) label: Input bam file. outputs: alignments_with_index: type: File secondaryFiles: .bai outputBinding: glob: $(inputs.alignments.basename) baseCommand: ["samtools", "index"]
Inputs JSON:
{ "alignments": { "location": "s3://s3.us-west-2.amazonaws.com/funnel-test/NA12878.bam", "class": "File" } }
Resulting TES Task:
{ "id": "b9f2psnpbjg715qbbnr0", "state": "COMPLETE", "name": "root.index", "inputs": [ { "name": "NA12878.bam", "url": "s3://s3.us-west-2.amazonaws.com/funnel-test/NA12878.bam", "path": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index/NA12878.bam" }, { "name": "NA12878.bam", "url": "s3://s3.us-west-2.amazonaws.com/funnel-test/NA12878.bam", "path": "/funnel-test/NA12878.bam" } ], "outputs": [ { "name": "index", "url": "s3://s3.us-west-2.amazonaws.com/funnel-test/bunny/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index", "path": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index", "type": "DIRECTORY" } ], "resources": { }, "executors": [ { "image": "biocontainers/samtools:latest", "command": [ "/bin/sh", "-c", "samtools index NA12878.bam" ], "workdir": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index", "stderr": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index/job.err.log", "env": { "HOME": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index", "TMPDIR": "/Users/strucka/scratch/cwl/samtools/inputs/257cbe72-9f3a-469b-b925-c63dd39e46d3/root/index" } } ], }
This appears to be due to the InitialWorkDirRequirement of this CWL CommandLineTool.
InitialWorkDirRequirement
A single input is mapped to two entries in the TES message.
CWL:
Inputs JSON:
Resulting TES Task: