After you run bootstrap_enrichment_test, check what percentage of significantly enriched cell types match an expected cell type.

check_percent_hits(
  full_results,
  target_celltype,
  mtc_method = "bonferroni",
  q_threshold = 0.05,
  verbose = TRUE
)

Arguments

full_results

bootstrap_enrichment_test results.

target_celltype

Substring to search to matching cell types (case-insensitive).

mtc_method

Multiple-testing correction method.

q_threshold

Corrected significance threshold.

verbose

Print messages.

Value

Report list.

Examples

## Bootstrap significance test,
##  no control for transcript length or GC content
## Use pre-computed results to speed up example
full_results <- EWCE::example_bootstrap_results()
#> Loading precomputed example bootstrap results.

report <- EWCE::check_percent_hits(
    full_results = full_results,
    target_celltype = "microglia"
)
#> Aligning celltype names with standardise_ctd format.
#> 7 signficiant enrichment results @ bonferroni < 0.05
#> 14.3% of hits are of the target cell type.