removing unnecessary step, renaming cwl file
[arvados-tutorial.git] / cwl / gatk-haplotypecaller.cwl
index 94089c57ddf4c6fff474bb1cf6be86f960796eb2..1169f451eb127bffeb412c15b9fd3e811a123074 100644 (file)
@@ -1,29 +1,25 @@
 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
+    dockerPull: broadinstitute/gatk:4.1.7.0
   InitialWorkDirRequirement:
     listing:
       - $(inputs.bam)
 
 hints:
+  arv:RuntimeConstraints:
+    outputDirType: keep_output_dir
+    keep_cache: 1024 
   ResourceRequirement:
-    ramMin: 10000
-    coresMin: 4    
-
-arguments:
-  - java
-  - -jar
-  - /gatk/gatk.jar
-  - HaplotypeCaller
-  - -R
-  - $(inputs.reference)
-  - -I
-  - $(inputs.bam)
-  - -O
-  - $(runtime.outdir)/$(inputs.sample).gatk.vcf
+    ramMin: 5000
+    coresMin: 2    
 
 inputs:
   bam:
@@ -43,7 +39,28 @@ inputs:
   sample: string
 
 outputs:
-  vcf:
+  gvcf:
     type: File
     outputBinding:
-      glob: "*vcf"
+      glob: "*vcf.gz"
+
+baseCommand: /gatk/gatk
+
+arguments:
+  - "--java-options"
+  - "-Xmx4G" 
+  - HaplotypeCaller
+  - prefix: "-R"
+    valueFrom: $(inputs.reference)
+  - prefix: "-I"
+    valueFrom: $(inputs.bam)
+  - prefix: "-O"
+    valueFrom: $(runtime.outdir)/$(inputs.sample).gatk.g.vcf.gz
+  - prefix: "-ERC"
+    valueFrom: "GVCF"
+  - prefix: "-GQB"
+    valueFrom: "5"
+  - prefix: "-GQB"
+    valueFrom: "20"
+  - prefix: "-GQB"
+    valueFrom: "60"