group_cl: Assign clusters to a group

View source: R/human_functions.R

group_clR Documentation

Assign clusters to a group

Description

This function assigns each cluster to a predefined set of classes (exc, inh, glia, donor, outlier) using test.genes (default GAD1, GAD2, SLC17A7, SLC17A6). Later iterations of the function will allow for user-defined classes and genes.

Usage

group_cl(
  anno,
  cluster,
  norm.dat,
  select.cells = colnames(norm.dat),
  neun.thresh = 0.5,
  neun.colname = "facs_population_plan",
  neun.val = "NeuN-pos",
  test.genes = c("GAD1", "GAD2", "SLC17A7", "SLC17A6"),
  expr.th = 3,
  prop.th = c(0.5, 0.5, 0.2, 0.2),
  outlier.cl = NULL,
  donor.cl = NULL
)

Arguments

anno

anno dataframe which must include column names listed in 'neun.colname' "cluster" is added from 'cluster' parameter below.

cluster

clusters labels for all cells along with sample_id as their names

norm.dat

expression dataframe with columns as cells and rows as gene names and cpm normalized

select.cells

column names of norm.dat

neun.thresh

fraction of cells expressing NeuN to be considered NeuN positive (default is 0.5)

neun.colname

column name in anno with the Neun information

neun.val

value corresponding to non-neuronal marker in neun.colname in anno

test.genes

genes used to define cell classes (default is GAD1, GAD2, SLC17A7, SLC17A6)

expr.th

expression threshold for detecting test genes

prop.th

proportion threshold of detected genes by cluster (default is 0.5, 0.5, 0.2, 0.2)

outlier.cl

vector of clusters previously defined as "outlier" (default is NULL)

donor.cl

vector of clusters previously defined as "donor" (default is NULL)

Value

gives the clusters names in each class (exc, inh, glia, donor, outlier) as a list


AllenInstitute/scrattch.hicat documentation built on Oct. 20, 2023, 6:55 a.m.