Description Usage Arguments Value See Also Examples
View source: R/make_plate_plot.R
plot outcomes of 96-, 384-, or 1536-well plate sequencing runs
1 | make_plate_plot(txis, column = "NumGenesExpressed", ...)
|
txis |
a SingleCellExperiment with either $well or $row and $column |
column |
which column to use for the data to plot? ($NumGenesExpressed) |
... |
additional arguments for platetools::raw_map |
1 | a ggplot object
|
platetools::raw_map
platetools::b_map
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # helper fn
revglue <- function(x) gsub(" ", "", paste(rev(x), collapse=""))
wells <- toupper(apply(expand.grid(1:24, letters[1:16]), 1, revglue))
# mock up an SCE
maxgenes <- 100
library(scDblFinder)
sce <- mockDoubletSCE(ncells=c(184, 150, 50), ngenes=maxgenes)[, 1:384]
sce$NumGenesExpressed <- colSums(counts(sce) > 0)
sce$well <- wells
# plot it with $well
make_plate_plot(sce)
# plot it using colnames
colnames(sce) <- sce$well
sce$well <- NULL # drop
# ensure case is ignored for now
changecase <- sample(seq_len(ncol(sce)), round(ncol(sce)/2))
colnames(sce)[changecase] <- toupper(colnames(sce)[changecase])
colnames(sce)[-changecase] <- tolower(colnames(sce)[-changecase])
make_plate_plot(sce)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.