@@ -2,6 +2,12 @@ | |||
"idx": "oss://pgx-reference-data/reference/hisat2/grch38_snp_tran/", | |||
"gtf": "oss://pgx-reference-data/reference/tophat2/annotation/gencode.v22.annotation.gtf", | |||
"idx_prefix": "genome_snp_tran", | |||
"screen_ref_dir": "oss://pgx-reference-data/fastq_screen_reference/", | |||
"fastq_screen_conf": "oss://pgx-reference-data/fastq_screen_reference/fastq_screen.conf", | |||
"fastqscreen_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqscreen:0.12.0", | |||
"fastqscreen_cluster": "OnDemand bcs.b2.3xlarge img-ubuntu-vpc", | |||
"fastqc_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqc:v0.11.5", | |||
"fastqc_cluster": "OnDemand bcs.b2.3xlarge img-ubuntu-vpc", | |||
"hisat2_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/hisat2:v2.1.0-2", | |||
"hisat2_cluster": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | |||
"samtools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1", | |||
@@ -9,5 +15,5 @@ | |||
"stringtie_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/stringtie:v1.3.4", | |||
"stringtie_cluster": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||
"ballgown_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/pgx-ballgown:0.0.1", | |||
"ballgown_cluster": "OnDemand bcs.a2.large img-ubuntu-vpc" | |||
"ballgown_cluster": "OnDemand bcs.b2.large img-ubuntu-vpc" | |||
} |
@@ -1,9 +1,15 @@ | |||
{ | |||
"{{ project_name }}.read1": "{{ read1 }}", | |||
"{{ project_name }}.read2": "{{ read2 }}", | |||
"{{ project_name }}.screen_ref_dir": "{{ screen_ref_dir }}", | |||
"{{ project_name }}.fastq_screen_conf": "{{ fastq_screen_conf }}", | |||
"{{ project_name }}.idx": "{{ idx }}", | |||
"{{ project_name }}.gtf": "{{ gtf }}", | |||
"{{ project_name }}.idx_prefix": "{{ idx_prefix }}", | |||
"{{ project_name }}.fastqscreen_docker": "{{ fastqscreen_docker }}", | |||
"{{ project_name }}.fastqscreen_cluster": "{{ fastqscreen_cluster }}", | |||
"{{ project_name }}.fastqc_cluster": "{{ fastqc_cluster }}", | |||
"{{ project_name }}.fastqc_docker": "{{ fastqc_docker }}", | |||
"{{ project_name }}.hisat2_docker": "{{ hisat2_docker }}", | |||
"{{ project_name }}.hisat2_cluster": "{{ hisat2_cluster }}", | |||
"{{ project_name }}.samtools_docker": "{{ samtools_docker }}", |
@@ -4,6 +4,7 @@ task ballgown { | |||
Array[File] ballgown | |||
String docker | |||
String cluster | |||
String disk_size | |||
command <<< | |||
mkdir -p /cromwell_root/tmp/${base} | |||
@@ -15,7 +16,7 @@ task ballgown { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 150 /cromwell_root/" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { |
@@ -0,0 +1,28 @@ | |||
task fastqc { | |||
File read1 | |||
File read2 | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
command <<< | |||
set -o pipefail | |||
set -e | |||
nt=$(nproc) | |||
fastqc -t $nt -o ./ ${read1} | |||
fastqc -t $nt -o ./ ${read2} | |||
>>> | |||
runtime { | |||
docker:docker | |||
cluster: cluster_config | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
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") | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
task fastq_screen { | |||
File read1 | |||
File read2 | |||
File screen_ref_dir | |||
File fastq_screen_conf | |||
String read1name = basename(read1,".fastq.gz") | |||
String read2name = basename(read2,".fastq.gz") | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
command <<< | |||
set -o pipefail | |||
set -e | |||
nt=$(nproc) | |||
mkdir -p /cromwell_root/tmp | |||
cp -r ${screen_ref_dir} /cromwell_root/tmp/ | |||
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_config | |||
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" | |||
} | |||
} |
@@ -6,9 +6,11 @@ task hisat2 { | |||
String base = sub(basename(read_1P),"\\.\\S+$", "") | |||
String docker | |||
String cluster | |||
String disk_size | |||
command { | |||
nt=$(nproc) | |||
nt=$(nproc) | |||
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read_1P} -2 ${read_2P} -S ${base}.sam --un-conc-gz ${base}_un.fq.gz | |||
} | |||
@@ -16,7 +18,7 @@ task hisat2 { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { |
@@ -7,6 +7,7 @@ task samtools { | |||
String viral_samstats = base + ".viral.samstats" | |||
String docker | |||
String cluster | |||
String disk_size | |||
command <<< | |||
set -o pipefail | |||
@@ -21,7 +22,7 @@ task samtools { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { |
@@ -4,6 +4,7 @@ task stringtie { | |||
String docker | |||
String base = basename(bam, ".sorted.bam") | |||
String cluster | |||
String disk_size | |||
command <<< | |||
nt=$(nproc) | |||
@@ -15,7 +16,7 @@ task stringtie { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 150 /cromwell_root/" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { |
@@ -1,3 +1,5 @@ | |||
import "./tasks/fastqc.wdl" as fastqc | |||
import "./tasks/fastqscreen.wdl" as fastqscreen | |||
import "./tasks/hisat2.wdl" as hisat2 | |||
import "./tasks/samtools.wdl" as samtools | |||
import "./tasks/stringtie.wdl" as stringtie | |||
@@ -10,6 +12,10 @@ workflow {{ project_name }} { | |||
File idx | |||
String idx_prefix | |||
File gtf | |||
String fastqc_docker | |||
String fastqc_cluster | |||
String fastqscreen_docker | |||
String fastqscreen_cluster | |||
String hisat2_docker | |||
String hisat2_cluster | |||
String stringtie_docker | |||
@@ -20,6 +26,24 @@ workflow {{ project_name }} { | |||
String ballgown_cluster | |||
call fastqc.fastqc as fastqc { | |||
input: | |||
read1=read1, | |||
read2=read2, | |||
docker = fastqc_docker, | |||
cluster = fastqc_cluster | |||
} | |||
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 | |||
} | |||
call hisat2.hisat2 as hisat2 { | |||
input: | |||
docker = hisat2_docker, |