ewce_plot: Plot EWCE results

View source: R/ewce_plot.r

ewce_plotR Documentation

Plot EWCE results

Description

ewce_plot generates plots of EWCE enrichment results

Usage

ewce_plot(
  total_res,
  mtc_method = "bonferroni",
  q_threshold = 0.05,
  ctd = NULL,
  annotLevel = 1,
  heights = c(0.3, 1),
  make_dendro = FALSE,
  verbose = TRUE
)

Arguments

total_res

Results data.frame generated using bootstrap_enrichment_test or ewce_expression_data functions. Multiple results tables can be merged into one results table, as long as the 'list' column is set to distinguish them. Multiple testing correction is then applied across all merged results.

mtc_method

Method to be used for multiple testing correction. Argument is passed to p.adjust (DEFAULT: "bonferroni).

q_threshold

Corrected significance threshold.

ctd

CellTypeDataset object. Should be provided so that the dendrogram can be taken from it and added to plots.

annotLevel

An integer indicating which level of ctd to analyse (Default: 1).

heights

The relative heights row in the grid. Will get repeated to match the dimensions of the grid. Passed to wrap_plots.

make_dendro

Add a dendrogram (requires ctd).

verbose

Print messages.

Value

A named list containing versions of the ggplot with and without the dendrogram. Note that cell type order on the x-axis is based on hierarchical clustering for both plots if make_dendro = TRUE.

Examples

## Bootstrap significance test,
##  no control for transcript length or GC content
## Use pre-computed results to speed up example
total_res <- EWCE::example_bootstrap_results()$results 
plt <- ewce_plot(total_res = total_res)

NathanSkene/EWCE documentation built on July 11, 2024, 4:19 a.m.