collapse_to_cluster: From per-cell calls, take highest freq call in each cluster

Description Usage Arguments Value Examples

View source: R/common_dplyr.R

Description

From per-cell calls, take highest freq call in each cluster

Usage

1
collapse_to_cluster(res, metadata, cluster_col, threshold = 0)

Arguments

res

dataframe of idents, such as output of cor_to_call

metadata

input metadata with tsne or umap coordinates and cluster ids

cluster_col

metadata column for cluster

threshold

minimum correlation coefficent cutoff for calling clusters

Value

new metadata with added columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
res <- clustify(
    input = pbmc_matrix_small,
    metadata = pbmc_meta,
    cluster_col = "classified",
    ref_mat = cbmc_ref,
    per_cell = TRUE
)

res2 <- cor_to_call(res)

collapse_to_cluster(
    res2,
    metadata = pbmc_meta,
    cluster_col = "classified",
    threshold = 0
)

clustifyr documentation built on Nov. 8, 2020, 5:32 p.m.