make_plate_plot: plot outcomes of 96-, 384-, or 1536-well plate sequencing...

Description Usage Arguments Value See Also Examples

View source: R/make_plate_plot.R

Description

plot outcomes of 96-, 384-, or 1536-well plate sequencing runs

Usage

1
make_plate_plot(txis, column = "NumGenesExpressed", ...)

Arguments

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

Value

1
   a ggplot object 

See Also

platetools::raw_map

platetools::b_map

Examples

 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)

trichelab/velocessor documentation built on Jan. 5, 2022, 6:27 p.m.