ewce.plot: Plot EWCE results

Description Usage Arguments Value Examples

View source: R/ewce.plot.R

Description

ewce.plot generates plots of EWCE enrichment results

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# 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"))

EWCE documentation built on May 31, 2017, 3:16 p.m.