2 Package implementation
The development of {biodosetools} started in 2018 in the frame of RENEB (Running the European Network of Biological and retrospective Physical dosimetry), one of whose purposes is to standardise methodology for individualised dose estimation from biological methods to statistical ones. Since no unique method exists for the different mathematical processes involved in biological dosimetry, several meetings and periodic correspondence were held in order to reach a consensus on the solutions to be implemented and, in particular, the solutions to be proposed as default.
As of version 3.6.1 (November 2022), {biodosetools} supports dose-effect fitting and dose estimation for the following biodosimetry assays:
- Dicentric assay.
- Translocation assay.
The {biodosetools} package is available from CRAN and can be installed using the standard R tools. In Table 2.1 we list all the functions available to the user through the R API provided by {biodosetools}.
Usage | Functions |
---|---|
Fitting |
fit() , plot_fit_dose_curve()
|
Estimation |
estimate_whole_body_merkle() , estimate_whole_body_delta() , estimate_partial_body_dolphin() , estimate_hetero_mixed_poisson() , plot_estimated_dose_curve()
|
Auxiliary |
calculate_aberr_table() , protracted_g_function() , calculate_genome_fraction() , calculate_trans_rate_manual() , calculate_trans_rate_sigurdson()
|
{shiny} app | run_app() |
2.1 Used packages
Naturally, {biodosetools} is built on other packages. Data transformations and wrangling are done through {dplyr} (Wickham et al. 2023), {tidyr} (Wickham, Vaughan, and Girlich 2023), {rlang} (Henry and Wickham 2022), and {magrittr} (Bache and Wickham 2022), while visualisations are done using {ggplot2} (Wickham 2016). All of the aforementioned packages are part of the {tidyverse} meta-package (Wickham et al. 2019).
While most statistical calculations are implemented ad-hoc with the {stats} (R Core Team 2022) package, we rely in additional packages for some statistical analyses, such as {maxLik} (Henningsen and Toomet 2011), {mixtools} (Benaglia et al. 2009), {MASS} (Venables and Ripley 2002), and {msm} (Jackson 2011).
For improved legibility, messages and warnings in the command line interface are constructed using {cli} (Csárdi 2023).
2.2 User interface using {shiny}
The Biodose Tools user interface is written in R {shiny} (Chang et al. 2022) using Bootstrap 3, via the {shinydashboard} (Chang and Borges Ribeiro 2021), {shinyWidgets} (Perrier, Meyer, and Granjon 2023), and {bsplus} (Lyttle 2022) packages, and the {golem} (Fay et al. 2022) framework. Analyses are implemented in the R programming language (R Core Team 2022), with the resultant tables and plots rendered in HTML through JavaScript libraries, via either native {shiny} or {rhandsontable} (Owen 2021). This is done by the JavaScript engine shipped on browser of choice, or by an instance of QtWebKit if the app is run within RStudio.
The {shiny} app allows to download processed count or case data via {xtable} (Dahl et al. 2019). Similarly, it allows to generate and download reports, which are rendered using {rmarkdown} (Allaire et al. 2023) and Pandoc (MacFarlane 2022) to convert a native .Rmd
document directly into a Office Open XML .docx
document, or a .pdf
file built from an intermediary .tex
file using (Lamport 1994).
In Biodose Tools colour is used to identify different sections of information, a technique called colour-coding. In particular, Biodose Tools uses four colours to code information: (a) blue for options and settings, (b) purple for data input, (c) green for results, and (d) orange for exporting results. Figure 2.1 shows a simple mock-up of how the four types of boxes and corresponding widgets would fit together in one of the {shiny} app’s modules.