Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a parameter to name kink image in thresh_peaks #44

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rendseq/make_peaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down