-
Notifications
You must be signed in to change notification settings - Fork 0
/
zip_and_index_vcf.cwl
65 lines (62 loc) · 1.91 KB
/
zip_and_index_vcf.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
doc: |
This is a very simple workflow of two steps. It will zip an input VCF file and then index it. The zipped file and the index file will be in the workflow output.
requirements:
- class: InlineJavascriptRequirement
inputs:
vcf:
type: File
outputs:
indexed_file:
outputSource: index_step/indexed_file
type: File
zipped_file:
outputSource: zip_step/zipped_file
type: File
steps:
zip_step:
in:
vcf_to_zip: vcf
out: [zipped_file]
run:
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: quay.io/pancancer/pcawg-oxog-tools
inputs:
vcf_to_zip:
type: File
inputBinding:
position: 0
prefix: "-c"
stdout: $( inputs.vcf_to_zip.basename + ".gz")
outputs:
zipped_file:
type: File
outputBinding:
glob: "*.gz"
baseCommand: "bgzip"
index_step:
in:
zipped_file: zip_step/zipped_file
out: [indexed_file]
run:
class: CommandLineTool
requirements:
- class: DockerRequirement
dockerPull: quay.io/pancancer/pcawg-oxog-tools
- class: InitialWorkDirRequirement
listing:
- $(inputs.zipped_file)
inputs:
zipped_file:
type: File
arguments: [ $( runtime.outdir + "/" + inputs.zipped_file.basename ) ]
outputs:
indexed_file:
type: File
outputBinding:
glob: "*.tbi"
baseCommand: [tabix, -f, -p, vcf]