@@ -0,0 +1,2 @@ | |||
*.log | |||
*.DS_Store |
@@ -0,0 +1,18 @@ | |||
## Arguments | |||
```text | |||
# User Defined | |||
read1: oss://pgx-storage-results/demo/Quartet-RNA-D5-3-test.clipped_R1.fastq.gz | |||
read2: oss://pgx-storage-results/demo/Quartet-RNA-D5-3-test.clipped_R2.fastq.gz | |||
baseout: Quartet-RNA-D5-3-test.clipped | |||
idx_prefix: genome | |||
genome_directory: oss://pgx-storage-results/yangjingcheng/reference/genome/ | |||
gtf: oss://pgx-storage-results/yangjingcheng/reference/genome/genes.gtf | |||
adapter: oss://pgx-storage-results/yangjingcheng/reference/illumina_adapter/TruSeq3-PE.fa | |||
# Default Value | |||
fastqc_docker: registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqc:v0.11.5 | |||
trimmomatic_docker: registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/trimmomatic:v0.3.8 | |||
tophat2_docker: registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/tophat2:2.0.14 | |||
cuffdiff2_docker: registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/cufflinks:v2.2.1 | |||
``` |
@@ -0,0 +1,6 @@ | |||
{ | |||
"fastqc_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqc:v0.11.5", | |||
"trimmomatic_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/trimmomatic:v0.3.8", | |||
"tophat2_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/tophat2:2.0.14", | |||
"cuffdiff2_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/cufflinks:v2.2.1" | |||
} |
@@ -0,0 +1,13 @@ | |||
{ | |||
"{{ project_name }}.read1": "{{ read1 }}", | |||
"{{ project_name }}.read2": "{{ read2 }}", | |||
"{{ project_name }}.adapter": "{{ adapter }}", | |||
"{{ project_name }}.gtf": "{{ gtf }}", | |||
"{{ project_name }}.genome_directory": "{{ genome_directory }}", | |||
"{{ project_name }}.idx_prefix": "{{ idx_prefix }}", | |||
"{{ project_name }}.baseout": "{{ baseout }}", | |||
"{{ project_name }}.fastqc.docker": "{{ fastqc_docker }}", | |||
"{{ project_name }}.trimmomatic.docker": "{{ trimmomatic_docker }}", | |||
"{{ project_name }}.tophat2.docker": "{{ tophat2_docker }}", | |||
"{{ project_name }}.cuffdiff2.docker": "{{ cuffdiff2_docker }}" | |||
} |
@@ -0,0 +1,25 @@ | |||
task cuffdiff2 { | |||
File bam | |||
File gtf | |||
File genome_directory | |||
String idx_prefix | |||
String baseout | |||
String docker | |||
command { | |||
cuffdiff ${gtf} -p 24 -o ${baseout} --no-diff -u -L ${baseout},${baseout}_rep -b ${genome_directory}/${idx_prefix}.fa ${bam} ${bam} | |||
} | |||
runtime { | |||
dockerTag: docker | |||
} | |||
output { | |||
File isoforms_count = "${baseout}/isoforms.count_tracking" | |||
File genes_count = "${baseout}/genes.count_tracking" | |||
File cds_count = "${baseout}/cds.count_tracking" | |||
File isoforms_fpkm = "${baseout}/isoforms.fpkm_tracking" | |||
File genes_fpkm = "${baseout}/genes.fpkm_tracking" | |||
File cds_fpkm = "${baseout}/cds.fpkm_tracking" | |||
} | |||
} |
@@ -0,0 +1,19 @@ | |||
task qc { | |||
File read | |||
String docker | |||
String out_dir = "./" | |||
command { | |||
fastqc -o ${out_dir} ${read} | |||
} | |||
runtime { | |||
dockerTag: docker | |||
} | |||
# 输入文件后缀必须为.fq.gz或者.fastq.gz | |||
output { | |||
File html = sub(basename(read), "\\.(fastq|fq)\\.gz$", "_fastqc.html") | |||
File zip = sub(basename(read), "\\.(fastq|fq)\\.gz$", "_fastqc.zip") | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
task tophat2 { | |||
File gtf | |||
File genome_directory | |||
String idx_prefix | |||
File read_1P | |||
File read_2P | |||
String baseout | |||
String docker | |||
command { | |||
tophat2 -p 24 -o ${baseout} -G ${gtf} --library-type fr-unstranded --solexa-quals ${genome_directory}/${idx_prefix} ${read_1P} ${read_2P} | |||
} | |||
runtime { | |||
dockerTag: docker | |||
} | |||
output { | |||
File accepted_hits = "${baseout}/accepted_hits.bam" | |||
File unmapped_bam = "${baseout}/unmapped.bam" | |||
} | |||
} |
@@ -0,0 +1,21 @@ | |||
task trimmomatic { | |||
File read1 | |||
File read2 | |||
File adapter | |||
String baseout | |||
String baseout_gz = baseout + ".fq.gz" | |||
String docker | |||
command { | |||
trimmomatic PE -threads 20 -phred33 ${read1} ${read2} -baseout ${baseout_gz} ILLUMINACLIP:${adapter}:2:30:10:1:true HEADCROP:10 LEADING:10 TRAILING:10 SLIDINGWINDOW:4:15 MINLEN:36 | |||
} | |||
runtime { | |||
dockerTag: docker | |||
} | |||
output { | |||
File read_1p = baseout + "_1P.fq.gz" | |||
File read_2p = baseout + "_2P.fq.gz" | |||
} | |||
} |
@@ -0,0 +1,48 @@ | |||
import "./tasks/fastqc.wdl" as fastqc | |||
import "./tasks/trimmomatic.wdl" as trimmomatic | |||
import "./tasks/tophat2.wdl" as tophat2 | |||
import "./tasks/cuffdiff2.wdl" as cuffdiff2 | |||
workflow {{ project_name }} { | |||
File read1 | |||
File read2 | |||
File adapter | |||
String baseout | |||
File gtf | |||
File genome_directory | |||
String idx_prefix | |||
scatter ( read in [read1, read2]) { | |||
call fastqc.qc as fastqc {input: read=read} | |||
} | |||
call trimmomatic.trimmomatic as trimmomatic { | |||
input: baseout=baseout, read1=read1, read2=read2, adapter=adapter | |||
} | |||
call tophat2.tophat2 as tophat2 { | |||
input: baseout=baseout, read_1P=trimmomatic.read_1p, read_2P=trimmomatic.read_2p, gtf=gtf, genome_directory=genome_directory, idx_prefix=idx_prefix | |||
} | |||
call cuffdiff2.cuffdiff2 as cuffdiff2 { | |||
input: gtf = gtf, bam = tophat2.accepted_hits, genome_directory=genome_directory, idx_prefix=idx_prefix, baseout=baseout | |||
} | |||
output { | |||
Array[File] fastqc_html = fastqc.html | |||
Array[File] fastqc_zip = fastqc.zip | |||
File fastq_1p = trimmomatic.read_1p | |||
File fastq_2p = trimmomatic.read_2p | |||
File bam = tophat2.accepted_hits | |||
File unmapped_bam = tophat2.unmapped_bam | |||
File isoforms_count = cuffdiff2.isoforms_count | |||
File genes_count = cuffdiff2.genes_count | |||
File cds_count = cuffdiff2.cds_count | |||
File isoforms_fpkm = cuffdiff2.isoforms_fpkm | |||
File genes_fpkm = cuffdiff2.genes_fpkm | |||
File cds_fpkm = cuffdiff2.cds_fpkm | |||
} | |||
} | |||