58e38cbf2d6453908bfb5b4c4564daa439996988
[arvados-tutorial.git] / WGS-processing / cwl / wgs-processing-wf.cwl
1 cwlVersion: v1.1
2 class: Workflow
3 label: WGS processing workflow scattered over samples
4
5 requirements:
6   - class: SubworkflowFeatureRequirement
7   - class: ScatterFeatureRequirement
8
9 inputs:
10   fastqdir:
11     type: Directory 
12     label: Directory of paired FASTQ files
13   reference:
14     type: File
15     format: edam:format_1929 # FASTA
16     label: Reference genome 
17     secondaryFiles:
18       - .amb
19       - .ann
20       - .bwt
21       - .pac
22       - .sa
23       - .fai
24       - ^.dict
25   knownsites:
26     type: File
27     format: edam:format_3016 # VCF
28     label: VCF of known polymorphic sites for BQSR
29     secondaryFiles:
30       - .tbi   
31   scattercount: 
32     type: string
33     label: Desired split for variant calling
34   clinvarvcf: 
35     type: File
36     format: edam:format_3016 # VCF
37     label: Reference VCF for ClinVar
38   reportfunc: 
39     type: File
40     label: Function used to create HTML report
41   headhtml: 
42     type: File
43     format: edam:format_1964 # HTML
44     label: Header for HTML report
45   tailhtml: 
46     type: File
47     format: edam:format_1964 # HTML
48     label: Footer for HTML report
49
50 outputs:
51   gvcf:
52     type: File[]
53     outputSource: bwamem-gatk-report/gvcf
54     format: edam:format_3016 # GVCF
55     label: GVCFs generated from GATK 
56     
57   report:
58     type: File[]  
59     outputSource: bwamem-gatk-report/report
60     format: edam:format_1964 # HTML
61     label: ClinVar variant reports 
62
63 steps:
64   getfastq:
65     run: ./helper/getfastq.cwl
66     in:
67       fastqdir: fastqdir
68     out: [fastq1, fastq2, sample]
69
70   bwamem-gatk-report:
71     run: ./helper/bwamem-gatk-report-wf.cwl
72     scatter: [fastq1, fastq2, sample]
73     scatterMethod: dotproduct
74     in:
75       fastq1: getfastq/fastq1
76       fastq2: getfastq/fastq2
77       reference: reference
78       sample: getfastq/sample
79       knownsites: knownsites
80       scattercount: scattercount
81       clinvarvcf: clinvarvcf
82       reportfunc: reportfunc
83       headhtml: headhtml
84       tailhtml: tailhtml
85     out: [qc-html,qc-zip,gvcf,report]
86
87 s:codeRepository: https://github.com/arvados/arvados-tutorial
88 s:license: https://www.gnu.org/licenses/agpl-3.0.en.html
89
90 $namespaces:
91  s: https://schema.org/
92  edam: http://edamontology.org/
93
94 $schemas:
95  - https://schema.org/version/latest/schema.rdf
96  - http://edamontology.org/EDAM_1.18.owl