Skip to content

Commit

Permalink
Update count.snake
Browse files Browse the repository at this point in the history
correct indexing in bam_filter rules
  • Loading branch information
agillen authored Oct 14, 2024
1 parent 0d9e268 commit 37af866
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rules/count.snake
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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=$?
Expand Down

0 comments on commit 37af866

Please sign in to comment.