MetaboHUB-MetaToul-FluxoMet / RTMet

RTMet is a data workflow to process FIA-MS data coming from a bioreactor, find metabolites and fluxes, and send a feedback command to the system.
https://rtmet.readthedocs.io
GNU General Public License v3.0
2 stars 0 forks source link

BinneR crashes when only one scan is selected #8

Open elliotfontaine opened 5 months ago

elliotfontaine commented 5 months ago

When only one scan is selected by detectInfusionScans (which can happen if thres value is too high), BinneR will crash during binneRlyse.

elliotfontaine commented 5 months ago

Different approaches:

The last one make sense if you know for exemple that the sample is injected in the spectrometer in 30s, and the spectrometer run last for 5 minutes -> 10% of nb of scans.

elliotfontaine commented 5 months ago
binneR v2.6.4 Thu Apr 25 14:11:51 2024
________________________________________________________________________________
Scans: 18:18 
________________________________________________________________________________

Reading raw data
Gathering bins
Removing single scan events
Averaging intensities across scans
Calculating bin metrics
Error in `all_of()`:
! Can't subset columns that don't exist.
✖ Columns `idx`, `fileName`, `class`, `polarity`, and `bin` don't exist.
Backtrace:
     ▆
  1. ├─binneR::binneRlyse(file, info, parameters)
  2. │ └─x %>% spectralBinning(verbose = verbose)
  3. ├─binneR:::spectralBinning(., verbose = verbose)
  4. ├─binneR:::spectralBinning(., verbose = verbose)
  5. │ └─binneR:::calcBinMeasures(pks, cls)
  6. │   └─... %>% ...
  7. ├─dplyr::summarise(...)
  8. ├─dplyr::group_by_at(...)
  9. │ └─dplyr:::manip_at(...)
 10. │   └─dplyr:::tbl_at_syms(...)
 11. │     └─dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars, error_call = error_call)
 12. │       └─tidyselect::vars_select(tibble_vars, !!!vars)
 13. │         └─tidyselect:::eval_select_impl(...)
 14. │           ├─tidyselect:::with_subscript_errors(...)
 15. │           │ └─rlang::try_fetch(...)
 16. │           │   └─base::withCallingHandlers(...)
 17. │           └─tidyselect:::vars_select_eval(...)
 18. │             └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 19. │               └─tidyselect:::eval_c(expr, data_mask, context_mask)
 20. │                 └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 21. │                   └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
 22. │                     └─tidyselect:::eval_context(expr, context_mask, call = error_call)
 23. │                       ├─tidyselect:::with_chained_errors(...)
 24. │                       │ └─rlang::try_fetch(...)
 25. │                       │   ├─base::tryCatch(...)
 26. │                       │   │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 27. │                       │   │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 28. │                       │   │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 29. │                       │   └─base::withCallingHandlers(...)
 30. │                       └─rlang::eval_tidy(as_quosure(expr, env), context_mask)
 31. ├─tidyselect::all_of(c("idx", "fileName", cls, "polarity", "bin"))
 32. │ └─tidyselect:::as_indices_impl(x, vars = vars, strict = TRUE)
 33. │   └─tidyselect:::chr_as_locations(x, vars, call = call, arg = arg)
 34. │     └─vctrs::vec_as_location(...)
 35. └─vctrs (local) `<fn>`()
 36.   └─vctrs:::stop_subscript_oob(...)
 37.     └─vctrs:::stop_subscript(...)
 38.       └─rlang::abort(...)
Message d'avis :
Dans fun(libname, pkgname) :
  mzR has been built against a different Rcpp version (1.0.11)
than is installed on your system (1.0.12). This might lead to errors
when loading mzR. If you encounter such issues, please send a report,
including the output of sessionInfo() to the Bioc support forum at 
https://support.bioconductor.org/. For details see also
https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.
Exécution arrêtée
2024-04-25T14:11:53+02:00 CRITICAL - failed/ERR