diff --git a/AnnotateBed/integrated_annotation.wdl b/AnnotateBed/integrated_annotation.wdl index 13f105a..c0be9f1 100644 --- a/AnnotateBed/integrated_annotation.wdl +++ b/AnnotateBed/integrated_annotation.wdl @@ -153,10 +153,10 @@ task samtools_coverage { Int disk_size } command <<< - sed 's/^chr//' ~{bam_file} > rm_chr_tmp.bed - for region in `awk '{print $1":"$2"-"$3}' rm_chr_tmp.bed` + sed 's/^chr//' ~{bed_to_annotate} > rm_chr_tmp.bed + for region in `awk '{print $1":"$2"-"$3}' ${rm_chr_tmp.bed}` do - samtools coverage rm_chr_tmp.bed -r ${region} >> tmp + samtools coverage ~{bam_file} -r ${region} >> tmp done awk '/startpos/&&c++>0 {next} 1' tmp > ~{sample_id}.coverage.txt >>>