Skip to content

Commit

Permalink
Fix #376 - CRISPRessoPooled chunking
Browse files Browse the repository at this point in the history
When running CRISPressoPooled with > 10000000 reads aligned, if there are reads overlapping the chunk boundary, instead of increasing the end with 500 bases, it takes the last position of chromosome as end position. This fixes the bug.
  • Loading branch information
kclem authored Feb 13, 2024
1 parent 31c65df commit 2b16392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRISPResso2/CRISPRessoPooledCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ def rreplace(s, old, new):
n_reads_at_end = get_n_aligned_bam_region(bam_filename_genome, chr_str, curr_end-5, curr_end+5)
while n_reads_at_end > 0:
curr_end += 500 # look for another place with no reads
if curr_end >= curr_pos:
if curr_end >= chr_len:
curr_end = chr_len
break
n_reads_at_end = get_n_aligned_bam_region(bam_filename_genome, chr_str, curr_end-5, curr_end+5)
Expand Down

0 comments on commit 2b16392

Please sign in to comment.