Skip to content

Commit 95e9b2f

Browse files
committed
Contig stitcher: make sure to draw rc alignments correctly
1 parent f52f7c8 commit 95e9b2f

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

micall/core/plot_contigs.py

+6
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,12 @@ def get_arrows(parts: Iterable[GenotypedContig], labels: bool) -> Iterable[Arrow
939939
height = 20 if labels else 1
940940
elevation = 1 if labels else -20
941941
(a_r_st, a_r_ei, f_r_st, f_r_ei) = get_contig_coordinates(part)
942+
943+
if isinstance(part, AlignedContig) and part.strand == "reverse":
944+
tmp = a_r_st
945+
a_r_st = a_r_ei
946+
a_r_ei = tmp
947+
942948
yield Arrow(a_r_st + position_offset, a_r_ei + position_offset,
943949
elevation=elevation,
944950
h=height,

micall/tests/data/stitcher_plots/test_multiple_reverse_complement_matches.svg

+4-4
Loading

micall/tests/data/stitcher_plots/test_reverse_complement_match.svg

+4-4
Loading

micall/tests/data/stitcher_plots/test_reverse_complement_match_with_padding.svg

+4-4
Loading

0 commit comments

Comments
 (0)