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

BinneR crashes when only one scan is selected #8

Open
elliotfontaine opened this issue Jun 11, 2024 · 2 comments
Open

BinneR crashes when only one scan is selected #8

elliotfontaine opened this issue Jun 11, 2024 · 2 comments
Assignees
Labels
type:bug Something isn't working
Milestone

Comments

@elliotfontaine
Copy link
Contributor

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

@elliotfontaine elliotfontaine added the type:bug Something isn't working label Jun 11, 2024
@elliotfontaine elliotfontaine self-assigned this Jun 11, 2024
@elliotfontaine elliotfontaine changed the title Fix BinneR crash when only one scan is selected by Fix BinneR crash when only one scan is selected Jun 11, 2024
@elliotfontaine
Copy link
Contributor Author

Different approaches:

  • Automatically rerun the mzml_to_features task with a lower threshold value, until at least n scans are selected.
  • Do it inside the binner_cli script.
  • Change the interface of binner_cli so that instead of a %max(TIC) thres (the one exposed by BinneR), the workflow user can give a target fraction of the total number of scans.

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
Copy link
Contributor Author

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

@elliotfontaine elliotfontaine added this to the 0.1.0 milestone Jun 11, 2024
@elliotfontaine elliotfontaine changed the title Fix BinneR crash when only one scan is selected BinneR crashes when only one scan is selected Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant