reportceldaCG: Generate an HTML report for celda_CG

reportceldaCGR Documentation

Generate an HTML report for celda_CG

Description

reportCeldaCGRun will run recursiveSplitModule and recursiveSplitCell to find the number of modules (L) and the number of cell populations (K). A final celda_CG model will be selected from recursiveSplitCell. After a celda_CG model has been fit, reportCeldaCGPlotResults can be used to create an HTML report for visualization and exploration of the celda_CG model results. Some of the plotting and feature selection functions require the installation of the Bioconductor package singleCellTK.

Usage

reportCeldaCGRun(
  sce,
  L,
  K,
  sampleLabel = NULL,
  altExpName = "featureSubset",
  useAssay = "counts",
  initialL = 10,
  maxL = 150,
  initialK = 5,
  maxK = 50,
  minCell = 3,
  minCount = 3,
  maxFeatures = 5000,
  output_file = "CeldaCG_RunReport",
  output_sce_prefix = "celda_cg",
  output_dir = ".",
  pdf = FALSE,
  showSession = TRUE
)

reportCeldaCGPlotResults(
  sce,
  reducedDimName,
  features = NULL,
  displayName = NULL,
  altExpName = "featureSubset",
  useAssay = "counts",
  cellAnnot = NULL,
  cellAnnotLabel = NULL,
  exactMatch = TRUE,
  moduleFilePrefix = "module_features",
  output_file = "CeldaCG_ResultReport",
  output_dir = ".",
  pdf = FALSE,
  showSetup = TRUE,
  showSession = TRUE
)

Arguments

sce

A SingleCellExperiment with the matrix located in the assay slot under useAssay. Rows represent features and columns represent cells.

L

Integer. Final number of feature modules. See celda_CG for more information.

K

Integer. Final number of cell populations. See celda_CG for more information.

sampleLabel

Vector or factor. Denotes the sample label for each cell (column) in the count matrix.

altExpName

The name for the altExp slot to use. Default "featureSubset".

useAssay

A string specifying which assay slot to use. Default "counts".

initialL

Integer. Minimum number of modules to try. See recursiveSplitModule for more information. Defailt 10.

maxL

Integer. Maximum number of modules to try. See recursiveSplitModule for more information. Default 150.

initialK

Integer. Initial number of cell populations to try.

maxK

Integer. Maximum number of cell populations to try.

minCell

Integer. Minimum number of cells required for feature selection. See selectFeatures for more information. Default 3.

minCount

Integer. Minimum number of counts required for feature selection. See selectFeatures for more information. Default 3.

maxFeatures

Integer. Maximum number of features to include. If the number of features after filtering for minCell and minCount are greater than maxFeature, then Seurat's VST function is used to select the top variable features. Default 5000.

output_file

Character. Prefix of the html file. Default "CeldaCG_ResultReport".

output_sce_prefix

Character. The sce object with celda_CG results will be saved to an .rds file starting with this prefix. Default celda_cg.

output_dir

Character. Path to save the html file. Default ..

pdf

Boolean. Whether to create PDF versions of each plot in addition to PNGs. Default FALSE.

showSession

Boolean. Whether to show the session information at the end. Default TRUE.

reducedDimName

Character. Name of the reduced dimensional object to be used in 2-D scatter plots throughout the report. Default celda_UMAP.

features

Character vector. Expression of these features will be displayed on a reduced dimensional plot defined by reducedDimName. If NULL, then no plotting of features on a reduced dimensinoal plot will be performed. Default NULL.

displayName

Character. The name to use for display in scatter plots and heatmaps. If NULL, then the rownames of the sce object will be used. This can also be set to the name of a column in the row data of sce or altExp(sce, altExpName). Default NULL.

cellAnnot

Character vector. The cell-level annotations to display on the reduced dimensional plot. These variables should be present in the column data of the sce object. Default NULL.

cellAnnotLabel

Character vector. Additional cell-level annotations to display on the reduced dimensional plot. Variables will be treated as categorial and labels for each group will be placed on the plot. These variables should be present in the column data of the sce object. Default NULL.

exactMatch

Boolean. Whether to only identify exact matches or to identify partial matches using grep. Default FALSE.

moduleFilePrefix

Character. The features in each module will be written to a a csv file starting with this name. If NULL, then no file will be written. Default "module_features".

showSetup

Boolean. Whether to show the setup code at the beginning. Default TRUE.

Value

.html file

Examples

data(sceCeldaCG)
## Not run: 
library(SingleCellExperiment)
sceCeldaCG$sum <- colSums(counts(sceCeldaCG))
rowData(sceCeldaCG)$rownames <- rownames(sceCeldaCG)
sceCeldaCG <- reportCeldaCGRun(sceCeldaCG,
    initialL = 5, maxL = 20, initialK = 5,
    maxK = 20, L = 10, K = 5)
reportCeldaCGPlotResults(sce = sceCeldaCG,
    reducedDimName = "celda_UMAP",
    features = c("Gene_1", "Gene_100"),
    displayName = "rownames",
    cellAnnot="sum")

## End(Not run)

campbio/celda documentation built on April 5, 2024, 11:47 a.m.