Rearranging for clarity
[arvados-tutorial.git] / WGS-processing / cwl / helper / scatter-gatk-wf-with-interval.cwl
diff --git a/WGS-processing/cwl/helper/scatter-gatk-wf-with-interval.cwl b/WGS-processing/cwl/helper/scatter-gatk-wf-with-interval.cwl
new file mode 100644 (file)
index 0000000..6e9f415
--- /dev/null
@@ -0,0 +1,66 @@
+$namespaces:
+  arv: "http://arvados.org/cwl#"
+  cwltool: "http://commonwl.org/cwltool#"
+cwlVersion: v1.1
+class: Workflow
+
+requirements:
+  - class: SubworkflowFeatureRequirement
+  - class: ScatterFeatureRequirement
+
+inputs:
+  bam:
+    type: File
+    secondaryFiles:
+      - .bai
+  reference:
+    type: File
+    secondaryFiles:
+      - .amb
+      - .ann
+      - .bwt
+      - .pac
+      - .sa
+      - .fai
+      - ^.dict
+  sample: string
+  knownsites1:
+    type: File
+    secondaryFiles:
+      - .tbi
+  scattercount: string
+
+outputs:
+  gatheredgvcf:
+    type: File
+    secondaryFiles: 
+      - .tbi
+    outputSource: merge-GVCFs/gatheredgvcf
+    
+steps:
+  splitintervals:
+    run: gatk-splitintervals.cwl
+    in:
+      reference: reference
+      sample: sample
+      scattercount: scattercount
+    out: [intervalfiles]
+      
+  recal-haplotypecaller: 
+    run: gatk-wf-with-interval.cwl
+    scatter: intervallist
+    in:
+      bam: bam
+      reference: reference
+      sample: sample
+      knownsites1: knownsites1
+      intervallist: splitintervals/intervalfiles
+    out: [gvcf]
+
+  merge-GVCFs:
+    run: gather-array-vcf.cwl
+    in:
+      gvcfarray: recal-haplotypecaller/gvcf
+      sample: sample
+      reference: reference
+    out: [gatheredgvcf]