cor_to_call_topn: get top calls for each cluster

View source: R/utils.R

cor_to_call_topnR Documentation

get top calls for each cluster

Description

get top calls for each cluster

Usage

cor_to_call_topn(
  cor_mat,
  metadata = NULL,
  col = "cluster",
  collapse_to_cluster = FALSE,
  threshold = 0,
  topn = 2
)

Arguments

cor_mat

input similarity matrix

metadata

input metadata with tsne or umap coordinates and cluster ids

col

metadata column, can be cluster or cellid

collapse_to_cluster

if a column name is provided, takes the most frequent call of entire cluster to color in plot

threshold

minimum correlation coefficent cutoff for calling clusters

topn

number of calls for each cluster

Value

dataframe of cluster, new potential ident, and r info

Examples

res <- clustify(
    input = pbmc_matrix_small,
    metadata = pbmc_meta,
    ref_mat = cbmc_ref,
    query_genes = pbmc_vargenes,
    cluster_col = "classified"
)

cor_to_call_topn(
    cor_mat = res,
    metadata = pbmc_meta,
    col = "classified",
    collapse_to_cluster = FALSE,
    threshold = 0.5
)

NCBI-Hackathons/clustifyR documentation built on Aug. 31, 2024, 5:35 a.m.