barErrorPlot | R Documentation |
Generate bar error plots by cell type (CellType
) or by number of
different cell types (nCellTypes
) on test pseudo-bulk samples.
barErrorPlot( object, error = "MSE", by = "CellType", dispersion = "se", filter.sc = TRUE, title = NULL, angle = NULL, theme = NULL )
object |
|
error |
|
by |
Variable used to display errors. Available options are:
|
dispersion |
Standard error ( |
filter.sc |
Boolean indicating whether single-cell profiles are filtered
out and only correlation of results associated with bulk samples are
displayed ( |
title |
Title of the plot. |
angle |
Angle of ticks. |
theme |
ggplot2 theme. |
A ggplot object with the mean and dispersion of the errors
calculateEvalMetrics
corrExpPredPlot
distErrorPlot
blandAltmanLehPlot
## Not run: set.seed(123) sce <- SingleCellExperiment::SingleCellExperiment( assays = list( counts = matrix( rpois(30, lambda = 5), nrow = 15, ncol = 20, dimnames = list(paste0("Gene", seq(15)), paste0("RHC", seq(20))) ) ), colData = data.frame( Cell_ID = paste0("RHC", seq(20)), Cell_Type = sample(x = paste0("CellType", seq(6)), size = 20, replace = TRUE) ), rowData = data.frame( Gene_ID = paste0("Gene", seq(15)) ) ) DDLS <- loadSCProfiles( single.cell.data = sce, cell.ID.column = "Cell_ID", gene.ID.column = "Gene_ID" ) probMatrixValid <- data.frame( Cell_Type = paste0("CellType", seq(6)), from = c(1, 1, 1, 15, 15, 30), to = c(15, 15, 30, 50, 50, 70) ) DDLS <- generateBulkCellMatrix( object = DDLS, cell.ID.column = "Cell_ID", cell.type.column = "Cell_Type", prob.design = probMatrixValid, num.bulk.samples = 50, verbose = TRUE ) # training of DDLS model tensorflow::tf$compat$v1$disable_eager_execution() DDLS <- trainDigitalDLSorterModel( object = DDLS, on.the.fly = TRUE, batch.size = 15, num.epochs = 5 ) # evaluation using test data DDLS <- calculateEvalMetrics( object = DDLS ) # bar error plots barErrorPlot( object = DDLS, error = "MSE", by = "CellType" ) barErrorPlot( object = DDLS, error = "MAE", by = "nCellTypes" ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.