Skip to content

Commit 87b6e36

Browse files
committed
closed the data leak in get_read_alignment_intervals_in_cr and get_max_extents_of_read_alignments_on_cr
1 parent ef5476d commit 87b6e36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/svirlpool/localassembly/consensus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def get_read_alignment_intervals_in_region(
286286
regions_end: int,
287287
alignments: list[pysam.AlignedSegment],
288288
buffer_clipped_length: int,
289-
) -> dict[str, tuple[int, int, str, int, int]]:
289+
) -> dict[str, list[tuple[int, int, str, int, int]]]:
290290
"""Extract read alignment intervals within a specific region."""
291291
# check if all elements in alignments are of type pysam.AlignedSegment
292292
for aln in alignments:
@@ -363,7 +363,7 @@ def get_read_alignment_intervals_in_cr(
363363
for readname in intervals.keys():
364364
if readname not in dict_all_intervals:
365365
dict_all_intervals[readname] = []
366-
dict_all_intervals[readname].append(intervals[readname])
366+
dict_all_intervals[readname].extend(intervals[readname])
367367
return dict_all_intervals
368368

369369

0 commit comments

Comments
 (0)