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/Realigner.wdl" as Realigner import "./tasks/BQSR.wdl" as BQSR #import "./tasks/corealigner.wdl" as corealigner import "./tasks/PON.wdl" as PON import "./tasks/bcftools.wdl" as bcftools #import "./tasks/TNseq.wdl" as TNseq #import "./tasks/TNscope.wdl" as TNscope #import "./tasks/annovar.wdl" as annovar #import "./tasks/vcf2maf.wdl" as vcf2maf workflow {{ project_name }} { File inputSamplesFile Array[Array[File]] inputSamples = read_tsv(inputSamplesFile) #Array[String] sample String SENTIEON_INSTALL_DIR String SENTIEON_LICENSE String sentieon_docker String annovar_docker String vcf2maf_r_docker String bcftools_docker File ref_dir String fasta File dbmills_dir String db_mills File dbsnp_dir String dbsnp File regions File database String disk_size String cluster_config Boolean PONmode File? cosmic_dir String? cosmic_vcf Boolean set_annovar Boolean set_vcf2maf scatter (sample in inputSamples) { call mapping.mapping as tumor_mapping { input: group=sample[0] + "_tumor", sample=sample[0] + "_tumor", fastq_1=sample[1], fastq_2=sample[2], SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, pl="ILLUMINAL", fasta=fasta, ref_dir=ref_dir, docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Metrics.Metrics as tumor_Metrics { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, sorted_bam=tumor_mapping.sorted_bam, sorted_bam_index=tumor_mapping.sorted_bam_index, sample=sample[0] + "_tumor", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Dedup.Dedup as tumor_Dedup { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, sorted_bam=tumor_mapping.sorted_bam, sorted_bam_index=tumor_mapping.sorted_bam_index, sample=sample[0] + "_tumor", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, Dedup_bam=tumor_Dedup.Dedup_bam, Dedup_bam_index=tumor_Dedup.Dedup_bam_index, sample=sample[0] + "_tumor", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Realigner.Realigner as tumor_Realigner { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, Dedup_bam=tumor_Dedup.Dedup_bam, Dedup_bam_index=tumor_Dedup.Dedup_bam_index, db_mills=db_mills, dbmills_dir=dbmills_dir, sample=sample[0] + "_tumor", docker=sentieon_docker, disk_size=disk_size, regions=regions, cluster_config=cluster_config } call BQSR.BQSR as tumor_BQSR { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, realigned_bam1=tumor_Realigner.realigner_bam, realigned_bam_index1=tumor_Realigner.realigner_bam_index, db_mills=db_mills, dbmills_dir=dbmills_dir, dbsnp=dbsnp, dbsnp_dir=dbsnp_dir, sample=sample[0] + "_tumor", regions=regions, docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } } scatter (sample in inputSamples) { call mapping.mapping as normal_mapping { input: group=sample[0] + "_normal", sample=sample[0] + "_normal", fastq_1=sample[3], fastq_2=sample[4], SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, pl="ILLUMINAL", fasta=fasta, ref_dir=ref_dir, docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Metrics.Metrics as normal_Metrics { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, sorted_bam=normal_mapping.sorted_bam, sorted_bam_index=normal_mapping.sorted_bam_index, sample=sample[0] + "_normal", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Dedup.Dedup as normal_Dedup { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, sorted_bam=normal_mapping.sorted_bam, sorted_bam_index=normal_mapping.sorted_bam_index, sample=sample[0] + "_normal", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, Dedup_bam=normal_Dedup.Dedup_bam, Dedup_bam_index=normal_Dedup.Dedup_bam_index, sample=sample[0] + "_normal", docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } call Realigner.Realigner as normal_Realigner { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, Dedup_bam=normal_Dedup.Dedup_bam, Dedup_bam_index=normal_Dedup.Dedup_bam_index, db_mills=db_mills, dbmills_dir=dbmills_dir, sample=sample[0] + "_normal", docker=sentieon_docker, disk_size=disk_size, regions=regions, cluster_config=cluster_config } call BQSR.BQSR as normal_BQSR { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, fasta=fasta, ref_dir=ref_dir, realigned_bam1=normal_Realigner.realigner_bam, realigned_bam_index1=normal_Realigner.realigner_bam_index, db_mills=db_mills, dbmills_dir=dbmills_dir, dbsnp=dbsnp, dbsnp_dir=dbsnp_dir, sample=sample[0] + "_normal", regions=regions, docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } if (PONmode) { call PON.PON as PON { input: SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_LICENSE=SENTIEON_LICENSE, sample=sample[0], fasta=fasta, ref_dir=ref_dir, normal_recaled_bam=normal_BQSR.recaled_bam, normal_recaled_bam_index=normal_BQSR.recaled_bam_index, cosmic_vcf=cosmic_vcf, cosmic_dir=cosmic_dir, dbsnp=dbsnp, dbsnp_dir=dbsnp_dir, docker=sentieon_docker, disk_size=disk_size, cluster_config=cluster_config } } File pon_vcf=PON.pon_vcf } call bcftools.bcftools as bcftools { input: PONmode=PONmode, pon_vcf=pon_vcf, docker=bcftools_docker, disk_size=disk_size, cluster_config=cluster_config } }