Rearranging for clarity
[arvados-tutorial.git] / WGS-processing / cwl / helper / gatk-haplotypecaller-with-interval.cwl
diff --git a/WGS-processing/cwl/helper/gatk-haplotypecaller-with-interval.cwl b/WGS-processing/cwl/helper/gatk-haplotypecaller-with-interval.cwl
new file mode 100644 (file)
index 0000000..88c78e0
--- /dev/null
@@ -0,0 +1,69 @@
+cwlVersion: v1.1
+class: CommandLineTool
+label: Germline variant calling using GATK with output gvcf
+
+$namespaces:
+  arv: "http://arvados.org/cwl#"
+  cwltool: "http://commonwl.org/cwltool#"
+
+requirements:
+  DockerRequirement:
+    dockerPull: broadinstitute/gatk:4.1.7.0
+
+hints:
+  arv:RuntimeConstraints:
+    outputDirType: keep_output_dir
+    keep_cache: 1024 
+  ResourceRequirement:
+    ramMin: 3500
+    coresMin: 2   
+
+inputs:
+  bam:
+    type: File
+    secondaryFiles:
+      - .bai
+  reference:
+    type: File
+    secondaryFiles:
+      - .amb
+      - .ann
+      - .bwt
+      - .pac
+      - .sa
+      - .fai
+      - ^.dict
+  intervallist:
+    type: File
+  sample: string
+
+outputs:
+  gvcf:
+    type: File
+    secondaryFiles:
+      - .tbi
+    outputBinding:
+      glob: "*vcf.gz"
+
+baseCommand: /gatk/gatk
+
+arguments:
+  - "--java-options"
+  - "-Xmx4G" 
+  - HaplotypeCaller
+  - prefix: "-R"
+    valueFrom: $(inputs.reference)
+  - prefix: "-I"
+    valueFrom: $(inputs.bam)
+  - prefix: "-L"
+    valueFrom: $(inputs.intervallist)
+  - prefix: "-O"
+    valueFrom: $(runtime.outdir)/$(inputs.sample)-$(inputs.intervallist.nameroot).gatk.g.vcf.gz
+  - prefix: "-ERC"
+    valueFrom: "GVCF"
+  - prefix: "-GQB"
+    valueFrom: "5"
+  - prefix: "-GQB"
+    valueFrom: "20"
+  - prefix: "-GQB"
+    valueFrom: "60"