Merge branch '19868-pca-in-ml' into main
[lightning.git] / cwl / gvcf2fasta / gvcf2fasta_nonrefvcf-imputation-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 label: Impute gVCF and convert to FASTA for gVCF with NON_REF
8 requirements:
9   ScatterFeatureRequirement: {}
10   SubworkflowFeatureRequirement: {}
11 hints:
12   DockerRequirement:
13     dockerPull: vcfutil
14
15 inputs:
16   sampleid:
17     type: string
18     label: Sample ID
19   vcf:
20     type: File
21     label: Input gVCF
22   gqcutoff:
23     type: int
24     label: GQ (Genotype Quality) cutoff for filtering
25   genomebed:
26     type: File
27     label: Whole genome BED
28   ref:
29     type: File
30     label: Reference FASTA
31   haplotypes:
32     type: int[]
33     label: Haplotypes of sample
34     default: [1, 2]
35   chrs:
36     type: string[]
37   refsdir: Directory
38   mapsdir: Directory
39   panelnocallbed: File
40
41 outputs:
42   fas:
43     type: File[]
44     label: Output pair of FASTAs
45     outputSource: bcftools-consensus/fa
46
47 steps:
48   fixvcf-get_bed_varonlyvcf:
49     run: fixvcf-get_bed_varonlyvcf.cwl
50     in:
51       sampleid: sampleid
52       vcf: vcf
53       gqcutoff: gqcutoff
54       genomebed: genomebed
55     out: [nocallbed, varonlyvcf]
56
57   imputation-wf:
58     run: ../imputation/imputation-wf.cwl
59     in:
60       sample: sampleid
61       chrs: chrs
62       refsdir: refsdir
63       mapsdir: mapsdir
64       vcf: fixvcf-get_bed_varonlyvcf/varonlyvcf
65       nocallbed: fixvcf-get_bed_varonlyvcf/nocallbed
66       panelnocallbed: panelnocallbed
67     out: [phasedimputedvcf, phasedimputednocallbed]
68
69   bcftools-consensus:
70     run: bcftools-consensus.cwl
71     scatter: haplotype
72     in:
73       sampleid: sampleid
74       vcf: imputation-wf/phasedimputedvcf
75       ref: ref
76       haplotype: haplotypes
77       mask: imputation-wf/phasedimputednocallbed
78     out: [fa]