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
21
22
23
24
25
26
27
28
29
30
31
library(ewceData)
# Load the single cell data
ctd <- ctd()

# Use 3 bootstrap lists for speed, for publishable analysis use >10000
reps <- 3
# Use 5 up/down regulated genes (thresh) for speed, default is 250
thresh = 5

# Load the data
tt_alzh_BA36 <- tt_alzh_BA36()
tt_alzh_BA44 <- tt_alzh_BA44()

# Run EWCE analysis
tt_results_36 <- ewce_expression_data(
    sct_data = ctd, tt = tt_alzh_BA36, thresh= thresh,
    annotLevel = 1, reps=reps, ttSpecies = "human", sctSpecies = "mouse"
)
tt_results_44 <- ewce_expression_data(
    sct_data = ctd, tt = tt_alzh_BA44, thresh = thresh,
    annotLevel = 1, reps=reps, ttSpecies = "human", sctSpecies = "mouse"
)

# Fill a list with the results
results <- add_res_to_merging_list(tt_results_36)
results <- add_res_to_merging_list(tt_results_44, results)

# Perform the merged analysis
# For publication reps should be higher
merged_res <- merged_ewce(results, reps = 2)
print(merged_res)

NathanSkene/EWCE documentation built on June 19, 2021, 5:40 a.m.