Skip to contents

Diagnostic plots for a ComBat-refQL fit

Arguments

object

A CombatRefQLFit object returned by combat_ref_ql().

type

Diagnostic plot to return. "overview" combines all four diagnostics; the other values return one ggplot2 plot.

...

Reserved for the generic; currently ignored.

Value

A patchwork overview or a regular ggplot2 plot for an individual diagnostic.

Details

  • "overview" combines all four diagnostics in a 2 × 2 layout.

  • "reference" shows reference-selection scores and the selected batch.

  • "confidence" shows per-correction confidence-score distributions.

  • "shrinkage" compares raw and moderated batch effects.

  • "outcomes" shows adjusted, unsupported, and failed gene proportions.

Examples

if (FALSE) { # \dontrun{
set.seed(1)
counts <- matrix(stats::rpois(60, 20), nrow = 10,
  dimnames = list(paste0("gene", 1:10), paste0("sample", 1:6)))
fit <- combat_ref_ql(counts, batch = rep(c("A", "B"), each = 3),
  verbose = FALSE)
ggplot2::autoplot(fit)
ggplot2::autoplot(fit, type = "confidence")
} # }