merged_ewce: Multiple EWCE results from multiple studies

Description Usage Arguments Value Examples

View source: R/merged_ewce.R

Description

merged_ewce combines enrichment results from multiple studies targetting the same scientific problem

Usage

1
merged_ewce(results, reps = 100)

Arguments

results

a list of EWCE results generated using add.res.to.merging.list

reps

Number of random gene lists to generate (default=100 but should be over 10000 for publication quality results)

Value

dataframe in which each row gives the statistics (p-value, fold change and number of standard deviations from the mean) associated with the enrichment of the stated cell type in the gene list

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.