Updating cwl
authorSarah Wait Zaranek <swz@curii.com>
Thu, 5 Mar 2020 18:13:22 +0000 (18:13 +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/annotate-vcf.cwl
cwl/bwa-gatk-wf.cwl
cwl/bwamem-samtools-view.cwl
cwl/fastqc.cwl
cwl/gatk-haplotypecaller.cwl
cwl/generate-report.cwl
cwl/report-wf.cwl [new file with mode: 0644]
cwl/samtools-index.cwl
cwl/samtools-sort.cwl

index 5a5c84f6e48630596d283a2ba6dd45e7881adf8a..fc20bfc1af01a4ffb0db038b87ff7c8c739b3cd7 100644 (file)
@@ -13,6 +13,15 @@ hints:
 
 stdout: $(inputs.vcf.nameroot).txt
 
+inputs:
+  vcf:
+    type: File
+  clinvarvcf:
+    type: File
+
+outputs:
+  reporttxt: stdout
+
 arguments:
   - bcftools
   - annotate
@@ -26,12 +35,8 @@ arguments:
   - filter
   - prefix: "-i"
     valueFrom: "INFO/ALLELEID>=1"
-
-inputs: 
-  vcf:
-    type: File
-  clinvarvcf:
-    type: File
-  
-outputs:
-  report: stdout
+  - {valueFrom: '|', shellQuote: false}
+  - bcftools
+  - query
+  - prefix: "-f"
+    valueFrom: "%ID\t%CHROM\t%POS\t%REF\t%ALT\t%INFO/ALLELEID\t%INFO/CLNSIG\t%INFO/CLNDN\t%INFO/AF_ESP\t%INFO/AF_EXAC\t%INFO/AF_TGP[\t%GT]\n"
index 6e1f326127baf9e2e016bfd2bad1c3c7d0b838ce..8069a1d31f3429107b6bffd78ff3e6a70390402a 100644 (file)
@@ -25,7 +25,7 @@ outputs:
     outputSource: fastqc/out-zip 
   vcf:
     type: File
-    outputSource: vep/out-vcf
+    outputSource: haplotypecaller/vcf
 
 steps:
   fastqc:
index c3954526ebc232475718e2067ebde57a032f7dc6..044ef74e524732397d06b052087ea288c59a33c7 100644 (file)
@@ -1,5 +1,6 @@
 cwlVersion: v1.1
 class: CommandLineTool
+label: Realigning fastqs and converting output to bam
 
 requirements:
   DockerRequirement:
@@ -9,25 +10,6 @@ requirements:
     ramMin: 26000
     coresMin: 8
 
-arguments:
-  - /bwa-0.7.17/bwa
-  - mem
-  - -t
-  - $(runtime.cores)
-  - $(inputs.reference)
-  - -R
-  - "@RG\\tID:sample\\tSM:sample\\tLB:sample\\tPL:ILLUMINA"
-  - $(inputs.fastq1)
-  - $(inputs.fastq2)
-  - shellQuote: false
-    valueFrom: '|'
-  - samtools
-  - view
-  - -b
-  - -S
-  - shellQuote: false
-    valueFrom: '-'
-
 inputs:
   reference:
     type: File
@@ -50,3 +32,22 @@ outputs:
     type: File
     outputBinding:
       glob: "*bam"
+
+arguments:
+  - /bwa-0.7.17/bwa
+  - mem
+  - -t
+  - $(runtime.cores)
+  - $(inputs.reference)
+  - -R
+  - "@RG\\tID:sample\\tSM:sample\\tLB:sample\\tPL:ILLUMINA"
+  - $(inputs.fastq1)
+  - $(inputs.fastq2)
+  - shellQuote: false
+    valueFrom: '|'
+  - samtools
+  - view
+  - -b
+  - -S
+  - shellQuote: false
+    valueFrom: '-'
index 02a6ab391c21b37e1571dfe22f8b5e1b03485e97..4708aaf8ae75e4ede4d50722a024cdd2871528de 100644 (file)
@@ -1,5 +1,6 @@
 cwlVersion: v1.1
 class: CommandLineTool
+label: Quality check on fastq data using FastQC
 
 requirements:
   DockerRequirement:
@@ -9,12 +10,6 @@ requirements:
       - $(inputs.fastq1)
       - $(inputs.fastq2)
 
-arguments:
-  - perl
-  - /FastQC/fastqc
-  - $(inputs.fastq1.basename)
-  - $(inputs.fastq2.basename)
-
 inputs:
   fastq1: File
   fastq2: File
@@ -28,3 +23,9 @@ outputs:
     type: File[]
     outputBinding:
       glob: "*fastqc.zip"
+
+basecommand: perl
+arguments:
+  - /FastQC/fastqc
+  - $(inputs.fastq1.basename)
+  - $(inputs.fastq2.basename)
index 94089c57ddf4c6fff474bb1cf6be86f960796eb2..5480eace46b21e2adca91053aeccd5bf8280c41b 100644 (file)
@@ -1,5 +1,6 @@
 cwlVersion: v1.1
 class: CommandLineTool
+label: Germline variant calling using GATK with output gvcf
 
 requirements:
   DockerRequirement:
@@ -13,18 +14,6 @@ hints:
     ramMin: 10000
     coresMin: 4    
 
-arguments:
-  - java
-  - -jar
-  - /gatk/gatk.jar
-  - HaplotypeCaller
-  - -R
-  - $(inputs.reference)
-  - -I
-  - $(inputs.bam)
-  - -O
-  - $(runtime.outdir)/$(inputs.sample).gatk.vcf
-
 inputs:
   bam:
     type: File
@@ -47,3 +36,17 @@ outputs:
     type: File
     outputBinding:
       glob: "*vcf"
+
+arguments:
+  - java
+  - -jar
+  - /gatk/gatk.jar
+  - HaplotypeCaller
+  - -R
+  - $(inputs.reference)
+  - -I
+  - $(inputs.bam)
+  - -O
+  - $(runtime.outdir)/$(inputs.sample).gatk.g.vcf
+  - -ERC
+  - "GVCF"
index 0c438d429d7caaea2bb519afa36c8f66f5eadc35..8ece243530d8cbd6f0ebb02c849783c0c6ba7b60 100644 (file)
@@ -10,15 +10,6 @@ hints:
     ramMin: 10000
     coresMin: 4    
 
-baseCommand: python
-
-arguments:
-  - $(inputs.reportfunc)
-  - $(inputs.sampletxt)
-  - $(inputs.sampletxt.basename)
-  - $(inputs.headhtml)
-  - $(inputs.tailhtml)
-
 inputs:
   reportfunc:
     type: File
@@ -28,9 +19,18 @@ inputs:
     type: File
   tailhtml:
     type: File
-    
+
 outputs:
   report:
     type: File
     outputBinding:
       glob: "*html"
+
+baseCommand: python
+
+arguments:
+  - $(inputs.reportfunc)
+  - $(inputs.sampletxt)
+  - $(inputs.sampletxt.basename)
+  - $(inputs.headhtml)
+  - $(inputs.tailhtml)
diff --git a/cwl/report-wf.cwl b/cwl/report-wf.cwl
new file mode 100644 (file)
index 0000000..f02dca7
--- /dev/null
@@ -0,0 +1,36 @@
+cwlVersion: v1.1
+class: Workflow
+
+inputs:
+  vcf: 
+    type: File
+  clinvarvcf:
+    type: File
+  reportfunc:
+    type: File
+  headhtml:
+    type: File
+  tailhtml:   
+    type: File
+
+outputs:
+  report:
+    type: File
+    outputSource: generate-report/report
+
+steps:
+  annotate:
+    run: annotate-vcf.cwl
+    in:
+      vcf: vcf
+      clinvarvcf: clinvarvcf
+    out: [reporttxt]
+
+  generate-report:
+    run: generate-report.cwl
+    in:
+      reportfunc: reportfunc
+      sampletxt: annotate/reporttxt
+      headhtml: headhtml
+      tailhtml: tailhtml
+    out: [report]
index c5184fa4ec9cabeecb848db5b855c67a47f2b23a..3264f95f62e8876f745899d95ddb95f0030a5e61 100644 (file)
@@ -8,11 +8,6 @@ requirements:
     listing:
       - $(inputs.bam)
 
-arguments:
-  - samtools
-  - index
-  - $(inputs.bam.basename)
-
 inputs:
   bam: File
 
@@ -24,3 +19,8 @@ outputs:
     secondaryFiles:
       - .bai
 
+runcommand: samtools
+
+arguments:
+  - index
+  - $(inputs.bam.basename)
index 79837b5932646ec3f9a513322f686e18bdee4886..8f1f273adbc063596355066c05a3f69d36612c31 100644 (file)
@@ -9,15 +9,6 @@ requirements:
     ramMin: 10000
     coresMin: 4
 
-arguments:
-  - samtools
-  - sort
-  - -t
-  - $(runtime.cores)
-  - $(inputs.bam)
-  - -o
-  - $(runtime.outdir)/$(inputs.sample).sorted.bam
-
 inputs:
   bam: File
   sample: string
@@ -26,4 +17,14 @@ outputs:
   out:
     type: File
     outputBinding:
-      glob: "*sorted.bam"
+      glob: "*sorted.bam
+
+runcommand: samtools
+
+arguments:
+  - sort
+  - -t
+  - $(runtime.cores)
+  - $(inputs.bam)
+  - -o
+  - $(runtime.outdir)/$(inputs.sample).sorted.bam