unifiedClusterLabelling: SMNN

Description Usage Arguments Value Author(s) Examples

View source: R/unifiedClusterLabelling.R

Description

This function unifiedClusterLabelling is used to match the clusters/cell types across multiple scRNA-seq batches. It takes as input raw expression matrices from two or more batches, a list of marker genes and their corresponding cluster labels. It outputs cluster corresponding labels for the cells in each batch.

Usage

1
unifiedClusterLabelling(..., features.use, cluster.labels, datatype="count", ident_list=NULL, cluster.use=NULL, cluster.names=NULL, min.exp.thresh=0, min.perc=0.6, min.average.expr=0)

Arguments

...

Two or more expression matrices where each row corresponds to a gene and each column corresponds to a single cell. All matriecs should contain the same number of rows (i.e., all batches should have the exact same gene set and in the same order).

features.use

is a vector of marker genes used to match clusters across batches.

cluster.labels

specifies the corresponding cluster label for each marker gene.

datatype

defines the type of data, which can be "count", "CPM", "RPKM" and "FPKM". Default is "count".

ident_list

is a list specifying cluster identities of the cells from each batch.

cluster.use

defines the clusters used for matching.

cluster.names

specifies the labels of clusters.

min.exp.thresh

sets the minimum expression value for each marker genes in each cell. Default is 0.

min.perc

sets the minimum percentage of cells whose expression level of marker gene >=min.exp.thresh during cluster definition. Default is 0.6.

min.average.expr

sets the minimum average expression value of each marker gene during cluster definition. Default is 0.

Value

unifiedClusterLabelling returns a list of unified cluster labels for the cells in each batch.

Author(s)

Yuchen Yang <yyuchen@email.unc.edu>, Gang Li <franklee@live.unc.edu>,, Huijun Qian <hjqian@live.unc.edu>, Yun Li <yunli@med.unc.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load the example data data_SMNN
data("data_SMNN")

# Provide the marker genes for cluster matching
markers <- c("Col1a1", "Pdgfra", "Ptprc", "Pecam1")

# Specify the cluster labels for each marker gene
cluster.info <- c(1, 1, 2, 3)

# Call function unifiedClusterLabelling to identify the corresponding clusters between two batches
matched_clusters <- unifiedClusterLabelling(data_SMNN$batch1.mat, data_SMNN$batch2.mat, features.use = markers, cluster.labels = cluster.info, min.perc = 0.3)

yycunc/SMNN documentation built on Dec. 29, 2021, 12:17 p.m.