"idx": "oss://pgx-reference-data/reference/hisat2/grch38_snp_tran/", | "idx": "oss://pgx-reference-data/reference/hisat2/grch38_snp_tran/", | ||||
"gtf": "oss://pgx-reference-data/reference/tophat2/annotation/gencode.v22.annotation.gtf", | "gtf": "oss://pgx-reference-data/reference/tophat2/annotation/gencode.v22.annotation.gtf", | ||||
"idx_prefix": "genome_snp_tran", | "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_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/hisat2:v2.1.0-2", | ||||
"hisat2_cluster": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | "hisat2_cluster": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | ||||
"samtools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1", | "samtools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1", | ||||
"stringtie_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/stringtie:v1.3.4", | "stringtie_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/stringtie:v1.3.4", | ||||
"stringtie_cluster": "OnDemand bcs.a2.large img-ubuntu-vpc", | "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_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" | |||||
} | } |
{ | { | ||||
"{{ project_name }}.read1": "{{ read1 }}", | "{{ project_name }}.read1": "{{ read1 }}", | ||||
"{{ project_name }}.read2": "{{ read2 }}", | "{{ 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 }}.idx": "{{ idx }}", | ||||
"{{ project_name }}.gtf": "{{ gtf }}", | "{{ project_name }}.gtf": "{{ gtf }}", | ||||
"{{ project_name }}.idx_prefix": "{{ idx_prefix }}", | "{{ 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_docker": "{{ hisat2_docker }}", | ||||
"{{ project_name }}.hisat2_cluster": "{{ hisat2_cluster }}", | "{{ project_name }}.hisat2_cluster": "{{ hisat2_cluster }}", | ||||
"{{ project_name }}.samtools_docker": "{{ samtools_docker }}", | "{{ project_name }}.samtools_docker": "{{ samtools_docker }}", |
Array[File] ballgown | Array[File] ballgown | ||||
String docker | String docker | ||||
String cluster | String cluster | ||||
String disk_size | |||||
command <<< | command <<< | ||||
mkdir -p /cromwell_root/tmp/${base} | mkdir -p /cromwell_root/tmp/${base} | ||||
docker: docker | docker: docker | ||||
cluster: cluster | cluster: cluster | ||||
systemDisk: "cloud_ssd 40" | systemDisk: "cloud_ssd 40" | ||||
dataDisk: "cloud_ssd 150 /cromwell_root/" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | } | ||||
output { | output { |
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") | |||||
} | |||||
} |
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" | |||||
} | |||||
} |
String base = sub(basename(read_1P),"\\.\\S+$", "") | String base = sub(basename(read_1P),"\\.\\S+$", "") | ||||
String docker | String docker | ||||
String cluster | String cluster | ||||
String disk_size | |||||
command { | 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 | hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read_1P} -2 ${read_2P} -S ${base}.sam --un-conc-gz ${base}_un.fq.gz | ||||
} | } | ||||
docker: docker | docker: docker | ||||
cluster: cluster | cluster: cluster | ||||
systemDisk: "cloud_ssd 40" | systemDisk: "cloud_ssd 40" | ||||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | } | ||||
output { | output { |
String viral_samstats = base + ".viral.samstats" | String viral_samstats = base + ".viral.samstats" | ||||
String docker | String docker | ||||
String cluster | String cluster | ||||
String disk_size | |||||
command <<< | command <<< | ||||
set -o pipefail | set -o pipefail | ||||
docker: docker | docker: docker | ||||
cluster: cluster | cluster: cluster | ||||
systemDisk: "cloud_ssd 40" | systemDisk: "cloud_ssd 40" | ||||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | } | ||||
output { | output { |
String docker | String docker | ||||
String base = basename(bam, ".sorted.bam") | String base = basename(bam, ".sorted.bam") | ||||
String cluster | String cluster | ||||
String disk_size | |||||
command <<< | command <<< | ||||
nt=$(nproc) | nt=$(nproc) | ||||
docker: docker | docker: docker | ||||
cluster: cluster | cluster: cluster | ||||
systemDisk: "cloud_ssd 40" | systemDisk: "cloud_ssd 40" | ||||
dataDisk: "cloud_ssd 150 /cromwell_root/" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | } | ||||
output { | output { |
import "./tasks/fastqc.wdl" as fastqc | |||||
import "./tasks/fastqscreen.wdl" as fastqscreen | |||||
import "./tasks/hisat2.wdl" as hisat2 | import "./tasks/hisat2.wdl" as hisat2 | ||||
import "./tasks/samtools.wdl" as samtools | import "./tasks/samtools.wdl" as samtools | ||||
import "./tasks/stringtie.wdl" as stringtie | import "./tasks/stringtie.wdl" as stringtie | ||||
File idx | File idx | ||||
String idx_prefix | String idx_prefix | ||||
File gtf | File gtf | ||||
String fastqc_docker | |||||
String fastqc_cluster | |||||
String fastqscreen_docker | |||||
String fastqscreen_cluster | |||||
String hisat2_docker | String hisat2_docker | ||||
String hisat2_cluster | String hisat2_cluster | ||||
String stringtie_docker | String stringtie_docker | ||||
String ballgown_cluster | 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 { | call hisat2.hisat2 as hisat2 { | ||||
input: | input: | ||||
docker = hisat2_docker, | docker = hisat2_docker, |