Merge branch 'main' into 19868-pca-in-ml
[lightning.git] / cwl / annotation / annotate-wf.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: Workflow
7 requirements:
8   ScatterFeatureRequirement: {}
9
10 inputs:
11   sample: string
12   chrs: string[]
13   vcfdir: Directory
14   snpeffdatadir: Directory
15   genomeversion: string
16   dbsnp:
17     type: File
18     secondaryFiles: [.csi]
19   gnomaddir: Directory
20
21 outputs:
22   annotatedvcf:
23     type: File
24     secondaryFiles: [.tbi]
25     outputSource: bcftools-concat/vcf
26   summary:
27     type: File
28     outputSource: totalcounts/summary
29
30 steps:
31   getfiles:
32     run: getfiles.cwl
33     in:
34       sample: sample
35       chrs: chrs
36       vcfdir: vcfdir
37       gnomaddir: gnomaddir
38     out: [samples, vcfs, gnomads]
39
40   preprocess:
41     run: preprocess.cwl
42     scatter: [sample, vcf]
43     scatterMethod: dotproduct
44     in:
45       sample: getfiles/samples
46       vcf: getfiles/vcfs
47     out: [trimmedvcf]
48
49   snpeff-bcftools-annotate:
50     run: snpeff-bcftools-annotate.cwl
51     scatter: [sample, vcf, gnomad]
52     scatterMethod: dotproduct
53     in:
54       vcf: preprocess/trimmedvcf
55       sample: getfiles/samples
56       snpeffdatadir: snpeffdatadir
57       genomeversion: genomeversion
58       dbsnp: dbsnp
59       gnomad: getfiles/gnomads
60     out: [annotatedvcf]
61
62   bcftools-concat:
63     run: bcftools-concat.cwl
64     in:
65       sample: sample
66       vcfs: snpeff-bcftools-annotate/annotatedvcf
67     out: [vcf]
68
69   getcount:
70     run: getcount.cwl
71     scatter: [sample, vcf]
72     scatterMethod: dotproduct
73     in:
74       sample: getfiles/samples
75       vcf: snpeff-bcftools-annotate/annotatedvcf
76     out: [count]
77
78   totalcounts:
79     run: totalcounts.cwl
80     in:
81       sample: sample
82       counts: getcount/count
83     out: [summary]