import "./tasks/fastqc.wdl" as fastqc import "./tasks/fastqscreen.wdl" as fastqscreen import "./tasks/fastp.wdl" as fastp import "./tasks/qualimap.wdl" as qualimap import "./tasks/hisat2_fp.wdl" as hisat2_fp import "./tasks/hisat2.wdl" as hisat2 import "./tasks/samtools.wdl" as samtools import "./tasks/stringtie.wdl" as stringtie import "./tasks/ballgown.wdl" as ballgown import "./tasks/count.wdl" as count workflow {{ project_name }} { File read1 File read2 File idx File screen_ref_dir File fastq_screen_conf File gtf String disk_size String fastqc_docker String fastqc_cluster String fastqscreen_docker String fastqscreen_cluster String fastp_docker String fastp_cluster String adapter_sequence String adapter_sequence_r2 String umi_loc String hisat2_docker String hisat2_cluster String idx_prefix String stringtie_docker String stringtie_cluster String samtools_docker String samtools_cluster String qualimap_docker String qualimap_cluster String ballgown_docker String ballgown_cluster String count_docker String count_cluster String count_length String sample_id Int trim_front1 Int trim_tail1 Int max_len1 Int trim_front2 Int trim_tail2 Int max_len2 Int disable_adapter_trimming Int length_required Int umi_len Int UMI Int qualified_quality_phred Int length_required1 Int disable_quality_filtering Int insert_size Boolean pre_alignment_qc Boolean qualimap_qc Boolean fastp_run if (pre_alignment_qc) { call fastqc.fastqc as fastqc { input: read1=read1, read2=read2, docker=fastqc_docker, cluster=fastqc_cluster, disk_size=disk_size } call fastqscreen.fastqscreen as fastqscreen { input: read1=read1, read2=read2, docker=fastqscreen_docker, cluster=fastqscreen_cluster, screen_ref_dir=screen_ref_dir, fastq_screen_conf=fastq_screen_conf, disk_size=disk_size } } if (fastp_run){ call fastp.fastp as fastp { input: sample_id=sample_id, read1=read1, read2=read2, docker=fastp_docker, cluster=fastp_cluster, disk_size=disk_size, adapter_sequence=adapter_sequence, adapter_sequence_r2=adapter_sequence_r2, umi_loc=umi_loc, trim_front1=trim_front1, trim_tail1=trim_tail1, max_len1=max_len1, trim_front2=trim_front2, trim_tail2=trim_tail2, max_len2=max_len2, disable_adapter_trimming=disable_adapter_trimming, length_required=length_required, umi_len=umi_len, UMI=UMI, qualified_quality_phred=qualified_quality_phred, length_required1=length_required1, disable_quality_filtering=disable_quality_filtering } call hisat2_fp.hisat2_fp as hisat2_fp { input: sample_id=sample_id, idx=idx, idx_prefix=idx_prefix, read_1P=fastp.Trim_R1, read_2P=fastp.Trim_R2, docker=hisat2_docker, cluster=hisat2_cluster, disk_size=disk_size } } if (!fastp_run){ call hisat2.hisat2 as hisat2 { input: sample_id=sample_id, docker=hisat2_docker, cluster=hisat2_cluster, idx=idx, idx_prefix=idx_prefix, read_1P=read1, read_2P=read2, disk_size=disk_size } } call samtools.samtools as samtools { input: docker=samtools_docker, cluster=samtools_cluster, sam=hisat2.sam, insert_size=insert_size, disk_size=disk_size } if (qualimap_qc){ call qualimap.qualimap as qualimap { input: bam=samtools.out_sort_bam, gtf=gtf, docker=qualimap_docker, cluster=qualimap_cluster, disk_size=disk_size } } call stringtie.stringtie as stringtie { input: docker=stringtie_docker, cluster=stringtie_cluster, gtf=gtf, bam=samtools.out_sort_bam, disk_size=disk_size } call ballgown.ballgown as ballgown { input: docker=ballgown_docker, cluster=ballgown_cluster, ballgown=stringtie.ballgown, gene_abundance=stringtie.gene_abundance, disk_size=disk_size } call count.count as count { input: sample_id=sample_id, docker=count_docker, cluster=count_cluster, ballgown=stringtie.ballgown, disk_size=disk_size, count_length=count_length } }