Add cwl and docker files
[lightning.git] / cwl / annotation / snpeff-bcftools-annotate.cwl
1 # Copyright (C) The Lightning Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 cwlVersion: v1.1
6 class: CommandLineTool
7 label: Run SnpEff on given VCF and use bcftools to annotate with dbSNP and gnomAD
8 requirements:
9   ShellCommandRequirement: {}
10 hints:
11   DockerRequirement:
12     dockerPull: snpeff4.3t
13   ResourceRequirement:
14     coresMin: 2
15     ramMin: 20000
16     tmpdirMin: 16000
17 inputs:
18   vcf:
19     type: File
20     label: Input VCF
21   sample:
22     type: string
23     label: Sample name
24   snpeffdatadir:
25     type: Directory
26     label: Database directory for SnpEff
27   genomeversion:
28     type: string
29     label: Genome version
30   dbsnp:
31     type: File
32     label: dbSNP BCF
33     secondaryFiles: [.csi]
34   gnomad:
35     type: File
36     label: gnomAD BCF
37     secondaryFiles: [.csi]
38 outputs:
39   annotatedvcf:
40     type: File
41     label: Annotated VCF
42     outputBinding:
43       glob: "*_snpeff_dbsnp_gnomad.vcf.gz"
44     secondaryFiles: [.tbi]
45 baseCommand: [java]
46 arguments:
47   - -Xmx$(runtime.ram)m
48   - prefix: "-jar"
49     valueFrom: "/snpEff/snpEff.jar"
50   - prefix: "-dataDir"
51     valueFrom: $(inputs.snpeffdatadir)
52   - $(inputs.genomeversion)
53   - $(inputs.vcf)
54   - shellQuote: False
55     valueFrom: "|"
56   - "bgzip"
57   - "-c"
58   - shellQuote: False
59     valueFrom: ">"
60   - $(inputs.sample)_snpeff.vcf.gz
61   - shellQuote: False
62     valueFrom: "&&"
63   - "tabix"
64   - $(inputs.sample)_snpeff.vcf.gz
65   - shellQuote: False
66     valueFrom: "&&"
67   - "bcftools"
68   - "annotate"
69   - prefix: "--annotations"
70     valueFrom: $(inputs.dbsnp)
71   - prefix: "--columns"
72     valueFrom: "=ID"
73   - $(inputs.sample)_snpeff.vcf.gz
74   - "-Oz"
75   - prefix: "-o"
76     valueFrom: $(inputs.sample)_snpeff_dbsnp.vcf.gz
77   - shellQuote: False
78     valueFrom: "&&"
79   - "tabix"
80   - $(inputs.sample)_snpeff_dbsnp.vcf.gz
81   - shellQuote: False
82     valueFrom: "&&"
83   - "bcftools"
84   - "annotate"
85   - prefix: "--annotations"
86     valueFrom: $(inputs.gnomad)
87   - prefix: "--columns"
88     valueFrom: "INFO/AC,INFO/AN,INFO/AF,INFO/AF_afr,INFO/AF_amr,INFO/AF_asj,INFO/AF_eas,INFO/AF_fin,INFO/AF_nfe,INFO/AF_oth"
89   - $(inputs.sample)_snpeff_dbsnp.vcf.gz
90   - "-Oz"
91   - prefix: "-o"
92     valueFrom: $(inputs.sample)_snpeff_dbsnp_gnomad.vcf.gz
93   - shellQuote: False
94     valueFrom: "&&"
95   - "tabix"
96   - $(inputs.sample)_snpeff_dbsnp_gnomad.vcf.gz
97   - shellQuote: False
98     valueFrom: "&&"
99   - "rm"
100   - $(inputs.sample)_snpeff.vcf.gz
101   - $(inputs.sample)_snpeff.vcf.gz.tbi
102   - $(inputs.sample)_snpeff_dbsnp.vcf.gz
103   - $(inputs.sample)_snpeff_dbsnp.vcf.gz.tbi