From 37af866aa9b4b2ebee4a6ef6cc2a763646968197 Mon Sep 17 00:00:00 2001 From: Austin Gillen <4809242+agillen@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:08:20 -0600 Subject: [PATCH] Update count.snake correct indexing in bam_filter rules --- rules/count.snake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rules/count.snake b/rules/count.snake index d3e7ffa..02a5e58 100644 --- a/rules/count.snake +++ b/rules/count.snake @@ -150,8 +150,8 @@ rule filter_R1: if [[ {params.length} == 'False' ]]; then ln -s {input} {output} else - samtools index {input} samtools view -h {input} | grep -v 'CB:Z:-\|UB:Z:-' | samtools view -b - > {params.temp} + samtools index {params.temp} set +e python3 inst/scripts/filter_bam_correct.py -i {params.temp} -o {params.temp2} -l {params.length} -s -c 20 exitcode=$? @@ -184,7 +184,6 @@ rule filter_R2: mem_mb = 8000 shell: """ - samtools index {input} samtools view -h {input} | grep -v 'CB:Z:-\|UB:Z:-' | samtools view -b - > {params.temp} samtools index {params.temp} python3 inst/scripts/filter_bam.py -i {params.temp} -o {output} @@ -215,8 +214,8 @@ rule filter_paired: if [[ {params.length} == 'False' ]]; then ln -s {input} {output} else - samtools index {input} samtools view -h {input} | grep -v 'CB:Z:-\|UB:Z:-' | samtools view -b - > {params.temp} + samtools index {params.temp} set +e python3 inst/scripts/filter_bam_correct.py -i {params.temp} -o {params.temp2} -l {params.length} exitcode=$?