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

Error in Step 6. Aggregate recalibrated results: cleanElnoise() with new RMB #13

Open
sneumann opened this issue Nov 22, 2020 · 3 comments

Comments

@sneumann
Copy link
Member

Hi,
when using an up-to-date RMB we get the error:

msmsWorkflow: Step 6. Aggregate recalibrated results
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘cleanElnoise’ for signature ‘"RmbSpectraSet", "NULL", "numeric"’
Calls: runContributorToMassBankWorkflow ... lapply -> lapply -> lapply -> lapply -> FUN -> <Anonymous>

Yours,
Steffen

@sneumann
Copy link
Member Author

This is a duplicate of MassBank/RMassBank#239
Yours, Steffen

@sneumann
Copy link
Member Author

The stack trace is

9: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
       sQuote(fdef@generic), sQuote(cnames)), domain = NA)
8: (function (classes, fdef, mtable) 
   {
       methods <- .findInheritedMethods(classes, fdef, mtable)
       if (length(methods) == 1L) 
           return(methods[[1L]])
       else if (length(methods) == 0L) {
           cnames <- paste0("\"", vapply(classes, as.character, 
               ""), "\"", collapse = ", ")
           stop(gettextf("unable to find an inherited method for function %s for signature %s", 
               sQuote(fdef@generic), sQuote(cnames)), domain = NA)
       }
       else stop("Internal error in finding inherited methods; didn't return a unique method", 
           domain = NA)
   })(list("RmbSpectraSet", "NULL", "numeric"), new("standardGeneric", 
       .Data = function (peaks, noise = getOption("RMassBank")$electronicNoise, 
           width = getOption("RMassBank")$electronicNoiseWidth) 
       standardGeneric("cleanElnoise"), generic = "cleanElnoise", 
       package = "RMassBank", group = list(), valueClass = character(0), 
       signature = c("peaks", "noise", "width"), default = NULL, 
       skeleton = (function (peaks, noise = getOption("RMassBank")$electronicNoise, 
           width = getOption("RMassBank")$electronicNoiseWidth) 
       stop("invalid call in method dispatch to 'cleanElnoise' (no default method)", 
           domain = NA))(peaks, noise, width)), <environment>)
7: FUN(X[[i]], ...)
6: lapply(as.list(X), match.fun(FUN), ...)
5: lapply(as.list(X), match.fun(FUN), ...)
4: lapply(w@spectra, cleanElnoise, noise = settings$electronicNoise, 
       width = settings$electronicNoiseWidth)
3: lapply(w@spectra, cleanElnoise, noise = settings$electronicNoise, 
       width = settings$electronicNoiseWidth)
2: msmsWorkflow(w = msmsList, mode = ionMode, steps = c(2, 3, 6, 
       7, 8), archivename = runId, newRecalibration = FALSE)
1: runContributorToMassBankWorkflow(folder, applyIntensityThreshold, 
       reprocess = FALSE)

and this is coming from this line of code:

msmsList <- msmsWorkflow(w = msmsList, mode = ionMode, steps = c(2,3,6,7,8), archivename = runId, newRecalibration = FALSE)

Yours, Steffen

@sneumann
Copy link
Member Author

Hi,
Judging from the error message signature ‘"RmbSpectraSet", "NULL", "numeric"’
and that the error comes from:
https://github.com/MassBank/RMassBank/blob/f23bce80beb20d4a6dfc30d851e467175256c8c7/R/leMsMs.r#L262
I guess there is no noise defined in the (generated) file:
/tmp/msp2massbank/RMassBank/Part_1_1__1_files__2_cpds/Settings_1_1__1_files__2_cpds.ini
and indeed there I see:

...
electronicNoise: 
electronicNoiseWidth: 0.3
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant