|
- import "./tasks/mapping.wdl" as mapping
- import "./tasks/Metrics.wdl" as Metrics
- import "./tasks/Dedup.wdl" as Dedup
- import "./tasks/deduped_Metrics.wdl" as deduped_Metrics
- import "./tasks/BQSR.wdl" as BQSR
- import "./tasks/Haplotyper.wdl" as Haplotyper
- import "./tasks/TNseq.wdl" as TNseq
- import "./tasks/bcftools.wdl" as bcftools
- import "./tasks/ANNOVAR.wdl" as ANNOVAR
- import "./tasks/Manta.wdl" as Manta
- import "./tasks/AnnotSV.wdl" as AnnotSV
- import "./tasks/CNVkit.wdl" as CNVkit
- import "./tasks/MSIsensor.wdl" as MSIsensor
- import "./tasks/HRD.wdl" as HRD
- import "./tasks/TMB.wdl" as TMB
-
- import "./tasks/fastqc.wdl" as fastqc
- import "./tasks/fastqscreen.wdl" as fastqscreen
- import "./tasks/qualimap.wdl" as qualimap
-
- import "./tasks/TNscope.wdl" as TNscope
- import "./tasks/VarScan.wdl" as VarScan
-
-
- workflow {{ project_name }} {
-
- String sample_id
- File? tumor_fastq_1
- File? tumor_fastq_2
- File? normal_fastq_1
- File? normal_fastq_2
- String? duplex_umi
- String? read_structure
-
- String SENTIEON_LICENSE
- String sentieon_docker
- String manta_docker
- String bcftools_docker
- String annovar_docker
- String annotsv_docker
- String cnvkit_docker
- String sequenza_docker
- String msisensor_docker
- String tmb_docker
-
- String platform
- File ref_dir
- String fasta
- File dbmills_dir
- String db_mills
- File dbsnp_dir
- String dbsnp
- File germline_resource
- File germline_resource_tbi
- File annovar_database
- File annotsv_database
- File gc
- File baseline
- File ref_flat
-
- File? regions
- Int? interval_padding
-
- String disk_size
- String cluster_2cpu_4gb
- String cluster_16cpu_32gb
-
- Boolean qc
- String fastqc_docker
- String fastqscreen_docker
- String qualimap_docker
- File screen_ref_dir
- File fastq_screen_conf
-
- Boolean multi_caller
- String varscan_docker
-
- if (tumor_fastq_1!= "") {
- call mapping.mapping as tumor_mapping {
- input:
- group=sample_id + '.T',
- sample=sample_id + '.T',
- fastq_1=tumor_fastq_1,
- fastq_2=tumor_fastq_2,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- duplex_umi=duplex_umi,
- read_structure=read_structure,
- platform=platform,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call Metrics.Metrics as tumor_Metrics {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.T',
- fasta=fasta,
- ref_dir=ref_dir,
- sorted_bam=tumor_mapping.sorted_bam,
- sorted_bam_index=tumor_mapping.sorted_bam_index,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call Dedup.Dedup as tumor_Dedup {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.T',
- sorted_bam=tumor_mapping.sorted_bam,
- sorted_bam_index=tumor_mapping.sorted_bam_index,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.T',
- fasta=fasta,
- ref_dir=ref_dir,
- deduped_bam=tumor_Dedup.deduped_bam,
- deduped_bam_index=tumor_Dedup.deduped_bam_index,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call BQSR.BQSR as tumor_BQSR {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.T',
- fasta=fasta,
- ref_dir=ref_dir,
- deduped_bam=tumor_Dedup.deduped_bam,
- deduped_bam_index=tumor_Dedup.deduped_bam_index,
- db_mills=db_mills,
- dbmills_dir=dbmills_dir,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- regions=regions,
- interval_padding=interval_padding,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- if (qc){
- call fastqc.fastqc as tumor_fastqc {
- input:
- sample=sample_id + '.T',
- read1=tumor_fastq_1,
- read2=tumor_fastq_2,
- docker=fastqc_docker,
- disk_size=disk_size,
- cluster_config=cluster_2cpu_4gb
- }
-
- call fastqscreen.fastq_screen as tumor_fastqscreen {
- input:
- sample=sample_id + '.T',
- read1=tumor_fastq_1,
- read2=tumor_fastq_2,
- screen_ref_dir=screen_ref_dir,
- fastq_screen_conf=fastq_screen_conf,
- docker=fastqscreen_docker,
- disk_size=disk_size,
- cluster_config=cluster_2cpu_4gb
- }
-
- call qualimap.qualimap as tumor_qualimap {
- input:
- sample=sample_id + '.T',
- bam=tumor_Dedup.deduped_bam,
- bai=tumor_Dedup.deduped_bam_index,
- covered_bed=regions,
- docker=qualimap_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
- }
- }
-
- if (normal_fastq_1!= "") {
- call mapping.mapping as normal_mapping {
- input:
- group=sample_id + '.N',
- sample=sample_id + '.N',
- fastq_1=normal_fastq_1,
- fastq_2=normal_fastq_2,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- duplex_umi=duplex_umi,
- read_structure=read_structure,
- platform=platform,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call Metrics.Metrics as normal_Metrics {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.N',
- fasta=fasta,
- ref_dir=ref_dir,
- sorted_bam=normal_mapping.sorted_bam,
- sorted_bam_index=normal_mapping.sorted_bam_index,
- regions=regions,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call Dedup.Dedup as normal_Dedup {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.N',
- sorted_bam=normal_mapping.sorted_bam,
- sorted_bam_index=normal_mapping.sorted_bam_index,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.N',
- fasta=fasta,
- ref_dir=ref_dir,
- deduped_bam=normal_Dedup.deduped_bam,
- deduped_bam_index=normal_Dedup.deduped_bam_index,
- regions=regions,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call BQSR.BQSR as normal_BQSR {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.N',
- fasta=fasta,
- ref_dir=ref_dir,
- deduped_bam=normal_Dedup.deduped_bam,
- deduped_bam_index=normal_Dedup.deduped_bam_index,
- db_mills=db_mills,
- dbmills_dir=dbmills_dir,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- regions=regions,
- interval_padding=interval_padding,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call Haplotyper.Haplotyper as Haplotyper {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '.N',
- fasta=fasta,
- ref_dir=ref_dir,
- recaled_bam=normal_BQSR.recaled_bam,
- recaled_bam_index=normal_BQSR.recaled_bam_index,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- regions=regions,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call bcftools.bcftools as Haplotyper_bcftools {
- input:
- vcf=Haplotyper.vcf,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=bcftools_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- if (qc){
- call fastqc.fastqc as normal_fastqc {
- input:
- sample=sample_id + '.N',
- read1=normal_fastq_1,
- read2=normal_fastq_2,
- docker=fastqc_docker,
- disk_size=disk_size,
- cluster_config=cluster_2cpu_4gb
- }
-
- call fastqscreen.fastq_screen as normal_fastqscreen {
- input:
- sample=sample_id + '.N',
- read1=normal_fastq_1,
- read2=normal_fastq_2,
- screen_ref_dir=screen_ref_dir,
- fastq_screen_conf=fastq_screen_conf,
- docker=fastqscreen_docker,
- disk_size=disk_size,
- cluster_config=cluster_2cpu_4gb
- }
-
- call qualimap.qualimap as normal_qualimap {
- input:
- sample=sample_id + '.N',
- bam=normal_Dedup.deduped_bam,
- bai=normal_Dedup.deduped_bam_index,
- covered_bed=regions,
- docker=qualimap_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
- }
- }
-
- call Manta.Manta as Manta {
- input:
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- docker=manta_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call AnnotSV.AnnotSV as Manta_AnnotSV {
- input:
- sample=sample_id,
- somatic_vcf=Manta.somatic_vcf,
- germline_vcf=Manta.germline_vcf,
- annotsv_database=annotsv_database,
- docker=annotsv_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call TNseq.TNseq as TNseq {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- normal_name=sample_id + ".N",
- tumor_name=sample_id + ".T",
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- interval_padding=interval_padding,
- germline_resource=germline_resource,
- germline_resource_tbi=germline_resource_tbi,
- docker=sentieon_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call bcftools.bcftools as TNseq_bcftools {
- input:
- vcf=TNseq.vcf,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=bcftools_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call ANNOVAR.ANNOVAR as TNseq_ANNOVAR {
- input:
- vcf=TNseq_bcftools.norm_vcf,
- annovar_database=annovar_database,
- docker=annovar_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call MSIsensor.MSIsensor as MSIsensor {
- input:
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- baseline=baseline,
- docker=msisensor_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call HRD.HRD as HRD {
- input:
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- gc=gc,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- docker=sequenza_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call TMB.TMB as TMB {
- input:
- sample=sample_id,
- regions=regions,
- snpindel_txt=TNseq_ANNOVAR.multianno_txt,
- docker=tmb_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call CNVkit.CNVkit as CNVkit {
- input:
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- ref_flat=ref_flat,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- hrd=HRD.hrd,
- docker=cnvkit_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call VarScan.VarScan as VarScan {
- input:
- sample=sample_id,
- normal_bam=normal_BQSR.recaled_bam,
- normal_bam_index=normal_BQSR.recaled_bam_index,
- tumor_bam=tumor_BQSR.recaled_bam,
- tumor_bam_index=tumor_BQSR.recaled_bam_index,
- ref_dir=ref_dir,
- fasta=fasta,
- docker=varscan_docker,
- disk_size=disk_size,
- cluster_config=cluster_16cpu_32gb
- }
-
- call bcftools.bcftools as VarScan_bcftools {
- input:
- vcf=VarScan.varscan_somatic,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=bcftools_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call ANNOVAR.ANNOVAR as VarScan_ANNOVAR {
- input:
- vcf=VarScan_bcftools.norm_vcf,
- annovar_database=annovar_database,
- docker=annovar_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call TNscope.TNscope as TNscope {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id,
- normal_recaled_bam=normal_BQSR.recaled_bam,
- normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
- tumor_recaled_bam=tumor_BQSR.recaled_bam,
- tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
- normal_name=sample_id + ".N",
- tumor_name=sample_id + ".T",
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- interval_padding=interval_padding,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- docker=sentieon_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
-
- call bcftools.bcftools as TNscope_bcftools {
- input:
- vcf=TNscope.TNscope_vcf,
- fasta=fasta,
- ref_dir=ref_dir,
- docker=bcftools_docker,
- cluster_config=cluster_2cpu_4gb,
- disk_size=disk_size
- }
-
- call ANNOVAR.ANNOVAR as TNscope_ANNOVAR {
- input:
- vcf=TNscope_bcftools.norm_vcf,
- annovar_database=annovar_database,
- docker=annovar_docker,
- cluster_config=cluster_16cpu_32gb,
- disk_size=disk_size
- }
- }
|