compare_lists: Calculate adjusted p-values for hypergeometric test of gene...

View source: R/compare_genelist.R

compare_listsR Documentation

Calculate adjusted p-values for hypergeometric test of gene lists or jaccard index

Description

Calculate adjusted p-values for hypergeometric test of gene lists or jaccard index

Usage

compare_lists(
  bin_mat,
  marker_mat,
  n = 30000,
  metric = "hyper",
  output_high = TRUE,
  details_out = FALSE
)

Arguments

bin_mat

binarized single-cell expression matrix, feed in by_cluster mat, if desired

marker_mat

matrix or dataframe of candidate genes for each cluster

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

details_out

whether to also output shared gene list from jaccard

Value

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

Examples

pbmc_mm <- matrixize_markers(pbmc_markers)

pbmc_avg <- average_clusters(
    pbmc_matrix_small,
    pbmc_meta,
    cluster_col = "classified"
)

pbmc_avgb <- binarize_expr(pbmc_avg)

compare_lists(
    pbmc_avgb,
    pbmc_mm,
    metric = "spearman"
)

rnabioco/clustifyR documentation built on April 24, 2024, 5:15 a.m.