clustify_lists {clustifyr}R Documentation

Main function to compare scRNA-seq data to gene lists.

Description

Main function to compare scRNA-seq data to gene lists.

Usage

clustify_lists(input, ...)

## Default S3 method:
clustify_lists(
  input,
  marker,
  marker_inmatrix = TRUE,
  metadata = NULL,
  cluster_col = NULL,
  if_log = TRUE,
  per_cell = FALSE,
  topn = 800,
  cut = 0,
  genome_n = 30000,
  metric = "hyper",
  output_high = TRUE,
  lookuptable = NULL,
  obj_out = TRUE,
  seurat_out = TRUE,
  rename_prefix = NULL,
  threshold = 0,
  low_threshold_cell = 0,
  verbose = TRUE,
  ...
)

## S3 method for class 'Seurat'
clustify_lists(
  input,
  metadata = NULL,
  cluster_col = NULL,
  if_log = TRUE,
  per_cell = FALSE,
  topn = 800,
  cut = 0,
  marker,
  marker_inmatrix = TRUE,
  genome_n = 30000,
  metric = "hyper",
  output_high = TRUE,
  dr = "umap",
  seurat_out = TRUE,
  obj_out = TRUE,
  threshold = 0,
  rename_prefix = NULL,
  verbose = TRUE,
  ...
)

## S3 method for class 'SingleCellExperiment'
clustify_lists(
  input,
  metadata = NULL,
  cluster_col = NULL,
  if_log = TRUE,
  per_cell = FALSE,
  topn = 800,
  cut = 0,
  marker,
  marker_inmatrix = TRUE,
  genome_n = 30000,
  metric = "hyper",
  output_high = TRUE,
  dr = "umap",
  seurat_out = TRUE,
  obj_out = TRUE,
  threshold = 0,
  rename_prefix = NULL,
  verbose = TRUE,
  ...
)

Arguments

input

single-cell expression matrix or Seurat object

...

passed to matrixize_markers

marker

matrix or dataframe of candidate genes for each cluster

marker_inmatrix

whether markers genes are already in preprocessed matrix form

metadata

cell cluster assignments, supplied as a vector or data.frame. If data.frame is supplied then cluster_col needs to be set. Not required if running correlation per cell.

cluster_col

column in metadata with cluster number

if_log

input data is natural log, averaging will be done on unlogged data

per_cell

compare per cell or per cluster

topn

number of top expressing genes to keep from input matrix

cut

expression cut off from input matrix

genome_n

number of genes in the genome

metric

adjusted p-value for hypergeometric test, or jaccard index

output_high

if true (by default to fit with rest of package), -log10 transform p-value

lookuptable

if not supplied, will look in built-in table for object parsing

obj_out

whether to output object instead of cor matrix

seurat_out

output cor matrix or called seurat object (deprecated, use obj_out instead)

rename_prefix

prefix to add to type and r column names

threshold

identity calling minimum correlation score threshold, only used when obj_out = T

low_threshold_cell

option to remove clusters with too few cells

verbose

whether to report certain variables chosen and steps

dr

stored dimension reduction

Value

matrix of numeric values, clusters from input as row names, cell types from marker_mat as column names

Examples

# Annotate a matrix and metadata
clustify_lists(
    input = pbmc_matrix_small,
    marker = cbmc_m,
    metadata = pbmc_meta,
    cluster_col = "classified",
    verbose = TRUE
)

# Annotate using a different method
clustify_lists(
    input = pbmc_matrix_small,
    marker = cbmc_m,
    metadata = pbmc_meta,
    cluster_col = "classified",
    verbose = TRUE,
    metric = "jaccard"
)

[Package clustifyr version 1.4.0 Index]