Skip to content

Commit

Permalink
Contig stitcher: simplify overlap seq calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Nov 15, 2023
1 parent 6d44808 commit 713df5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion micall/core/contig_stitcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ def stitch_2_contigs(left, right):
# Cut in 4 parts.
left_remainder, left_overlap = left.cut_reference(right.alignment.r_st - 0.5)
right_overlap, right_remainder = right.cut_reference(left.alignment.r_ei + 0.5)
left_overlap = left_overlap.rstrip_query()
right_overlap = right_overlap.lstrip_query()

# Align overlapping parts, then recombine based on concordance.
aligned_left, aligned_right = align_queries(left_overlap.aligned_seq, right_overlap.aligned_seq)
aligned_left, aligned_right = align_queries(left_overlap.seq, right_overlap.seq)
concordance = calculate_concordance(aligned_left, aligned_right)
max_concordance_index = max(range(len(concordance)),
key=lambda i: concordance[i])
Expand Down

0 comments on commit 713df5d

Please sign in to comment.