adamsardar / stoneTrees

Integrating 'omics data with biological networks by solving Steiner Tree problems
Mozilla Public License 2.0
3 stars 3 forks source link

CRAN or Bioconductor submission? #6

Open adamsardar opened 5 years ago

adamsardar commented 5 years ago

Being a computational biology package, Bioconductor would seem sensible. BUT, there is an emphasis on S4 methods, rather than R6.

An advantage of S4 is that the dispatchers are typed (so the input validators would not be necessary). Also, documentation of S4 is more natural with roxygen, which would make #4 easier.

A disadvantage is that the process is well suited to an object - there is explicit state. A previous incarnation of the package was in Julia (whose object system is a lot like S4) and that was a total mess.

adamsardar commented 5 years ago

Hadley's Advanced R book discusses the problem:

https://adv-r.hadley.nz/oo-tradeoffs.html#threading-state

Much like the pop example, we want to call a function and then save the updated state somewhere. A functional approach is to create a fresh state (and leave the original unchanged) - remember, Immutability . An object has the state intrinsically with methods.

adamsardar commented 5 years ago

Expanding on the previous Julia package: the reason that it felt like a mess was that the initialiser function created ALOT of state. Nothing felt easy.

More and more I am coming around to the thinking that this should go to CRAN