Skip to content

Commit 7e7c923

Browse files
committed
Fix peak end clipping logic in change_location_to_summit function
1 parent 24f0166 commit 7e7c923

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyBioinfo_modules/chipseq/find_and_filter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ def change_location_to_summit(
233233
peak_df.end = peak_df.abs_summit + to_right
234234
if seq_end_at:
235235
peak_df.end = min(peak_df.end, seq_end_at)
236+
else:
237+
peak_df.end = peak_df.end.clip(upper=peak_range_max)
236238
peak_df.start = peak_df.start.clip(lower=0)
237-
peak_df.end = peak_df.end.clip(upper=peak_range_max)
238239
return peak_df
239240

240241

0 commit comments

Comments
 (0)