From 3b16f3f540a4cd5ce5e59e9b090330542adfafdc Mon Sep 17 00:00:00 2001 From: Sarah Wait Zaranek Date: Thu, 5 Mar 2020 18:13:22 +0000 Subject: [PATCH] Updating cwl Arvados-DCO-1.1-Signed-off-by: Sarah Wait Zaranek no issue # --- cwl/annotate-vcf.cwl | 23 ++++++++++++--------- cwl/bwa-gatk-wf.cwl | 2 +- cwl/bwamem-samtools-view.cwl | 39 ++++++++++++++++++------------------ cwl/fastqc.cwl | 13 ++++++------ cwl/gatk-haplotypecaller.cwl | 27 ++++++++++++++----------- cwl/generate-report.cwl | 20 +++++++++--------- cwl/report-wf.cwl | 36 +++++++++++++++++++++++++++++++++ cwl/samtools-index.cwl | 10 ++++----- cwl/samtools-sort.cwl | 21 ++++++++++--------- 9 files changed, 119 insertions(+), 72 deletions(-) create mode 100644 cwl/report-wf.cwl diff --git a/cwl/annotate-vcf.cwl b/cwl/annotate-vcf.cwl index 5a5c84f..fc20bfc 100644 --- a/cwl/annotate-vcf.cwl +++ b/cwl/annotate-vcf.cwl @@ -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" diff --git a/cwl/bwa-gatk-wf.cwl b/cwl/bwa-gatk-wf.cwl index 6e1f326..8069a1d 100644 --- a/cwl/bwa-gatk-wf.cwl +++ b/cwl/bwa-gatk-wf.cwl @@ -25,7 +25,7 @@ outputs: outputSource: fastqc/out-zip vcf: type: File - outputSource: vep/out-vcf + outputSource: haplotypecaller/vcf steps: fastqc: diff --git a/cwl/bwamem-samtools-view.cwl b/cwl/bwamem-samtools-view.cwl index c395452..044ef74 100644 --- a/cwl/bwamem-samtools-view.cwl +++ b/cwl/bwamem-samtools-view.cwl @@ -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: '-' diff --git a/cwl/fastqc.cwl b/cwl/fastqc.cwl index 02a6ab3..4708aaf 100644 --- a/cwl/fastqc.cwl +++ b/cwl/fastqc.cwl @@ -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) diff --git a/cwl/gatk-haplotypecaller.cwl b/cwl/gatk-haplotypecaller.cwl index 94089c5..5480eac 100644 --- a/cwl/gatk-haplotypecaller.cwl +++ b/cwl/gatk-haplotypecaller.cwl @@ -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" diff --git a/cwl/generate-report.cwl b/cwl/generate-report.cwl index 0c438d4..8ece243 100644 --- a/cwl/generate-report.cwl +++ b/cwl/generate-report.cwl @@ -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 index 0000000..f02dca7 --- /dev/null +++ b/cwl/report-wf.cwl @@ -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] diff --git a/cwl/samtools-index.cwl b/cwl/samtools-index.cwl index c5184fa..3264f95 100644 --- a/cwl/samtools-index.cwl +++ b/cwl/samtools-index.cwl @@ -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) diff --git a/cwl/samtools-sort.cwl b/cwl/samtools-sort.cwl index 79837b5..8f1f273 100644 --- a/cwl/samtools-sort.cwl +++ b/cwl/samtools-sort.cwl @@ -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 -- 2.30.2