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

Bug in the analyze_peaks function (not recognizing matching_epsilon = NULL) #30

Closed
vvvirgy opened this issue Feb 6, 2024 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@vvvirgy
Copy link

vvvirgy commented Feb 6, 2024

I am trying to run the example data analysis reported in the documentation. After having created the CNAqc object with all the samples downloaded as indicated, I run the function analyze_peaks, as follows (CNAqc_samples is just a list of CNAqc objects):

CNAqc_samples_peaks = lapply(CNAqc_samples, function(x) {
  CNAqc::analyze_peaks(x, 
                       purity_error = 0.05, 
                       matching_strategy = 'closest')
})

My R console enters in debug mode, reporting issue at the row 129 of the analyze_peaks function:

  if (!is.null(matching_epsilon)) {
    stop("matching_epsilon is deprecated - using purity_error = ",
         purity_error)
    matching_epsilon = purity_error
  }

Although matching_epsilon = NULL by default.

I can make the code move on and execute the analysis anyway until the next breakpoint (which occurs when the function will be run on the next sample), but I don't understand why matching_epsilon is recognised as not NULL even if it should be by default. I have also tried to explicity define it as NULL when calling the function, but the issue occurred anyway.

@vvvirgy vvvirgy changed the title Bug in the analyze_peaks function (not recognising matching_epsilon = NULL) Bug in the analyze_peaks function (not recognizing matching_epsilon = NULL) Feb 6, 2024
@vvvirgy vvvirgy added the bug Something isn't working label Feb 6, 2024
@caravagn
Copy link
Collaborator

You need a reprex example for me to reproduce it, otherwise it's hard. Ofc, if you fix it yourself happy to check your fix.

@caravagn
Copy link
Collaborator

Is this still a thing?

@vvvirgy
Copy link
Author

vvvirgy commented Apr 15, 2024

It seems that is not a problem anymore, probably it was fixed by other adjustments in the latest weeks

@vvvirgy vvvirgy closed this as completed Apr 15, 2024
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

2 participants