cosg: Accurate and fast cell marker gene identification with COSG

View source: R/cosg.R

cosgR Documentation

Accurate and fast cell marker gene identification with COSG

Description

Marker gene identification for cell groups in a given dataset.

Usage

cosg(
  object,
  groups = "all",
  assay = "RNA",
  slot = "data",
  mu = 1,
  remove_lowly_expressed=TRUE,
  expressed_pct=0.1,
  n_genes_user = 100
)

Arguments

assay

Assay to use in marker gene identification

slot

Slot to pull data from

mu

The penalty factor to penalize gene expression in cells not belonging to the cluster of interest

remove_lowly_expressed

If TRUE, genes that express a percentage of target cells smaller than a specific value (expressed_pct) are not considered as marker genes for the target cells. The default value is TRUE.

expressed_pct

When remove_lowly_expressed is set to TRUE, genes that express a percentage of target cells smaller than a specific value (expressed_pct) are not considered as marker genes for the target cells.

n_genes_user

Number of top ranked genes returned in the result

Value

A list containing two dataframes for ranked marker genes' names and scores, respectively

Examples

suppressMessages(library(Seurat))
data('pbmc_small',package='Seurat')
# Check cell groups:
table(Idents(pbmc_small))
#######
# Run COSG:
marker_cosg <- cosg(
 pbmc_small,
 groups='all',
 assay='RNA',
 slot='data',
 mu=1,
 n_genes_user=100)
#######
# Check the marker genes:
 head(marker_cosg$names)
 head(marker_cosg$scores)

genecell/COSGR documentation built on Jan. 3, 2023, 10:57 a.m.