assess_rank_bias: Find rank bias

View source: R/utils.R

assess_rank_biasR Documentation

Find rank bias

Description

Find rank bias

Usage

assess_rank_bias(
  avg_mat,
  ref_mat,
  query_genes = NULL,
  res,
  organism,
  plot_name = NULL,
  rds_name = NULL,
  expand_unassigned = FALSE
)

Arguments

avg_mat

average expression matrix

ref_mat

reference expression matrix

query_genes

original vector of genes used to clustify

res

dataframe of idents, such as output of cor_to_call

organism

for GO term analysis, organism name: human - 'hsapiens', mouse - 'mmusculus'

plot_name

name for saved pdf, if NULL then no file is written (default)

rds_name

name for saved rds of rank_diff, if NULL then no file is written (default)

expand_unassigned

test all ref clusters for unassigned results

Value

pdf of ggplot object

Examples

## Not run: 
avg <- average_clusters(
    pbmc_matrix_small,
    pbmc_meta$seurat_clusters
)
res <- clustify(
    input = pbmc_matrix_small,
    metadata = pbmc_meta,
    ref_mat = cbmc_ref,
    query_genes = pbmc_vargenes,
    cluster_col = "seurat_clusters"
)
top_call <- cor_to_call(
    res,
    metadata = pbmc_meta,
    cluster_col = "seurat_clusters",
    collapse_to_cluster = FALSE,
    threshold = 0.8
)
res_rank <- assess_rank_bias(
    avg,
    cbmc_ref,
    res = top_call
)

## End(Not run)

rnabioco/clustifyR documentation built on Aug. 30, 2024, 8:16 a.m.