Skip to content

Commit 93f56aa

Browse files
committed
Fix typing in referenceless stitcher
1 parent 2d0c4fa commit 93f56aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

micall/utils/referenceless_contig_stitcher.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class ContigWithAligner(Contig):
2525
@cached_property
2626
def aligner(self) -> Aligner:
27-
return Aligner(seq=str(self.seq), bw=500, bw_long=500, preset='map-ont')
27+
return Aligner(seq=self.seq, bw=500, bw_long=500, preset='map-ont')
2828

2929
@staticmethod
3030
def make(contig: Contig) -> 'ContigWithAligner':
@@ -149,25 +149,25 @@ def try_combine_contigs(finder: OverlapFinder,
149149
right_initial_overlap = right.seq[:abs(shift)]
150150

151151
if len(left_initial_overlap) < len(right_initial_overlap):
152-
left_overlap_alignments = left.map_overlap(str(right_initial_overlap))
152+
left_overlap_alignments = left.map_overlap(right_initial_overlap)
153153
left_cutoff = min((al.r_st for al in left_overlap_alignments), default=None)
154154
if left_cutoff is None:
155155
logger.debug("Overlap alignment between %s and %s failed.", a.unique_name, b.unique_name)
156156
return None
157157

158-
right_overlap_alignments = right.map_overlap(str(left_initial_overlap))
158+
right_overlap_alignments = right.map_overlap(left_initial_overlap)
159159
right_cutoff = max((al.r_en for al in right_overlap_alignments), default=None)
160160
if right_cutoff is None:
161161
logger.debug("Overlap alignment between %s and %s failed.", a.unique_name, b.unique_name)
162162
return None
163163
else:
164-
right_overlap_alignments = right.map_overlap(str(left_initial_overlap))
164+
right_overlap_alignments = right.map_overlap(left_initial_overlap)
165165
right_cutoff = max((al.r_en for al in right_overlap_alignments), default=None)
166166
if right_cutoff is None:
167167
logger.debug("Overlap alignment between %s and %s failed.", a.unique_name, b.unique_name)
168168
return None
169169

170-
left_overlap_alignments = left.map_overlap(str(right_initial_overlap))
170+
left_overlap_alignments = left.map_overlap(right_initial_overlap)
171171
left_cutoff = min((al.r_st for al in left_overlap_alignments), default=None)
172172
if left_cutoff is None:
173173
logger.debug("Overlap alignment between %s and %s failed.", a.unique_name, b.unique_name)
@@ -182,7 +182,7 @@ def try_combine_contigs(finder: OverlapFinder,
182182
a.unique_name, b.unique_name,
183183
len(left_overlap), len(right_overlap))
184184

185-
aligned_left, aligned_right = align_queries(str(left_overlap), str(right_overlap))
185+
aligned_left, aligned_right = align_queries(left_overlap, right_overlap)
186186

187187
number_of_matches = sum(1 for x, y
188188
in zip(aligned_left, aligned_right)

0 commit comments

Comments
 (0)