@@ -0,0 +1,14 @@ | |||
{ | |||
"{{ project_name }}.idx_prefix": "genome_snp_tran", | |||
"{{ project_name }}.stringtie.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/stringtie:v1.3.4", | |||
"{{ project_name }}.samtools.cluster": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||
"{{ project_name }}.samtools.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1", | |||
"{{ project_name }}.idx": "oss://pgx-reference-data/reference/hisat2/grch38_snp_tran/", | |||
"{{ project_name }}.read2": "{{ read2 }}", | |||
"{{ project_name }}.read1": "{{ read1 }}", | |||
"{{ project_name }}.anno_gtf": "oss://pgx-reference-data/reference/annotation/Homo_sapiens.GRCh38.93.gtf", | |||
"{{ project_name }}.sample_id": "{{ sample_id }}", | |||
"{{ project_name }}.stringtie.cluster": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||
"{{ project_name }}.hisat2.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/hisat2:v2.1.0-2", | |||
"{{ project_name }}.hisat2.cluster": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc" | |||
} |
@@ -0,0 +1,28 @@ | |||
task hisat2 { | |||
File idx | |||
File read1 | |||
File read2 | |||
String idx_prefix | |||
String sample_id | |||
String docker | |||
String cluster | |||
command { | |||
nt=$(nproc) | |||
hisat2 -t -p $nt -x ${idx}/${idx_prefix} -1 ${read1} -2 ${read2} -S ${sample_id}.sam --novel-splicesite-outfile ${sample_id}.splicesite.tab --dta | |||
} | |||
runtime { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||
} | |||
output { | |||
File sam = "${sample_id}.sam" | |||
File splicesite = "${sample_id}.splicesite.tab" | |||
} | |||
} |
@@ -0,0 +1,29 @@ | |||
task samtools { | |||
File sam | |||
String sample_id | |||
String bam = sample_id + ".bam" | |||
String sorted_bam = sample_id + ".sorted.bam" | |||
String sorted_bam_index = sample_id + ".sorted.bam.bai" | |||
String docker | |||
String cluster | |||
command <<< | |||
set -o pipefail | |||
set -e | |||
nt=$(nproc) | |||
/opt/conda/bin/samtools view -bS ${sam} > ${bam} | |||
/opt/conda/bin/samtools sort -@ $nt ${bam} -o ${sorted_bam} | |||
>>> | |||
runtime { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 200 /cromwell_root/" | |||
} | |||
output { | |||
File out_bam = sorted_bam | |||
} | |||
} |
@@ -0,0 +1,23 @@ | |||
task stringtie { | |||
File bam | |||
File anno_gtf | |||
String docker | |||
String sample_id | |||
String cluster | |||
command <<< | |||
nt=$(nproc) | |||
/opt/conda/bin/stringtie -p $nt -G ${anno_gtf} -o ${sample_id}.gtf -l CUFF ${bam} | |||
>>> | |||
runtime { | |||
docker: docker | |||
cluster: cluster | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd 150 /cromwell_root/" | |||
} | |||
output { | |||
File gtf = "${sample_id}.gtf" | |||
} | |||
} |
@@ -0,0 +1,38 @@ | |||
import "./tasks/hisat2.wdl" as hisat2 | |||
import "./tasks/samtools.wdl" as samtools | |||
import "./tasks/stringtie.wdl" as stringtie | |||
workflow {{ project_name }} { | |||
File read1 | |||
File read2 | |||
File idx | |||
String idx_prefix | |||
File anno_gtf | |||
String sample_id | |||
call hisat2.hisat2 as hisat2 { | |||
input: | |||
idx=idx, | |||
idx_prefix=idx_prefix, | |||
read1=read1, | |||
read2=read2, | |||
sample_id=sample_id | |||
} | |||
call samtools.samtools as samtools { | |||
input: | |||
sample_id=sample_id, | |||
sam = hisat2.sam | |||
} | |||
call stringtie.stringtie as stringtie { | |||
input: | |||
anno_gtf = anno_gtf, | |||
bam = samtools.out_bam, | |||
sample_id=sample_id | |||
} | |||
} | |||