task ballgown { | task ballgown { | ||||
File gene_abundance | File gene_abundance | ||||
String base = basename(gene_abundance, ".gene.abundance.txt") | |||||
String base=basename(gene_abundance, ".gene.abundance.txt") | |||||
Array[File] ballgown | Array[File] ballgown | ||||
String docker | String docker | ||||
String cluster | String cluster | ||||
} | } | ||||
output { | output { | ||||
File mat_expression = "${base}.txt" | |||||
File mat_expression="${base}.txt" | |||||
} | } | ||||
} | } |
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | ||||
} | } | ||||
output { | output { | ||||
File read1_html = sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_fastqc.html") | |||||
File read1_zip = sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_fastqc.zip") | |||||
File read2_html = sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_fastqc.html") | |||||
File read2_zip = sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_fastqc.zip") | |||||
File read1_html=sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_fastqc.html") | |||||
File read1_zip=sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_fastqc.zip") | |||||
File read2_html=sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_fastqc.html") | |||||
File read2_zip=sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_fastqc.zip") | |||||
} | } | ||||
} | } |
set -o pipefail | set -o pipefail | ||||
set -e | set -e | ||||
nt=$(nproc) | nt=$(nproc) | ||||
# mkdir -p /cromwell_root/tmp | |||||
# cp -r ${screen_ref_dir} /cromwell_root/tmp/ | |||||
sed -i "s#/cromwell_root/fastq_screen_reference#${screen_ref_dir}#g" ${fastq_screen_conf} | |||||
mkdir -p /cromwell_root/tmp | |||||
cp -r ${screen_ref_dir} /cromwell_root/tmp/ | |||||
# sed -i "s#/cromwell_root/fastq_screen_reference#${screen_ref_dir}#g" ${fastq_screen_conf} | |||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read1} | fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read1} | ||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read2} | fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read2} | ||||
>>> | >>> | ||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | ||||
} | } | ||||
output { | output { | ||||
File png1 = "${read1name}_screen.png" | |||||
File txt1 = "${read1name}_screen.txt" | |||||
File html1 = "${read1name}_screen.html" | |||||
File png2 = "${read2name}_screen.png" | |||||
File txt2 = "${read2name}_screen.txt" | |||||
File html2 = "${read2name}_screen.html" | |||||
File png1="${read1name}_screen.png" | |||||
File txt1="${read1name}_screen.txt" | |||||
File html1="${read1name}_screen.html" | |||||
File png2="${read2name}_screen.png" | |||||
File txt2="${read2name}_screen.txt" | |||||
File html2="${read2name}_screen.html" | |||||
} | } | ||||
} | } |
} | } | ||||
output { | output { | ||||
File sam = base + ".sam" | |||||
File unmapread_1p = base + "_un.fq.1.gz" | |||||
File unmapread_2p = base + "_un.fq.2.gz" | |||||
File sam=base + ".sam" | |||||
File unmapread_1p=base + "_un.fq.1.gz" | |||||
File unmapread_2p=base + "_un.fq.2.gz" | |||||
} | } | ||||
} | } |
input: | input: | ||||
read1=read1, | read1=read1, | ||||
read2=read2, | read2=read2, | ||||
docker = fastqc_docker, | |||||
cluster = fastqc_cluster, | |||||
disk_size = disk_size | |||||
docker=fastqc_docker, | |||||
cluster=fastqc_cluster, | |||||
disk_size=disk_size | |||||
} | } | ||||
call fastqscreen.fastqscreen as fastqscreen { | call fastqscreen.fastqscreen as fastqscreen { | ||||
input: | 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 | |||||
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 | |||||
} | } | ||||
} | } | ||||
call hisat2.hisat2 as hisat2 { | call hisat2.hisat2 as hisat2 { | ||||
input: | input: | ||||
docker = hisat2_docker, | |||||
cluster = hisat2_cluster, | |||||
docker=hisat2_docker, | |||||
cluster=hisat2_cluster, | |||||
idx=idx, | idx=idx, | ||||
idx_prefix=idx_prefix, | idx_prefix=idx_prefix, | ||||
read_1P=read1, | read_1P=read1, | ||||
read_2P=read2, | read_2P=read2, | ||||
disk_size= disk_size | |||||
disk_size=disk_size | |||||
} | } | ||||
call samtools.samtools as samtools { | call samtools.samtools as samtools { | ||||
input: | input: | ||||
docker = samtools_docker, | |||||
cluster = samtools_cluster, | |||||
sam = hisat2.sam, | |||||
disk_size= disk_size | |||||
docker=samtools_docker, | |||||
cluster=samtools_cluster, | |||||
sam=hisat2.sam, | |||||
disk_size=disk_size | |||||
} | } | ||||
call qualimap.qualimap as qualimap { | call qualimap.qualimap as qualimap { | ||||
input: | input: | ||||
bam = samtools.out_bam, | |||||
bai = samtools.out_bam_index, | |||||
gtf = gtf, | |||||
docker = qualimap_docker, | |||||
cluster = qualimap_cluster, | |||||
disk_size = disk_size | |||||
bam=samtools.out_bam, | |||||
bai=samtools.out_bam_index, | |||||
gtf=gtf, | |||||
docker=qualimap_docker, | |||||
cluster=qualimap_cluster, | |||||
disk_size=disk_size | |||||
} | } | ||||
call stringtie.stringtie as stringtie { | call stringtie.stringtie as stringtie { | ||||
input: | input: | ||||
docker = stringtie_docker, | |||||
cluster = stringtie_cluster, | |||||
gtf = gtf, | |||||
bam = samtools.out_bam, | |||||
disk_size = disk_size | |||||
docker=stringtie_docker, | |||||
cluster=stringtie_cluster, | |||||
gtf=gtf, | |||||
bam=samtools.out_bam, | |||||
disk_size=disk_size | |||||
} | } | ||||
call ballgown.ballgown as ballgown { | call ballgown.ballgown as ballgown { | ||||
input: | input: | ||||
docker = ballgown_docker, | |||||
cluster = ballgown_cluster, | |||||
ballgown = stringtie.ballgown, | |||||
gene_abundance = stringtie.gene_abundance, | |||||
disk_size = disk_size | |||||
docker=ballgown_docker, | |||||
cluster=ballgown_cluster, | |||||
ballgown=stringtie.ballgown, | |||||
gene_abundance=stringtie.gene_abundance, | |||||
disk_size=disk_size | |||||
} | } | ||||
call count.count as count { | call count.count as count { | ||||
input: | input: | ||||
sample_id = sample_id, | |||||
docker = count_docker, | |||||
cluster = count_cluster, | |||||
ballgown = stringtie.ballgown, | |||||
disk_size = disk_size, | |||||
count_length = count_length | |||||
sample_id=sample_id, | |||||
docker=count_docker, | |||||
cluster=count_cluster, | |||||
ballgown=stringtie.ballgown, | |||||
disk_size=disk_size, | |||||
count_length=count_length | |||||
} | } | ||||
} | } |