| Type: | Package |
| Title: | Statistical Analysis of Induced Mutagenesis Experiments in Crop Plants |
| Version: | 0.1.0 |
| Description: | A colour-first toolkit for the statistical analysis of induced mutagenesis experiments in crop plants. It fits dose-response models to physical and chemical mutagen data and estimates the median lethal and growth-reduction doses (LD50, GR50) with confidence intervals obtained from Fieller's theorem; quantifies first-generation biological damage (lethality, injury and pollen sterility); and estimates mutagenic effectiveness and mutagenic efficiency. Effectiveness and efficiency are conventionally reported as point estimates only; this package treats them as functions of binomial proportions and supplies interval estimates by the delta method on the logarithmic scale and by the nonparametric bootstrap. It further provides chlorophyll mutation spectrum analysis with tests of homogeneity and diversity, generalised linear models for second-generation mutant counts with formal assessment of overdispersion, and formal comparison of mutagens including relative biological effectiveness. Every analysis returns a tidy result object and a publication-ready 'ggplot2' figure. Methods follow Konzak et al. (1965, ISBN:9789201150653), Fieller (1954) <doi:10.1111/j.2517-6161.1954.tb00159.x> and Katz et al. (1978) <doi:10.2307/2530610>. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| Depends: | R (≥ 4.0.0) |
| Imports: | stats, utils, grDevices, ggplot2 |
| Suggests: | ggrepel, patchwork, knitr, rmarkdown, testthat (≥ 3.0.0) |
| RoxygenNote: | 7.3.1 |
| Config/testthat/edition: | 3 |
| URL: | https://github.com/bkpraveenars-del/BKMutate |
| BugReports: | https://github.com/bkpraveenars-del/BKMutate/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-08-03 11:43:45 UTC; ASUS |
| Author: | Praveen Kumar B. K. [aut, cre] |
| Maintainer: | Praveen Kumar B. K. <bkpraveenars@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-08 12:10:07 UTC |
BKMutate: Statistical Analysis of Induced Mutagenesis Experiments
Description
A colour-first toolkit for analysing induced mutagenesis experiments in crop plants: dose-response and LD50/GR50 with Fieller intervals, mutagenic effectiveness and efficiency with confidence intervals, chlorophyll mutation spectrum analysis, generalised linear models for M2 counts, and formal comparison of mutagens.
Author(s)
Praveen Kumar B. K. bkpraveenars@gmail.com
See Also
bm_dose, bm_effect, bm_spectrum,
bm_m2, bm_compare, bm_plot.
Formal comparison of mutagens
Description
Compares mutagens using interval estimates: pooled mutation frequency with Wilson intervals, pairwise ratios of mutation frequency with Katz intervals and chi-square tests, and relative biological effectiveness computed from LD50 values.
Usage
bm_compare(effect, dose_fit = NULL, reference = NULL, conf = 0.95)
Arguments
effect |
An object returned by |
dose_fit |
An object returned by |
reference |
Character; the reference mutagen. Defaults to the first alphabetically. |
conf |
Confidence level (default 0.95). |
Value
An object of class bm_compare with pooled frequencies, pairwise ratios and relative biological effectiveness.
Examples
m <- bm_data("m2")
ef <- bm_effect(m, "mutagen", "dose", "M2_plants", "M2_mutants",
lethality_n = "lethality_n", lethality_x = "lethality_x",
boot = 0)
cmp <- bm_compare(ef)
cmp
bm_plot(cmp)
Load a bundled BKMutate example dataset
Description
Convenience loader for the demonstration datasets shipped with the package.
Usage
bm_data(name = c("dose", "m2", "spectrum", "counts"))
Arguments
name |
One of |
Value
A data frame.
Examples
head(bm_data("dose"))
Dose-response analysis: LD50 and GR50 with Fieller confidence intervals
Description
Fits a dose-response model and estimates the median lethal dose (LD50) or median growth-reduction dose (GR50). Because the median effective dose is a ratio of two correlated coefficients, its confidence interval is obtained from Fieller's theorem, which is correctly asymmetric; the symmetric delta-method interval is reported alongside.
Usage
bm_dose(data, dose, n_total = NULL, n_affected = NULL, response = NULL,
mutagen = NULL, link = c("probit", "logit", "cloglog"), conf = 0.95)
Arguments
data |
A data frame with one row per dose. |
dose |
Character; the dose column. |
n_total |
Character; number of individuals treated (quantal response). |
n_affected |
Character; number affected, e.g. dead or surviving (quantal response). |
response |
Character; a continuous response such as seedling height. |
mutagen |
Character or NULL; optional grouping column so a separate curve is fitted per mutagen. |
link |
Link for the quantal model: probit (default), logit or cloglog. |
conf |
Confidence level (default 0.95). |
Value
An object of class bm_dose containing the estimates, fitted curve and observed points.
References
Fieller EC (1954). Some problems in interval estimation. Journal of the Royal Statistical Society B 16, 175–185. doi:10.1111/j.2517-6161.1954.tb00159.x
See Also
Examples
d <- bm_data("dose")
res <- bm_dose(d, dose = "dose", n_total = "n_treated",
n_affected = "n_survived", mutagen = "mutagen")
res
bm_plot(res)
Mutagenic effectiveness and efficiency with confidence intervals
Description
Estimates mutagenic effectiveness (mutation frequency per unit dose) and mutagenic efficiency (mutation frequency per unit biological damage) with interval estimates. Effectiveness intervals rescale a Wilson score interval. Efficiency is a ratio of two binomial proportions, formally a relative risk, so intervals are obtained by the delta method on the log scale (Katz) and by the nonparametric bootstrap. Conventional practice reports these quantities as point estimates only.
Usage
bm_effect(data, mutagen, dose, m2_total, m2_mutants,
lethality_n = NULL, lethality_x = NULL,
sterility_n = NULL, sterility_x = NULL, injury = NULL,
conf = 0.95, boot = 2000, seed = 1L)
Arguments
data |
A data frame with one row per mutagen-dose combination. |
mutagen |
Character; the mutagen column. |
dose |
Character; the dose column. |
m2_total |
Character; number of M2 plants or families scored. |
m2_mutants |
Character; number of mutants observed. |
lethality_n, lethality_x |
Characters; denominator and count for M1 lethality. Optional. |
sterility_n, sterility_x |
Characters; denominator and count for pollen sterility. Optional. |
injury |
Character; percentage seedling injury. Optional. |
conf |
Confidence level (default 0.95). |
boot |
Bootstrap replicates for efficiency; 0 disables (default 2000). |
seed |
Random seed for the bootstrap. |
Value
An object of class bm_effect containing point estimates and interval estimates for mutation frequency, effectiveness and efficiency.
References
Konzak CF, Nilan RA, Wagner J, Foster RJ (1965). Efficient chemical mutagenesis.
Katz D, Baptista J, Azen SP, Pike MC (1978). Obtaining confidence intervals for the risk ratio in cohort studies. Biometrics 34, 469–474. doi:10.2307/2530610
See Also
Examples
m <- bm_data("m2")
res <- bm_effect(m, mutagen = "mutagen", dose = "dose",
m2_total = "M2_plants", m2_mutants = "M2_mutants",
lethality_n = "lethality_n", lethality_x = "lethality_x",
boot = 200)
res
bm_plot(res)
bm_plot(res, type = "efficiency")
Generalised linear models for M2 mutant counts
Description
Fits a Poisson log-linear model to per-family mutant counts, tests for overdispersion, and refits as quasi-Poisson when the counts are overdispersed. The number of plants scored enters as an offset so the model describes the mutation rate per plant.
Usage
bm_m2(data, counts, mutagen, dose = NULL, plants = NULL,
family = c("auto", "poisson", "quasipoisson"),
scale_dose = TRUE, disp_threshold = 1.5)
Arguments
data |
A data frame with one row per M2 family. |
counts |
Character; column of mutant counts. |
mutagen |
Character; the mutagen column. |
dose |
Character or NULL; dose column. |
plants |
Character or NULL; plants scored per family, used as an offset. |
family |
Model family: auto (default), poisson or quasipoisson. |
scale_dose |
Logical; rescale dose to [0, 1] within each mutagen so that a pooled dose coefficient is interpretable when mutagens use different units. |
disp_threshold |
Dispersion above which overdispersion is declared (default 1.5). |
Value
An object of class bm_m2 with the coefficient table, dispersion statistic and fitted model.
Examples
cts <- bm_data("counts")
res <- bm_m2(cts, counts = "mutants", mutagen = "mutagen",
dose = "dose", plants = "plants")
res
bm_plot(res)
BKMutate colour palettes
Description
Palettes designed for mutagenesis figures, including a chlorophyll palette echoing the mutant classes themselves.
Usage
bm_palette(name = c("mutagen", "chloro", "dose", "damage", "contrast"),
n = NULL, reverse = FALSE)
Arguments
name |
Palette name. |
n |
Number of colours to return. |
reverse |
Logical; reverse the palette. |
Value
A character vector of hex colours.
Examples
bm_palette("chloro")
bm_palette("dose", 8)
Draw the signature figure for a BKMutate result
Description
Generic entry point returning the publication-ready figure for whichever analysis produced x.
Usage
bm_plot(x, ...)
Arguments
x |
A BKMutate result object. |
... |
Passed to the specific method, for example |
Value
A ggplot2 object.
Examples
bm_plot(bm_dose(bm_data("dose"), "dose", "n_treated", "n_survived",
mutagen = "mutagen"))
Chlorophyll mutation spectrum analysis
Description
Summarises the spectrum of chlorophyll-deficient mutants, tests whether the spectrum differs between mutagens by a chi-square test of homogeneity, and quantifies spectrum breadth by the Shannon-Weaver diversity index and its evenness.
Usage
bm_spectrum(data, mutagen, classes, dose = NULL)
Arguments
data |
A data frame with one row per mutagen-dose combination. |
mutagen |
Character; the mutagen column. |
classes |
Character vector; the count columns for each mutant class. |
dose |
Character or NULL; optional dose column. |
Value
An object of class bm_spectrum with counts, relative frequencies, diversity indices and a homogeneity test.
Examples
s <- bm_data("spectrum")
res <- bm_spectrum(s, mutagen = "mutagen",
classes = c("albina","xantha","chlorina","viridis"),
dose = "dose")
res
bm_plot(res)
Discrete BKMutate colour and fill scales
Description
Discrete colour and fill scales built on the BKMutate palettes.
Usage
scale_colour_bm(pal_name = "mutagen", reverse = FALSE, ...)
scale_color_bm(pal_name = "mutagen", reverse = FALSE, ...)
scale_fill_bm(pal_name = "mutagen", reverse = FALSE, ...)
Arguments
pal_name |
Palette name (see |
reverse |
Logical; reverse the palette. |
... |
Passed to |
Value
A ggplot2 scale.
Examples
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) +
geom_point() + scale_colour_bm("contrast")
A clean ggplot2 theme for BKMutate figures
Description
The BKMutate figure theme.
Usage
theme_bm(base_size = 12, base_family = "", grid = TRUE)
Arguments
base_size |
Base font size in points. |
base_family |
Font family. |
grid |
Logical; draw light major grid lines. |
Value
A ggplot2 theme object.
Examples
library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_bm()