From 98d489a90eb949e1277355965d9cf64e217eb7c4 Mon Sep 17 00:00:00 2001 From: Julian Stanley Date: Sat, 18 Jun 2022 11:30:30 -0400 Subject: [PATCH] Add a parameter to name kink image in thresh_peaks --- rendseq/make_peaks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rendseq/make_peaks.py b/rendseq/make_peaks.py index c568338..8683f5a 100644 --- a/rendseq/make_peaks.py +++ b/rendseq/make_peaks.py @@ -190,7 +190,7 @@ def _calc_thresh(z_scores, method, kink_img="./kink.png"): return thresh -def thresh_peaks(z_scores, thresh=None, method="kink"): +def thresh_peaks(z_scores, thresh=None, method="kink", kink_image="./kink.png"): """Find peaks by calling z-scores above a threshold as a peak. Parameters @@ -202,7 +202,7 @@ def thresh_peaks(z_scores, thresh=None, method="kink"): if none is provided. Default method is "kink" """ if thresh is None: - thresh = _calc_thresh(z_scores, method) + thresh = _calc_thresh(z_scores, method, kink_image) peaks = np.zeros([len(z_scores), 2]) peaks[:, 0] = z_scores[:, 0] peaks[:, 1] = (z_scores[:, 1] > thresh).astype(int)