diff --git a/workflows/lobSTR/README b/workflows/lobSTR/README index 5ae8eb9b6..0efe4e449 100644 --- a/workflows/lobSTR/README +++ b/workflows/lobSTR/README @@ -11,7 +11,11 @@ To run locally, you may install the reference implementation of CWL: $ wget http://files.teamerlich.org/lobstr/v3/ref/lobSTR_v3.0.2_hg19_resource_bundle.tar.gz $ tar xvzf lobSTR_v3.0.2_hg19_resource_bundle.tar.gz -3) Run the demo: +3) Ensure your docker version is compatible with the Arvados image ( < 1.10 ): + +$ docker --version + +4) Run the demo: $ ./lobSTR-workflow.cwl lobSTR-demo.json diff --git a/workflows/lobSTR/allelotype.cwl b/workflows/lobSTR/allelotype.cwl index eec251d47..f19bc7c69 100644 --- a/workflows/lobSTR/allelotype.cwl +++ b/workflows/lobSTR/allelotype.cwl @@ -5,6 +5,9 @@ class: CommandLineTool description: Run lobSTR allelotype classifier. +requirements: + - class: InlineJavascriptRequirement + inputs: - id: bam type: File @@ -45,7 +48,7 @@ inputs: inputBinding: prefix: "--index-prefix" valueFrom: | - ${ return {"path": $self.path.match(/(.*)ref\.fasta/)[1], "class": "File"}; } + ${ return {"path": self.path.match(/(.*)ref\.fasta/)[1], "class": "File"}; } secondaryFiles: - ".amb" @@ -55,19 +58,19 @@ inputs: - ".rbwt" - ".rpac" - ".rsa" - - ${return $self.replace(/(.*)ref\.fasta/, "$1chromsizes.tab")} - - ${return $self.replace(/(.*)ref\.fasta/, "$1mergedref.bed")} - - ${return $self.replace(/(.*)ref\.fasta/, "$1ref_map.tab")} + - ${return self.path.replace(/(.*)ref\.fasta/, "$1chromsizes.tab")} + - ${return self.path.replace(/(.*)ref\.fasta/, "$1mergedref.bed")} + - ${return self.path.replace(/(.*)ref\.fasta/, "$1ref_map.tab")} outputs: - id: vcf type: File outputBinding: - glob: $(job.output_prefix + '.vcf') + glob: $(inputs['output_prefix'] + '.vcf') - id: "#vcf_stats" type: File outputBinding: - glob: $(job.output_prefix + '.allelotype.stats') + glob: $(inputs['output_prefix'] + '.allelotype.stats') baseCommand: ["allelotype", "--command", "classify"] diff --git a/workflows/lobSTR/lobSTR-tool.cwl b/workflows/lobSTR/lobSTR-tool.cwl index 942bc398a..a1df39b88 100644 --- a/workflows/lobSTR/lobSTR-tool.cwl +++ b/workflows/lobSTR/lobSTR-tool.cwl @@ -236,12 +236,12 @@ outputs: - id: bam type: File outputBinding: - glob: $(job.output_prefix + '.aligned.bam') + glob: $(inputs['output_prefix'] + '.aligned.bam') - id: bam_stats type: File outputBinding: - glob: $(job.output_prefix + '.aligned.stats') + glob: $(inputs['output_prefix'] + '.aligned.stats') baseCommand: ["lobSTR"] arguments: diff --git a/workflows/lobSTR/lobSTR-workflow.cwl b/workflows/lobSTR/lobSTR-workflow.cwl index a0a1d44e2..504818808 100755 --- a/workflows/lobSTR/lobSTR-workflow.cwl +++ b/workflows/lobSTR/lobSTR-workflow.cwl @@ -47,19 +47,19 @@ inputs: outputs: - id: bam type: File - source: "#samindex.bam_with_bai" + source: "#samindex/bam_with_bai" - id: bam_stats type: File - source: "#lobSTR.bam_stats" + source: "#lobSTR/bam_stats" - id: vcf type: File - source: "#allelotype.vcf" + source: "#allelotype/vcf" - id: vcf_stats type: File - source: "#allelotype.vcf_stats" + source: "#allelotype/vcf_stats" hints: - class: DockerRequirement diff --git a/workflows/lobSTR/samtools-sort.cwl b/workflows/lobSTR/samtools-sort.cwl index 8ca6467f3..885f98f62 100644 --- a/workflows/lobSTR/samtools-sort.cwl +++ b/workflows/lobSTR/samtools-sort.cwl @@ -49,7 +49,7 @@ outputs: - id: output_file type: File outputBinding: - glob: $(job['output_name']) + glob: $(inputs['output_name']) baseCommand: ["samtools", "sort"]