MassBank / RMassBank

Playground for experiments on the official http://bioconductor.org/packages/devel/bioc/html/RMassBank.html
Other
12 stars 15 forks source link

Error in Step 8 when multiplicityFilter not set and previous steps skipped #277

Closed sneumann closed 3 years ago

sneumann commented 3 years ago

Could be related to #239 in the sense that this step is executed and some previous steps were skipped.

msmsWorkflow: Step 8. Peak multiplicity filtering skipped because multiplicityFilter parameter is not set.
Error in `$<-.data.frame`(`*tmp*`, "filterOK", value = logical(0)) : 
  replacement has 0 rows, data has 890
Calls: runContributorToMassBankWorkflow -> msmsWorkflow -> $<- -> $<-.data.frame

likely from: https://github.com/MassBank/RMassBank/blob/f23bce80beb20d4a6dfc30d851e467175256c8c7/R/leMsMs.r#L299 Yours, Steffen

schymane commented 3 years ago

Why is multiplicityFilter not set? It is set by default in the settings file ...

sneumann commented 3 years ago

True, 1) our setting.ini didn't have that, and 2) it was not supplanted by default values in the

1: In loadRmbSettings(file_or_list = fileSettings_parts[[partIdx]]) :
  Your settings are outdated. Missing will be replaced by default values.
2: In updateSettings(o) :
  Your settings are outdated! The following fields were taken from default values: include_sp_tags

Nevertheless the above line 299 relies on w@aggregated$reanalyzed.formulaCount being set (in our case it is NULL), and should fail gracefully / with a decent error message. Or I figure out what the correct result should be for aggregated$filterOK in the absence of reanalyzed.formulaCount, would you or @meowcat have a suggestion here ? Yours, Steffen

schymane commented 3 years ago

I would say you need to rerun with a default multiplicityFilter setting ... neither case (1) nor (2) should happen really... and case (2) needs to be fixed - then the rest would/should fix itself...

sneumann commented 3 years ago

Yes, I found the place in the custom script where the multiplicityFilter was explicitly NULLed. So while the issue here still exists, it is unlikely to surface. Yours, Steffen