ewce_plot {EWCE} | R Documentation |
ewce_plot
generates plots of EWCE enrichment results
ewce_plot(total_res, mtc_method = "bonferroni", ctd = NULL)
total_res |
results dataframe generated using
|
mtc_method |
method to be used for multiple testing correction.
Argument is passed to |
ctd |
Should be provided so that the dendrogram can be taken from it and added to plots |
A ggplot containing the plot
library(ewceData) # Load the single cell data ctd <- ctd() # Set the parameters for the analysis # Use 3 bootstrap lists for speed, for publishable analysis use >10000 reps <- 3 # Load the gene list and get human orthologs example_genelist <- example_genelist() mouse_to_human_homologs <- mouse_to_human_homologs() m2h <- unique(mouse_to_human_homologs[, c("HGNC.symbol", "MGI.symbol")]) mouse.hits <- unique(m2h[m2h$HGNC.symbol %in% example_genelist, "MGI.symbol"]) mouse.bg <- unique(c(m2h$MGI.symbol[1:100],mouse.hits)) # Bootstrap significance test, no control for transcript length or GC content full_results <- bootstrap_enrichment_test( sct_data = ctd, hits = mouse.hits, bg = mouse.bg, reps = reps, annotLevel = 2, sctSpecies = "mouse", genelistSpecies = "mouse" ) # Generate the plot print(ewce_plot(full_results$results, mtc_method = "BH"))