Skip to content

Commit

Permalink
fix awk call to add +1 to end position
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Mar 4, 2025
1 parent 48cea2e commit e9266e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion harpy/snakefiles/align_bwa.smk
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ rule alignment_coverage:
container:
None
shell:
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 - $2); print }}' | gzip > {output}"
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 + 1 - $2); print }}' | gzip > {output}"

rule report_config:
input:
Expand Down
2 changes: 1 addition & 1 deletion harpy/snakefiles/align_ema.smk
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ rule alignment_coverage:
container:
None
shell:
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 - $2); print }}' | gzip > {output}"
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 + 1 - $2); print }}' | gzip > {output}"

rule barcode_stats:
input:
Expand Down
2 changes: 1 addition & 1 deletion harpy/snakefiles/align_strobealign.smk
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ rule alignment_coverage:
container:
None
shell:
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 - $2); print }}' | gzip > {output}"
"samtools bedcov -c {input.bed} {input.bam} | awk '{{ $5 = $5 / ($3 + 1 - $2); print }}' | gzip > {output}"

rule report_config:
input:
Expand Down

0 comments on commit e9266e3

Please sign in to comment.