Adding cwl to convert gvcf to vcf
authorSarah Wait Zaranek <swz@curii.com>
Fri, 6 Mar 2020 08:42:59 +0000 (08:42 +0000)
committerWard Vandewege <ward@jhvc.com>
Thu, 18 Jun 2020 15:16:39 +0000 (11:16 -0400)
Arvados-DCO-1.1-Signed-off-by: Sarah Wait Zaranek <swz@curii.com>
no issue #

cwl/gvcf-to-vcf.cwl [new file with mode: 0644]
cwl/report-wf.cwl

diff --git a/cwl/gvcf-to-vcf.cwl b/cwl/gvcf-to-vcf.cwl
new file mode 100644 (file)
index 0000000..ecba357
--- /dev/null
@@ -0,0 +1,42 @@
+cwlVersion: v1.1
+class: CommandLineTool
+label: Converts gvcf to vcf
+
+requirements:
+  - class: DockerRequirement
+    dockerPull: curii/clinvar-report
+  - class: ShellCommandRequirement
+
+hints:
+  ResourceRequirement:
+    ramMin: 10000
+    coresMin: 4
+
+inputs:
+  samplename:
+    type: string
+  gvcf:
+    type: File
+  
+outputs:
+  vcf:
+    type: File
+    outputBinding:
+      glob: "*.vcf.gz"
+    secondaryFiles: [.tbi]
+
+arguments:
+  - bcftools
+  - view 
+  - prefix: "--min-ac"
+    valueFrom: "1"
+  - $(inputs.gvcf.path)
+  - valueFrom: "-Ov"
+  - prefix: "-o"
+    valueFrom: $(inputs.samplename).vcf
+  - {valueFrom: '&&', shellQuote: false}
+  - bgzip
+  - valueFrom: $(inputs.samplename).vcf
+  - {valueFrom: '&&', shellQuote: false}
+  - tabix
+  - valueFrom: $(inputs.samplename).vcf.gz
index f02dca752165ae28c359d5f9a86fc3137d5da7cb..de8ab3f67ce9b20bfd392a1ce31c2300926a00a6 100644 (file)
@@ -2,8 +2,10 @@ cwlVersion: v1.1
 class: Workflow
 
 inputs:
-  vcf: 
+  gvcf: 
     type: File
+  samplename:
+    type: string
   clinvarvcf:
     type: File
   reportfunc:
@@ -19,10 +21,17 @@ outputs:
     outputSource: generate-report/report
 
 steps:
+  gvcf-to-vcf:
+    run: gvcf-to-vcf.cwl
+    in:
+      gvcf: gvcf
+      samplename: samplename
+    out: [vcf]
+
   annotate:
     run: annotate-vcf.cwl
     in:
-      vcf: vcf
+      vcf: gvcf-to-vcf/vcf
       clinvarvcf: clinvarvcf
     out: [reporttxt]