@@ -1,2 +0,0 @@ | |||
oss://choppy-cromwell-result/test-choppy/iseq_150pe_rnaseq_20200221_wangshangzi/43061775-40e6-47e7-8f07-b961b44c596f/call-samtools/GCCACATA_S9_L001_R1_001.sorted.bam oss://choppy-cromwell-result/test-choppy/iseq_150pe_rnaseq_20200221_wangshangzi/43061775-40e6-47e7-8f07-b961b44c596f/call-samtools/GCCACATA_S9_L001_R1_001.sorted.bam.bai | |||
oss://choppy-cromwell-result/test-choppy/iseq_150pe_rnaseq_20200221_wangshangzi/49bd025e-5275-4fbd-9e67-b279b08ce8b5/call-samtools/F1_S6_L001_R1_001.sorted.bam oss://choppy-cromwell-result/test-choppy/iseq_150pe_rnaseq_20200221_wangshangzi/49bd025e-5275-4fbd-9e67-b279b08ce8b5/call-samtools/F1_S6_L001_R1_001.sorted.bam.bai |
@@ -1,7 +1,6 @@ | |||
task bedtools { | |||
Array[File] bam | |||
Array[File] bai | |||
Array[File] tmp_bam | |||
File bed_file | |||
String docker | |||
@@ -10,7 +9,7 @@ task bedtools { | |||
command <<< | |||
set -e -o pipefail | |||
cat ~{sep=" " bam}|bedtools multicov -bed ${bed_file} > revread_count.txt | |||
bedtools multicov ${tmp_bam} -bed ${bed_file} > revread_count.txt | |||
>>> | |||
@@ -0,0 +1,26 @@ | |||
task cp_bam { | |||
File bam | |||
File bai | |||
String bamname = basename(bam,".bam") | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
command <<< | |||
set -e -o pipefail | |||
cp ${bam} ${bamname}_tmp.bam | |||
>>> | |||
runtime { | |||
docker:docker | |||
cluster:cluster_config | |||
systemDisk:"cloud_ssd 40" | |||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { | |||
File tmp_bam = "${bamname}_tmp.bam" | |||
} | |||
} |
@@ -1,3 +1,4 @@ | |||
import "./tasks/cp_bam.wdl" as cp_bam | |||
import "./tasks/bedtools.wdl" as bedtools | |||
workflow {{ project_name }} { | |||
@@ -7,6 +8,12 @@ workflow {{ project_name }} { | |||
Array[Array[File]] input_samples = read_tsv(input_samples_file) | |||
scatter (sample in input_samples) { | |||
call cp_bam.cp_bam as cp_bam { | |||
input: | |||
bam=sample[0], | |||
bai=sample[1], | |||
} | |||
call bedtools.bedtools as bedtools { | |||
input: |