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

typo? #20

Closed
abcoxyzide opened this issue Sep 16, 2022 · 2 comments
Closed

typo? #20

abcoxyzide opened this issue Sep 16, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@abcoxyzide
Copy link

CNAqc/R/peak_detector.R

Lines 101 to 110 in 61fab68

# Handle special case where everything is discarded by including the one
# with highest value of counts_per_bin (just that).
if (all(xy_peaks$discarded)) {
xy_peaks = xy_peaks %>%
mutate(discarded = ifelse(
counts_per_bin == max(xy_peaks$counts_per_bin),
TRUE,
discarded
))
}

line 107 should be FALSE instead of TRUE, because you want to keep the max count bin?

@caravagn
Copy link
Collaborator

I think so, will check it asap.

@caravagn caravagn self-assigned this Sep 19, 2022
@caravagn caravagn added the bug Something isn't working label Sep 19, 2022
@Militeee
Copy link
Contributor

Militeee commented Jan 18, 2023

Yea had a look at it, probably a typo, this does not update discarded so all(xy_peaks$discarded) stays TRUE.
Fixed thanks for spotting.
Pretty degenerate case though, might think about returning an error (or a worning) anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants