Add cwl and docker files
[lightning.git] / cwl / preprocess / simons / make-bed.cwl
1 # Copyright (C) The Lightning Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 $namespaces:
6   arv: "http://arvados.org/cwl#"
7 cwlVersion: v1.0
8 class: CommandLineTool
9 label: Make BED from VCF for regions passing a specified QUAL and GQ cutoff
10 requirements:
11   DockerRequirement:
12     dockerPull: vcfutil
13   ResourceRequirement:
14     coresMin: 2
15     ramMin: 22000
16   ShellCommandRequirement: {}
17 hints:
18   arv:RuntimeConstraints:
19     keep_cache: 4096
20 inputs:
21   vcf:
22     type: File
23     label: Input VCF file
24   sample:
25     type: string
26     label: Sample name of VCF
27   qualcutoff:
28     type: int
29     label: Filtering QUAL cutoff
30   gqcutoff:
31     type: int
32     label: Filtering GQ cutoff
33 outputs:
34   bed:
35     type: stdout
36     label: BED for regions that pass cutoff
37 baseCommand: [bcftools, view]
38 arguments:
39   - prefix: "-e"
40     valueFrom: "QUAL<$(inputs.qualcutoff) | QUAL='.' | FORMAT/GQ<$(inputs.gqcutoff)"
41   - $(inputs.vcf)
42   - shellQuote: false
43     valueFrom: "|"
44   - "convert2bed"
45   - prefix: "-i"
46     valueFrom: "vcf"
47   - "-d"
48   - shellQuote: false
49     valueFrom: "|"
50   - "cut"
51   - "-f1-3"
52   - shellQuote: false
53     valueFrom: "|"
54   - "bedtools"
55   - "merge"
56   - prefix: "-i"
57     valueFrom: "-"
58 stdout: $(inputs.sample).bed