test_target_celltypes: Test target cell types

View source: R/test_target_celltypes.R

test_target_celltypesR Documentation

Test target cell types

Description

Test the following hypotheses across gen_results enrichment results.

Usage

test_target_celltypes(
  results = load_example_results(),
  target_celltypes = get_target_celltypes(),
  celltype_col = "cl_id",
  tests = c("within_branches", "across_branches", "across_branches_per_celltype"),
  method = c("glm", "anova"),
  within_var = "hpo_id",
  ancestor_var = "ancestor_name",
  q_threshold = 0.05,
  cores = 1
)

Arguments

results

The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results

target_celltypes

A named list of HPO branches and matched CL ids.

celltype_col

Name of the cell type column in the results.

tests

The types of tests to conduct.

  • "within_branches" Are on-target cell types enriched for significant results?

  • "across_branches" Are on-target cell types enriched for significant results across branches?

  • "across_branches_per_celltype" Are on-target cell types enriched for significant results across branches per cell type?

method

Methods to run stats with.

within_var

Within-subject variable.

ancestor_var

The name of the results column containing the ancestor name.

q_threshold

The q value threshold to subset the results by.

cores

The number of cores to run in parallel (e.g. 8) int.

Examples

res <- test_target_celltypes(tests="within_branches")

neurogenomics/MultiEWCE documentation built on April 22, 2024, 6:22 a.m.