Skip to content

Commit 636b5b6

Browse files
committed
Fixes compile error for clang
1 parent cc6e617 commit 636b5b6

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

dysgu/call_component.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ cdef base_quals_aligned_clipped(AlignedSegment a):
7272
cdef float clipped_base_quals = 0
7373
cdef int left_clip = 0
7474
cdef int right_clip = 0
75-
clip_sizes(a, left_clip, right_clip)
75+
clip_sizes(a, &left_clip, &right_clip)
7676
clipped_bases = left_clip + right_clip
7777
cdef const unsigned char[:] quals = a.query_qualities
7878
cdef int i
@@ -121,7 +121,7 @@ cdef count_attributes2(reads1, reads2, spanning, float insert_ppf, generic_ins,
121121
er.n_unmapped_mates += 1
122122
left_clip = 0
123123
right_clip = 0
124-
clip_sizes_hard(a, left_clip, right_clip)
124+
clip_sizes_hard(a, &left_clip, &right_clip)
125125
if left_clip > 0 and right_clip > 0:
126126
er.double_clips += 1
127127
has_sa = a.has_tag("SA")
@@ -164,7 +164,7 @@ cdef count_attributes2(reads1, reads2, spanning, float insert_ppf, generic_ins,
164164

165165
left_clip = 0
166166
right_clip = 0
167-
clip_sizes(a, left_clip, right_clip)
167+
clip_sizes(a, &left_clip, &right_clip)
168168
if left_clip or right_clip:
169169
er.sc += 1
170170
if a.flag & 1: # paired read
@@ -180,7 +180,7 @@ cdef count_attributes2(reads1, reads2, spanning, float insert_ppf, generic_ins,
180180
er.NP += 1
181181
left_clip = 0
182182
right_clip = 0
183-
clip_sizes_hard(a, left_clip, right_clip)
183+
clip_sizes_hard(a, &left_clip, &right_clip)
184184
if left_clip > 0 and right_clip > 0:
185185
er.double_clips += 1
186186
if a.has_tag("SA"):
@@ -426,7 +426,7 @@ cdef make_generic_insertion_item(aln, int insert_size, int insert_std):
426426
v_item.svtype = "BND"
427427
left_clip = 0
428428
right_clip = 0
429-
clip_sizes(aln, left_clip, right_clip)
429+
clip_sizes(aln, &left_clip, &right_clip)
430430
clip_s = max(left_clip, right_clip)
431431
rand_insert_pos = 100 if not clip_s else clip_s
432432
v_item.inferred_sv_len = 0 if rand_insert_pos < 0 else rand_insert_pos

dysgu/graph.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ cdef class ClipScoper:
251251
unordered_set[int]& clustered_nodes):
252252
cdef int clip_left = 0
253253
cdef int clip_right = 0
254-
clip_sizes(r, clip_left, clip_right)
254+
clip_sizes(r, &clip_left, &clip_right)
255255
if chrom != self.current_chrom:
256256
self.scope_left.clear()
257257
self.scope_right.clear()
@@ -1336,7 +1336,7 @@ cpdef tuple construct_graph(genome_scanner, infile, int max_dist, int clustering
13361336
pos2 = -1
13371337
left_clip_size = 0
13381338
right_clip_size = 0
1339-
clip_sizes_hard(r, left_clip_size, right_clip_size) # soft and hard-clips
1339+
clip_sizes_hard(r, &left_clip_size, &right_clip_size) # soft and hard-clips
13401340
if r.flag & 8 and clipped: # paired by inference
13411341
# skip if both ends are clipped, usually means its a chunk of badly mapped sequence
13421342
# if not (left_clip_size and right_clip_size) and ((paired_end and good_quality_clip(r, 20)) or (not paired_end and) ):

dysgu/map_set_utils.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ cdef extern from "<map>" namespace "std" nogil:
294294

295295
cdef int cigar_exists(r)
296296

297-
cdef void clip_sizes(AlignedSegment r, int& left, int& right)
297+
cdef void clip_sizes(AlignedSegment r, int* left, int* right)
298298

299-
cdef void clip_sizes_hard(AlignedSegment r, int& left, int& right)
299+
cdef void clip_sizes_hard(AlignedSegment r, int* left, int* right)
300300

301301
cdef int cigar_clip(r, int clip_length)
302302

dysgu/map_set_utils.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ cdef int cigar_exists(r):
246246
return 0
247247

248248

249-
cdef void clip_sizes(AlignedSegment r, int& left, int& right):
249+
cdef void clip_sizes(AlignedSegment r, int* left, int* right):
250250
cdef uint32_t cigar_value
251251
cdef uint32_t cigar_l
252252
cdef uint32_t *cigar_p
@@ -258,11 +258,11 @@ cdef void clip_sizes(AlignedSegment r, int& left, int& right):
258258
cigar_value = cigar_p[0]
259259
opp = <int> cigar_value & 15
260260
if opp == 4:
261-
left = <int> cigar_value >> 4
261+
left[0] = <int> cigar_value >> 4
262262
cigar_value = cigar_p[cigar_l - 1]
263263
opp = <int> cigar_value & 15
264264
if opp == 4:
265-
right = <int> cigar_value >> 4
265+
right[0] = <int> cigar_value >> 4
266266

267267
# c = r.cigartuples
268268
# if not c:
@@ -278,7 +278,7 @@ cdef void clip_sizes(AlignedSegment r, int& left, int& right):
278278
# return left, right
279279

280280

281-
cdef void clip_sizes_hard(AlignedSegment r, int& left, int& right):
281+
cdef void clip_sizes_hard(AlignedSegment r, int* left, int* right):
282282
cdef uint32_t cigar_value
283283
cdef uint32_t cigar_l
284284
cdef uint32_t *cigar_p
@@ -291,11 +291,11 @@ cdef void clip_sizes_hard(AlignedSegment r, int& left, int& right):
291291
cigar_value = cigar_p[0]
292292
opp = <int> cigar_value & 15
293293
if opp == 4 or opp == 5:
294-
left = <int> cigar_value >> 4
294+
left[0] = <int> cigar_value >> 4
295295
cigar_value = cigar_p[cigar_l - 1]
296296
opp = <int> cigar_value & 15
297297
if opp == 4 or opp == 5:
298-
right = <int> cigar_value >> 4
298+
right[0] = <int> cigar_value >> 4
299299

300300
# c = r.cigartuples
301301
# if not c:

0 commit comments

Comments
 (0)