plot_plate | R Documentation |
Plot plate layouts
plot_plate(
.tbl,
plate = plate,
row = row,
column = column,
.color,
.alpha = NULL,
.pattern = NULL,
title = paste("Layout by", rlang::as_name(rlang::enquo(plate))),
add_excluded = FALSE,
rename_empty = FALSE
)
.tbl |
a |
plate |
optional dimension variable used for the plate ids |
row |
the dimension variable used for the row ids |
column |
the dimension variable used for the column ids |
.color |
the continuous or discrete variable to color by |
.alpha |
a continuous variable encoding transparency |
.pattern |
a discrete variable encoding tile pattern (needs ggpattern) |
title |
string for the plot title |
add_excluded |
flag to add excluded wells (in bc$exclude) to the plot. A BatchContainer must be provided for this. |
rename_empty |
whether NA entries in sample table should be renamed to 'empty'. |
the ggplot object
siebourj
nPlate <- 3
nColumn <- 4
nRow <- 6
treatments <- c("CTRL", "TRT1", "TRT2")
timepoints <- c(1, 2, 3)
bc <- BatchContainer$new(
dimensions = list(
plate = nPlate,
column = list(values = letters[1:nColumn]),
row = nRow
)
)
sample_sheet <- tibble::tibble(
sampleID = 1:(nPlate * nColumn * nRow),
Treatment = rep(treatments, each = floor(nPlate * nColumn * nRow) / length(treatments)),
Timepoint = rep(timepoints, floor(nPlate * nColumn * nRow) / length(treatments))
)
# assign samples from the sample sheet
bc <- assign_random(bc, samples = sample_sheet)
plot_plate(bc$get_samples(),
plate = plate, column = column, row = row,
.color = Treatment, .alpha = Timepoint
)
plot_plate(bc$get_samples(),
plate = plate, column = column, row = row,
.color = Treatment, .pattern = Timepoint
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.