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

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

# \donttest{ library(ewceData) # Load the single cell data ctd <- ctd()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
# 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()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
tt_alzh_BA44 <- tt_alzh_BA44()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
# 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" )
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> Nhsl1, Zc3h10, Sema5a, Litaf, Strap
#> astrocytes_ependymal
#> 0
#> Fold enrichment: 1.20519582119663
#> Standard deviations from mean: 27.341502646001
#>
#> endothelial-mural
#> 0.666666666666667
#>
#> interneurons
#> 0.666666666666667
#>
#> microglia
#> 1
#>
#> oligodendrocytes
#> 0
#> Fold enrichment: 2.30641460078183
#> Standard deviations from mean: 15.1353327829243
#>
#> pyramidal CA1
#> 0.666666666666667
#>
#> pyramidal SS
#> 1
#>
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> Pdpk1, Sh2b2, Prpf40a, Ttc17
#> astrocytes_ependymal
#> 1
#>
#> endothelial-mural
#> 0.666666666666667
#>
#> interneurons
#> 0.666666666666667
#>
#> microglia
#> 0.333333333333333
#>
#> oligodendrocytes
#> 0.666666666666667
#>
#> pyramidal CA1
#> 0.333333333333333
#>
#> pyramidal SS
#> 0.333333333333333
#>
tt_results_44 <- ewce_expression_data( sct_data = ctd, tt = tt_alzh_BA44, thresh = thresh, annotLevel = 1, reps=reps, ttSpecies = "human", sctSpecies = "mouse" )
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> Prmt2, Arpp19, Gab1, Fam171a1, Myo10, Mcm7
#> astrocytes_ependymal
#> 0.666666666666667
#>
#> endothelial-mural
#> 0
#> Fold enrichment: 1.36519244924602
#> Standard deviations from mean: 2.12315390374558
#>
#> interneurons
#> 1
#>
#> microglia
#> 0.666666666666667
#>
#> oligodendrocytes
#> 0
#> Fold enrichment: 1.88904744497589
#> Standard deviations from mean: 2.98128577285205
#>
#> pyramidal CA1
#> 1
#>
#> pyramidal SS
#> 0.666666666666667
#>
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
#> Pno1, Nup214, Dnajc18, Pop1, Fbln1
#> astrocytes_ependymal
#> 0.333333333333333
#>
#> endothelial-mural
#> 0.666666666666667
#>
#> interneurons
#> 0.666666666666667
#>
#> microglia
#> 0.333333333333333
#>
#> oligodendrocytes
#> 0.333333333333333
#>
#> pyramidal CA1
#> 0.666666666666667
#>
#> pyramidal SS
#> 1
#>
# 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)
#> CellType p fc sd_from_mean #> astrocytes_ependymal astrocytes_ependymal 0.33185 1.0281603 0.24827428 #> endothelial-mural endothelial-mural 0.44260 1.0336424 0.25202873 #> interneurons interneurons 1.00000 0.7073631 -2.15455446 #> microglia microglia 1.00000 0.8293926 -1.46592303 #> oligodendrocytes oligodendrocytes 0.00000 2.0730428 7.65636137 #> pyramidal CA1 pyramidal CA1 0.77650 0.9096806 -0.51467985 #> pyramidal SS pyramidal SS 1.00000 0.8925155 -2.44921112 #> astrocytes_ependymal1 astrocytes_ependymal 0.45060 0.9892026 -0.04808525 #> endothelial-mural1 endothelial-mural 0.65935 0.8783803 -0.47536309 #> interneurons1 interneurons 0.66635 0.9403025 -0.28072667 #> microglia1 microglia 0.33905 1.1404692 0.50468879 #> oligodendrocytes1 oligodendrocytes 0.77560 0.8360736 -0.59031322 #> pyramidal CA11 pyramidal CA1 0.22815 1.1506594 1.20334129 #> pyramidal SS1 pyramidal SS 0.33905 1.1101575 0.84943367 #> Direction #> astrocytes_ependymal Up #> endothelial-mural Up #> interneurons Up #> microglia Up #> oligodendrocytes Up #> pyramidal CA1 Up #> pyramidal SS Up #> astrocytes_ependymal1 Down #> endothelial-mural1 Down #> interneurons1 Down #> microglia1 Down #> oligodendrocytes1 Down #> pyramidal CA11 Down #> pyramidal SS1 Down
# }