Skip to content

Instantly share code, notes, and snippets.

@denis-yuen
Last active April 30, 2018 18:45
Show Gist options
  • Save denis-yuen/730b3504732bcb26f65bd2e4544ca8b0 to your computer and use it in GitHub Desktop.
Save denis-yuen/730b3504732bcb26f65bd2e4544ca8b0 to your computer and use it in GitHub Desktop.
Demo
{
"input_normal": {
"path": "normal.bam",
"class": "File"
},
"input_tumour": {
"path": "tumour.bam",
"class": "File"
},
"index": {
"path": "mutect_smallindex",
"class": "Directory"
},
"ncpus": 12,
"out_vcf": "dmutations.vcf"
}
cwlVersion: v1.0
class: CommandLineTool
doc: "example tool"
hints:
DockerRequirement:
dockerPull: ubuntu
requirements:
- class: InlineJavascriptRequirement
inputs:
input_normal:
type: File
doc: |
bam input for control
inputBinding:
position: 1
secondaryFiles:
- .bai
input_tumour:
type: File
doc: |
bam input for tumour
inputBinding:
position: 2
secondaryFiles:
- .bai
outputs:
mutations:
type: File
outputBinding:
glob: test.vcf
baseCommand: ["cat"]
arguments:
- valueFrom: $(inputs.input_normal.path + ".bai")
- valueFrom: $(inputs.input_tumour.path + ".bai")
stdout: test.vcf
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.0
doc: "example workflow"
requirements:
- class: MultipleInputFeatureRequirement
inputs:
TUMOUR_BAM:
type: File
NORMAL_BAM:
type: File
outputs:
OUTPUT:
type: File
outputSource: mutect/mutations
steps:
mutect:
run: tool.cwl
in:
input_normal: NORMAL_BAM
input_tumour: TUMOUR_BAM
out: [mutations]
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.0
doc: "example workflow"
requirements:
- class: MultipleInputFeatureRequirement
inputs:
TUMOUR_BAM:
type: File
secondaryFiles:
- .bai
NORMAL_BAM:
type: File
secondaryFiles:
- .bai
outputs:
OUTPUT:
type: File
outputSource: mutect/mutations
steps:
mutect:
run: tool.cwl
in:
input_normal: NORMAL_BAM
input_tumour: TUMOUR_BAM
out: [mutations]
{
"TUMOUR_BAM": {
"path": "tumour.bam",
"class": "File"
},
"NORMAL_BAM": {
"path": "normal.bam",
"class": "File"
},
"index": {
"path": "mutect_smallindex",
"class": "Directory"
},
"ncpus": 12,
"output": "dmutations.vcf"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment