@@ -1,7 +1,9 @@ | |||
{ | |||
"{{ project_name }}.sample_id": "{{ sample_id }}", | |||
"{{ project_name }}.bam": "{{ bam }}", | |||
"{{ project_name }}.bam_idx": "{{ bam_idx }}", | |||
"{{ project_name }}.raw_bam": "{{ raw_bam }}", | |||
"{{ project_name }}.raw_bam_idx": "{{ raw_bam_idx }}", | |||
"{{ project_name }}.deduped_bam": "{{ deduped_bam }}", | |||
"{{ project_name }}.deduped_bam_idx": "{{ deduped_bam_idx }}", | |||
"{{ project_name }}.regions": "{{ regions }}", | |||
"{{ project_name }}.disk_size": "{{ disk_size }}", | |||
"{{ project_name }}.docker": "{{ docker }}", |
@@ -1,6 +1,8 @@ | |||
task depth { | |||
File bam | |||
File bam_idx | |||
File raw_bam | |||
File raw_bam_idx | |||
File deduped_bam | |||
File deduped_bam_idx | |||
String sample_id | |||
File regions | |||
String docker | |||
@@ -8,7 +10,11 @@ task depth { | |||
String disk_size | |||
command <<< | |||
/opt/conda/bin/samtools depth -b ${regions} ${bam} > ${sample_id}.depth | |||
/opt/conda/bin/samtools depth -b ${regions} ${raw_bam} > ${sample_id}.raw.depth | |||
/opt/conda/bin/samtools depth -b ${regions} ${dedup_bam} > ${sample_id}.deduped.depth | |||
awk '{printf "%s:%i\t%i\n" , $1,$2,$3}' ${sample_id}.raw.depth | sort > ${sample_id}.raw.sorted.depth | |||
awk '{printf "%s:%i\t%i\n" , $1,$2,$3}' ${sample_id}.deduped.depth | sort > ${sample_id}.deduped.sorted.depth | |||
join -e NULL -a1 -j 1 -o 1.1,1.2,2.2 ${sample_id}.raw.sorted.depth ${sample_id}.deduped.sorted.depth > ${sample_id}.depth | |||
>>> | |||
runtime { |
@@ -1,9 +1,10 @@ | |||
import "./tasks/depth.wdl" as depth | |||
workflow {{ project_name }} { | |||
File bam | |||
File bam_idx | |||
File raw_bam | |||
File raw_bam_idx | |||
File deduped_bam | |||
File deduped_bam_idx | |||
String sample_id | |||
File regions | |||
String docker | |||
@@ -12,8 +13,10 @@ workflow {{ project_name }} { | |||
call depth.depth as depth { | |||
input: | |||
bam=bam, | |||
bam_idx=bam_idx, | |||
raw_bam=raw_bam, | |||
raw_bam_idx=raw_bam_idx, | |||
deduped_bam=deduped_bam, | |||
deduped_bam_idx=deduped_bam_idx, | |||
sample_id=sample_id, | |||
regions=regions, | |||
docker=docker, |