| Title: | Statistical Analysis of Induced Mutagenesis Experiments in Crop Plants |
|---|---|
| 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>. |
| Authors: | Praveen Kumar B. K. [aut, cre] |
| Maintainer: | Praveen Kumar B. K. <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-10-05 08:23:15 UTC |
| Source: | https://github.com/bkpraveenars-del/bkmutate |
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.
Praveen Kumar B. K. [email protected]
bm_dose, bm_effect, bm_spectrum,
bm_m2, bm_compare, bm_plot.
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.
bm_compare(effect, dose_fit = NULL, reference = NULL, conf = 0.95)bm_compare(effect, dose_fit = NULL, reference = NULL, conf = 0.95)
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). |
An object of class bm_compare with pooled frequencies, pairwise ratios and relative biological effectiveness.
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)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)
Convenience loader for the demonstration datasets shipped with the package.
bm_data(name = c("dose", "m2", "spectrum", "counts"))bm_data(name = c("dose", "m2", "spectrum", "counts"))
name |
One of |
A data frame.
head(bm_data("dose"))head(bm_data("dose"))
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.
bm_dose(data, dose, n_total = NULL, n_affected = NULL, response = NULL, mutagen = NULL, link = c("probit", "logit", "cloglog"), conf = 0.95)bm_dose(data, dose, n_total = NULL, n_affected = NULL, response = NULL, mutagen = NULL, link = c("probit", "logit", "cloglog"), conf = 0.95)
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). |
An object of class bm_dose containing the estimates, fitted curve and observed points.
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
d <- bm_data("dose") res <- bm_dose(d, dose = "dose", n_total = "n_treated", n_affected = "n_survived", mutagen = "mutagen") res bm_plot(res)d <- bm_data("dose") res <- bm_dose(d, dose = "dose", n_total = "n_treated", n_affected = "n_survived", mutagen = "mutagen") res bm_plot(res)
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.
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)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)
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. |
An object of class bm_effect containing point estimates and interval estimates for mutation frequency, effectiveness and efficiency.
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
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")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")
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.
bm_m2(data, counts, mutagen, dose = NULL, plants = NULL, family = c("auto", "poisson", "quasipoisson"), scale_dose = TRUE, disp_threshold = 1.5)bm_m2(data, counts, mutagen, dose = NULL, plants = NULL, family = c("auto", "poisson", "quasipoisson"), scale_dose = TRUE, disp_threshold = 1.5)
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). |
An object of class bm_m2 with the coefficient table, dispersion statistic and fitted model.
cts <- bm_data("counts") res <- bm_m2(cts, counts = "mutants", mutagen = "mutagen", dose = "dose", plants = "plants") res bm_plot(res)cts <- bm_data("counts") res <- bm_m2(cts, counts = "mutants", mutagen = "mutagen", dose = "dose", plants = "plants") res bm_plot(res)
Palettes designed for mutagenesis figures, including a chlorophyll palette echoing the mutant classes themselves.
bm_palette(name = c("mutagen", "chloro", "dose", "damage", "contrast"), n = NULL, reverse = FALSE)bm_palette(name = c("mutagen", "chloro", "dose", "damage", "contrast"), n = NULL, reverse = FALSE)
name |
Palette name. |
n |
Number of colours to return. |
reverse |
Logical; reverse the palette. |
A character vector of hex colours.
bm_palette("chloro") bm_palette("dose", 8)bm_palette("chloro") bm_palette("dose", 8)
Generic entry point returning the publication-ready figure for whichever analysis produced x.
bm_plot(x, ...)bm_plot(x, ...)
x |
A BKMutate result object. |
... |
Passed to the specific method, for example |
A ggplot2 object.
bm_plot(bm_dose(bm_data("dose"), "dose", "n_treated", "n_survived", mutagen = "mutagen"))bm_plot(bm_dose(bm_data("dose"), "dose", "n_treated", "n_survived", mutagen = "mutagen"))
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.
bm_spectrum(data, mutagen, classes, dose = NULL)bm_spectrum(data, mutagen, classes, dose = NULL)
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. |
An object of class bm_spectrum with counts, relative frequencies, diversity indices and a homogeneity test.
s <- bm_data("spectrum") res <- bm_spectrum(s, mutagen = "mutagen", classes = c("albina","xantha","chlorina","viridis"), dose = "dose") res bm_plot(res)s <- bm_data("spectrum") res <- bm_spectrum(s, mutagen = "mutagen", classes = c("albina","xantha","chlorina","viridis"), dose = "dose") res bm_plot(res)
Discrete colour and fill scales built on the BKMutate palettes.
scale_colour_bm(pal_name = "mutagen", reverse = FALSE, ...) scale_color_bm(pal_name = "mutagen", reverse = FALSE, ...) scale_fill_bm(pal_name = "mutagen", reverse = FALSE, ...)scale_colour_bm(pal_name = "mutagen", reverse = FALSE, ...) scale_color_bm(pal_name = "mutagen", reverse = FALSE, ...) scale_fill_bm(pal_name = "mutagen", reverse = FALSE, ...)
pal_name |
Palette name (see |
reverse |
Logical; reverse the palette. |
... |
Passed to |
A ggplot2 scale.
library(ggplot2) ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + geom_point() + scale_colour_bm("contrast")library(ggplot2) ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) + geom_point() + scale_colour_bm("contrast")
The BKMutate figure theme.
theme_bm(base_size = 12, base_family = "", grid = TRUE)theme_bm(base_size = 12, base_family = "", grid = TRUE)
base_size |
Base font size in points. |
base_family |
Font family. |
grid |
Logical; draw light major grid lines. |
A ggplot2 theme object.
library(ggplot2) ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_bm()library(ggplot2) ggplot(mtcars, aes(wt, mpg)) + geom_point() + theme_bm()