From 2b163927faa4ca37a1dc8294ffd1c18dd057b62e Mon Sep 17 00:00:00 2001 From: Kendell Clement Date: Tue, 13 Feb 2024 10:14:56 -0700 Subject: [PATCH] Fix #376 - CRISPRessoPooled chunking 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. --- CRISPResso2/CRISPRessoPooledCORE.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRISPResso2/CRISPRessoPooledCORE.py b/CRISPResso2/CRISPRessoPooledCORE.py index 41283558..738713ff 100644 --- a/CRISPResso2/CRISPRessoPooledCORE.py +++ b/CRISPResso2/CRISPRessoPooledCORE.py @@ -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)