Learn R Programming

EWCE (version 1.0.2)

ewce.plot: Plot EWCE results

Description

ewce.plot generates plots of EWCE enrichment results

Usage

ewce.plot(total_res, mtc_method = "bonferroni")

Arguments

total_res
results dataframe 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.
mtc_method
method to be used for multiple testing correction. Argument is passed to p.adjust. Valid options are "holm", "hochberg", "hommel", "bonferroni", "BH", "BY",

Value

A ggplot containing the plot

Examples

Run this code
# Load the single cell data
data(celltype_data)

# Set the parameters for the analysis
reps=100 # <- Use 100 bootstrap lists so it runs quickly, for publishable analysis use >10000
subCellStatus=0 # <- Use subcell level annotations (i.e. Interneuron type 3)

# Load the gene list and get human orthologs
data("example_genelist")
data("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(setdiff(m2h$MGI.symbol,mouse.hits))

# Bootstrap significance testing, without controlling for transcript length and GC content
full_results = bootstrap.enrichment.test(sct_data=celltype_data,mouse.hits=mouse.hits,
 mouse.bg=mouse.bg,reps=reps,sub=subCellStatus)

# Generate the plot
print(ewce.plot(full_results$results,mtc_method="BH"))

Run the code above in your browser using DataLab