labelCellTypes: scClustViz helper fx: Add predicted cell type names to...

View source: R/helperFx.R

labelCellTypesR Documentation

scClustViz helper fx: Add predicted cell type names to cluster labels

Description

A bare-bones method of predicting cell types from marker genes.

Usage

labelCellTypes(sCV, cellMarkers, symbolMap = NULL)

Arguments

sCV

An object of class sCVdata.

cellMarkers

The cellMarkers argument from runShiny. A list of marker genes for expected cell types.

symbolMap

Default=NULL. The output of map2symbol. If the rownames (gene identifiers) of your input data object match the gene identifiers used in your cellMarkers list, you can leave this as NULL, since no gene identifier mapping needs to be performed.

Details

Assigns cell type labels to each cluster based on the rank of median gene expression of marker genes for each cell type. There are many more intelligent methods for cell type prediction out there. See CellAssign, for example.

Value

Returns the sCVdata object with an added attribute 'ClusterNames' to Clusters(sCV) containing the assigned cell type names for each cluster. Stores the cellMarkers list as an attribute in Clusters(sCV). Also adds four new variables to ClustGeneStats(sCV): Official gene symbols are added as variable genes. The remaining variables are used in plot_clusterGenes_markers to plot cell type marker genes in the Shiny app (see runShiny). Variables cMu and cMs are logical vectors indicating genes that are unique to and shared across cell type markers respectively. Variable overCut indicates which genes should be labelled in the plot.


BaderLab/scClustViz documentation built on Sept. 10, 2023, 11:51 p.m.