a6218bdaa79bd28f83a2cd91087fca673999cf8a
[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   sample: 
26     type: string
27     label: Sample name
28   knownsites:
29     type: File
30     format: edam:format_3016 # VCF
31     label: VCF of known polymorphic sites for BQSR
32     secondaryFiles:
33       - .tbi   
34   scattercount: 
35     type: string
36     label: Desired split for variant calling
37   clinvarvcf: 
38     type: File
39     format: edam:format_3016 # VCF
40     label: Reference VCF for ClinVar
41   reportfunc: 
42     type: File
43     label: Function used to create HTML report
44   headhtml: 
45     type: File
46     format: edam:format_1964 # HTML
47     label: Header for HTML report
48   tailhtml: 
49     type: File
50     format: edam:format_1964 # HTML
51     label: Footer for HTML report
52
53 outputs:
54   gvcf:
55     type: File[]
56     outputSource: bwamem-gatk-report/gvcf
57     format: edam:format_3016 # GVCF
58     label: GVCFs generated from sets of fastqs
59     
60   report:
61     type: File[]  
62     outputSource: bwamem-gatk-report/report
63     format: edam:format_1964 # HTML
64     label: ClinVar variant reports 
65
66 steps:
67   getfastq:
68     run: ./helper/getfastq.cwl
69     in:
70       fastqdir: fastqdir
71     out: [fastq1, fastq2, sample]
72
73   bwamem-gatk-report:
74     run: ./helper/bwamem-gatk-report-wf.cwl
75     scatter: [fastq1, fastq2, sample]
76     scatterMethod: dotproduct
77     in:
78       fastq1: getfastq/fastq1
79       fastq2: getfastq/fastq2
80       reference: reference
81       sample: getfastq/sample
82       knownsites: knownsites
83       scattercount: scattercount
84       clinvarvcf: clinvarvcf
85       reportfunc: reportfunc
86       headhtml: headhtml
87       tailhtml: tailhtml
88     out: [qc-html,qc-zip,gvcf,report]
89
90 s:codeRepository: https://github.com/arvados/arvados-tutorial
91 s:license: https://www.gnu.org/licenses/agpl-3.0.en.html
92
93 $namespaces:
94  s: https://schema.org/
95  edam: http://edamontology.org/
96
97 $schemas:
98  - https://schema.org/version/latest/schema.rdf
99  - http://edamontology.org/EDAM_1.18.owl