Bläddra i källkod

Improve indentation.

tags/v0.2.2
YJC 4 år sedan
förälder
incheckning
09187e0cce
4 ändrade filer med 206 tillägg och 206 borttagningar
  1. +26
    -26
      tasks/fastqc.wdl
  2. +33
    -33
      tasks/fastqscreen.wdl
  3. +22
    -22
      tasks/qualimap.wdl
  4. +125
    -125
      workflow.wdl

+ 26
- 26
tasks/fastqc.wdl Visa fil

@@ -1,30 +1,30 @@
task fastqc {
File read1
File read2
String docker
String read1name=sub(basename(read1),"\\.\\S+$", "")
String read2name=sub(basename(read2),"\\.\\S+$", "")
String cluster
String disk_size
File read1
File read2
String docker
String read1name=sub(basename(read1),"\\.\\S+$", "")
String read2name=sub(basename(read2),"\\.\\S+$", "")
String cluster
String disk_size

command <<<
set -o pipefail
set -e
nt=$(nproc)
fastqc -t $nt -o ./ ${read1}
fastqc -t $nt -o ./ ${read2}
>>>
command <<<
set -o pipefail
set -e
nt=$(nproc)
fastqc -t $nt -o ./ ${read1}
fastqc -t $nt -o ./ ${read2}
>>>

runtime {
docker:docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File read1_html="${read1name}_fastqc.html"
File read1_zip="${read1name}_fastqc.zip"
File read2_html="${read2name}_fastqc.html"
File read2_zip="${read1name}_fastqc.zip"
}
runtime {
docker:docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File read1_html="${read1name}_fastqc.html"
File read1_zip="${read1name}_fastqc.zip"
File read2_html="${read2name}_fastqc.html"
File read2_zip="${read1name}_fastqc.zip"
}
}

+ 33
- 33
tasks/fastqscreen.wdl Visa fil

@@ -1,37 +1,37 @@
task fastqscreen {
File read1
File read2
File screen_ref_dir
File fastq_screen_conf
String read1name=sub(basename(read1),"\\.\\S+$", "")
String read2name=sub(basename(read2),"\\.\\S+$", "")
String docker
String cluster
String disk_size
File read1
File read2
File screen_ref_dir
File fastq_screen_conf
String read1name=sub(basename(read1),"\\.\\S+$", "")
String read2name=sub(basename(read2),"\\.\\S+$", "")
String docker
String cluster
String disk_size

command <<<
set -o pipefail
set -e
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}
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}
>>>
command <<<
set -o pipefail
set -e
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}
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}
>>>

runtime {
docker:docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
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"
}
runtime {
docker:docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
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"
}
}

+ 22
- 22
tasks/qualimap.wdl Visa fil

@@ -1,27 +1,27 @@
task qualimap {
File bam
File gtf
String bamname=basename(bam, ".sorted.bam")
String docker
String cluster
String disk_size
File bam
File gtf
String bamname=basename(bam, ".sorted.bam")
String docker
String cluster
String disk_size

command <<<
set -o pipefail
set -e
nt=$(nproc)
/opt/qualimap/qualimap bamqc -bam ${bam} -outformat HTML -nt $nt -outdir ${bamname}_bamqc --java-mem-size=32G
tar -zcf ${bamname}_bamqc_qualimap.tar.gz ${bamname}_bamqc
>>>
command <<<
set -o pipefail
set -e
nt=$(nproc)
/opt/qualimap/qualimap bamqc -bam ${bam} -outformat HTML -nt $nt -outdir ${bamname}_bamqc --java-mem-size=32G
tar -zcf ${bamname}_bamqc_qualimap.tar.gz ${bamname}_bamqc
>>>

runtime {
docker: docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
runtime {
docker: docker
cluster: cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}

output {
File bamqc_gz="${bamname}_bamqc_qualimap.tar.gz"
}
output {
File bamqc_gz="${bamname}_bamqc_qualimap.tar.gz"
}
}

+ 125
- 125
workflow.wdl Visa fil

@@ -9,136 +9,136 @@ 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
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 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
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 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 insert_size
Int insert_size

Boolean pre_alignment_qc
Boolean qualimap_qc
Boolean trim_adapter
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
}
}
Boolean pre_alignment_qc
Boolean qualimap_qc
Boolean trim_adapter
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
}
}

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,
trim_adapter=trim_adapter
}
call hisat2.hisat2 as hisat2 {
input:
sample_id=sample_id,
docker=hisat2_docker,
cluster=hisat2_cluster,
idx=idx,
idx_prefix=idx_prefix,
read_1P=fastp.trim_R1,
read_2P=fastp.trim_R2,
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
}
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,
trim_adapter=trim_adapter
}
call hisat2.hisat2 as hisat2 {
input:
sample_id=sample_id,
docker=hisat2_docker,
cluster=hisat2_cluster,
idx=idx,
idx_prefix=idx_prefix,
read_1P=fastp.trim_R1,
read_2P=fastp.trim_R2,
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
}
}
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 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
}
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
}
}

Laddar…
Avbryt
Spara