call_to_metadata: Insert called ident results into metadata

Description Usage Arguments Value Examples

View source: R/common_dplyr.R

Description

Insert called ident results into metadata

Usage

1
2
3
4
5
6
7
call_to_metadata(
  res,
  metadata,
  cluster_col,
  per_cell = FALSE,
  rename_prefix = NULL
)

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, can be cluster or cellid

per_cell

whether the res dataframe is listed per cell

rename_prefix

prefix to add to type and r column names

Value

new metadata with added columns

Examples

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

res2 <- cor_to_call(res, cluster_col = "classified")

call_to_metadata(
    res = res2,
    metadata = pbmc_meta,
    cluster_col = "classified",
    rename_prefix = "assigned"
)

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