You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BiocNeighbors and BiocSingular follow BiocParallel's paradigm of using *Param objects to specify the algorithm and parameters to use for NN searching and SVD, respectively.
I have recently added a BiocSingular::bsparam() function that returns a "default" Param object, in much the same way that BiocParallel::bpparam() works. The idea is that developers can specify bsparam() in their functions/scripts and it will use a global default value that can be changed by the user. This is more convenient than passing the new Param explicitly to each function.
Currently, I am using a global options() to handle this, but it would be nice to use the BiocParallel::register() interface (and its internal machinery) to manage the setting and getting of the global default. One could imagine making register() an S4 generic, or even better, adding a simple mechanism that allows my packages to save to a different slot of the existing registry.
The text was updated successfully, but these errors were encountered:
a simple mechanism that allows my packages to save to a different slot of the existing registry.
Wouldn't this effectively just be reimplementing options with maybe slightly different semantics? What would be the advantage register over options here?
BiocNeighbors and BiocSingular follow BiocParallel's paradigm of using
*Param
objects to specify the algorithm and parameters to use for NN searching and SVD, respectively.I have recently added a
BiocSingular::bsparam()
function that returns a "default" Param object, in much the same way thatBiocParallel::bpparam()
works. The idea is that developers can specifybsparam()
in their functions/scripts and it will use a global default value that can be changed by the user. This is more convenient than passing the new Param explicitly to each function.Currently, I am using a global
options()
to handle this, but it would be nice to use theBiocParallel::register()
interface (and its internal machinery) to manage the setting and getting of the global default. One could imagine makingregister()
an S4 generic, or even better, adding a simple mechanism that allows my packages to save to a different slot of the existing registry.The text was updated successfully, but these errors were encountered: