Identify the biological pathways (gene sets from Reactome) that each metagene (factor) might belongs to.
Usage
runGSEA(
object,
genesets = NULL,
useW = TRUE,
useV = NULL,
customGenesets = NULL,
gene_sets = genesets,
mat_w = useW,
mat_v = useV,
custom_gene_sets = customGenesets
)
Arguments
- object
A liger object with valid factorization result.
- genesets
Character vector of the Reactome gene sets names to be tested. Default
NULL
uses all the gene sets from the Reactome.- useW
Logical, whether to use the shared factor loadings (\(W\)). Default
TRUE
.- useV
A character vector of the names, a numeric or logical vector of the index of the datasets where the \(V\) matrices will be included for analysis. Default
NULL
uses all datasets.- customGenesets
A named list of character vectors of entrez gene ids. Default
NULL
uses all the gene symbols from the input matrix.- gene_sets, mat_w, mat_v, custom_gene_sets
Deprecated. See Usage section for replacement.
Examples
# \donttest{
if (requireNamespace("org.Hs.eg.db", quietly = TRUE) &&
requireNamespace("reactome.db", quietly = TRUE) &&
requireNamespace("fgsea", quietly = TRUE) &&
requireNamespace("AnnotationDbi", quietly = TRUE)) {
runGSEA(pbmcPlot)
}
#>
#> 'select()' returned 1:1 mapping between keys and columns
#> 'select()' returned 1:many mapping between keys and columns
#> 'select()' returned 1:1 mapping between keys and columns
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (40.43% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (38.3% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (40.43% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (29.79% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (42.55% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (34.04% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (29.79% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (42.55% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (46.81% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (38.3% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (44.68% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (31.91% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (51.06% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (38.3% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (53.19% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (34.04% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (34.04% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (40.43% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (40.43% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> Warning: You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.
#> Warning: There are ties in the preranked stats (31.91% of the list).
#> The order of those tied genes will be arbitrary, which may produce unexpected results.
#> Warning: All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
#> $Factor_1
#> pathway pval padj ES NES
#> 1 Viral Infection Pathways 0.002879693 0.01439846 0.6582108 1.796383
#> 2 Developmental Biology 0.012806715 0.02134453 0.6102249 1.639093
#> 3 Infectious disease 0.012114772 0.02134453 0.6068905 1.670470
#> 4 Disease 0.033611669 0.04201459 0.5555992 1.540023
#> 5 Immune System 0.398703231 0.39870323 0.3869393 1.060113
#> nMoreExtreme size leadingEdge
#> 1 26 17 6232, 61....
#> 2 118 15 6232, 61....
#> 3 113 19 6232, 61....
#> 4 317 21 6232, 61....
#> 5 3750 18 5473, 91....
#>
#> $Factor_2
#> pathway pval padj ES NES
#> 1 Developmental Biology 0.0001066553 0.0005292125 0.8125000 2.161949
#> 2 Viral Infection Pathways 0.0002116850 0.0005292125 0.7729954 2.087306
#> 3 Infectious disease 0.0004218519 0.0007030865 0.7303780 1.992890
#> 4 Disease 0.0012647555 0.0015809444 0.6878732 1.886114
#> 5 Immune System 0.3978300181 0.3978300181 -0.2442762 -1.020686
#> nMoreExtreme size leadingEdge
#> 1 0 15 7852, 62....
#> 2 1 17 7852, 62....
#> 3 3 19 7852, 62....
#> 4 11 21 7852, 62....
#> 5 219 18 929, 362....
#>
#> $Factor_3
#> pathway pval padj ES NES nMoreExtreme
#> 1 Disease 0.09827316 0.2456829 0.5033034 1.368443 938
#> 2 Infectious disease 0.09027705 0.2456829 0.5107349 1.377837 856
#> 3 Developmental Biology 0.25334189 0.3166774 0.4475847 1.179798 2368
#> 4 Viral Infection Pathways 0.20220199 0.3166774 0.4607527 1.231663 1909
#> 5 Immune System 0.41105719 0.4110572 0.3933589 1.058450 3895
#> size leadingEdge
#> 1 21 3553, 92....
#> 2 19 3553, 92....
#> 3 15 6202, 90....
#> 4 17 929, 620....
#> 5 18 3553, 92....
#>
#> $Factor_4
#> pathway pval padj ES NES nMoreExtreme
#> 1 Developmental Biology 0.3984009 0.6640014 0.3911585 1.0621787 3736
#> 2 Infectious disease 0.3076028 0.6640014 0.4098445 1.1395900 2908
#> 3 Viral Infection Pathways 0.2589248 0.6640014 0.4281271 1.1776923 2436
#> 4 Disease 0.5667122 0.7083903 0.3355193 0.9399953 5389
#> 5 Immune System 0.9079949 0.9079949 0.2307424 0.6380570 8585
#> size leadingEdge
#> 1 15 6189, 62....
#> 2 19 9636, 61....
#> 3 17 9636, 61....
#> 4 21 9636, 61....
#> 5 18 91543, 9....
#>
#> $Factor_5
#> pathway pval padj ES NES nMoreExtreme
#> 1 Developmental Biology 0.1080645 0.1820968 0.5086699 1.3580984 1004
#> 2 Infectious disease 0.1078004 0.1820968 0.4947284 1.3542520 1012
#> 3 Viral Infection Pathways 0.1092581 0.1820968 0.4991228 1.3502781 1021
#> 4 Disease 0.2675253 0.3344067 0.4263150 1.1772368 2533
#> 5 Immune System 0.9046351 0.9046351 0.2309144 0.6291364 8489
#> size leadingEdge
#> 1 15 6228, 61....
#> 2 19 3553, 96....
#> 3 17 9636, 62....
#> 4 21 3553, 96....
#> 5 18 972, 355....
#>
#> $Factor_6
#> pathway pval padj ES NES nMoreExtreme
#> 1 Immune System 0.02033505 0.1016753 0.5831827 1.577232 192
#> 2 Developmental Biology 0.16108809 0.2507099 0.4795479 1.269607 1515
#> 3 Infectious disease 0.20056794 0.2507099 0.4514197 1.226441 1906
#> 4 Viral Infection Pathways 0.18656085 0.2507099 0.4623016 1.240334 1762
#> 5 Disease 0.40207809 0.4020781 0.3858369 1.057147 3830
#> size leadingEdge
#> 1 18 2214, 51....
#> 2 15 51316, 6....
#> 3 19 2214, 96....
#> 4 17 9636, 61....
#> 5 21 2214, 96....
#>
#> $Factor_7
#> pathway pval padj ES NES
#> 1 Developmental Biology 0.002119992 0.005299979 0.6833333 1.8098851
#> 2 Infectious disease 0.001676973 0.005299979 0.6660305 1.8065540
#> 3 Disease 0.009916493 0.016527488 0.6088180 1.6635131
#> 4 Viral Infection Pathways 0.014956815 0.018696019 0.6034146 1.6205789
#> 5 Immune System 0.966235405 0.966235405 0.2017394 0.5445265
#> nMoreExtreme size leadingEdge
#> 1 19 15 6228, 90....
#> 2 15 19 2214, 62....
#> 3 94 21 2214, 62....
#> 4 141 17 6228, 90....
#> 5 9185 18 10578, 2....
#>
#> $Factor_8
#> pathway pval padj ES NES
#> 1 Disease 0.0001056524 0.0001779486 0.7311131 2.0347979
#> 2 Infectious disease 0.0001062022 0.0001779486 0.7707551 2.1320177
#> 3 Viral Infection Pathways 0.0001067692 0.0001779486 0.8117175 2.2240811
#> 4 Developmental Biology 0.0002160994 0.0002701243 0.7432016 2.0051556
#> 5 Immune System 0.8720520756 0.8720520756 0.2444750 0.6734521
#> nMoreExtreme size leadingEdge
#> 1 0 21 6133, 61....
#> 2 0 19 6133, 61....
#> 3 0 17 6133, 61....
#> 4 1 15 6133, 61....
#> 5 8171 18 10578, 6....
#>
#> $Factor_9
#> pathway pval padj ES NES
#> 1 Immune System 0.01203792 0.06018962 0.6100554 1.660667
#> 2 Developmental Biology 0.28440762 0.38382555 0.4366819 1.165137
#> 3 Disease 0.37995979 0.38382555 0.3951049 1.086650
#> 4 Infectious disease 0.38382555 0.38382555 0.3945865 1.080472
#> 5 Viral Infection Pathways 0.27099808 0.38382555 0.4359909 1.180323
#> nMoreExtreme size leadingEdge
#> 1 112 18 9636, 91....
#> 2 2642 15 51316, 6....
#> 3 3590 21 9636, 62....
#> 4 3625 19 9636, 92....
#> 5 2535 17 9636, 92....
#>
#> $Factor_10
#> pathway pval padj ES NES
#> 1 Viral Infection Pathways 0.005518412 0.02759206 0.6401089 1.744890
#> 2 Developmental Biology 0.020137104 0.03356184 0.5955000 1.601290
#> 3 Infectious disease 0.019694576 0.03356184 0.5825854 1.606885
#> 4 Disease 0.060752575 0.07594072 0.5244344 1.455608
#> 5 Immune System 0.271217712 0.27121771 -0.2735749 -1.170263
#> nMoreExtreme size leadingEdge
#> 1 51 17 7852, 62....
#> 2 187 15 7852, 62....
#> 3 186 19 7852, 62....
#> 4 577 21 7852, 62....
#> 5 146 18 929, 355....
#>
#> $Factor_11
#> pathway pval padj ES NES nMoreExtreme
#> 1 Developmental Biology 0.1183673 0.3593037 0.5055147 1.3508828 1101
#> 2 Infectious disease 0.2155822 0.3593037 0.4479718 1.2244411 2030
#> 3 Viral Infection Pathways 0.2041231 0.3593037 0.4555556 1.2352720 1910
#> 4 Disease 0.4193139 0.5241423 0.3823529 1.0511160 3959
#> 5 Immune System 0.9427322 0.9427322 0.2086250 0.5678465 8839
#> size leadingEdge
#> 1 15 6133, 61....
#> 2 19 2214, 61....
#> 3 17 6133, 61....
#> 4 21 2214, 61....
#> 5 18 2207, 62....
#>
#> $Factor_12
#> pathway pval padj ES NES
#> 1 Disease 0.01976161 0.09880803 0.5886130 1.578153
#> 2 Developmental Biology 0.08275058 0.10343823 0.5305796 1.381736
#> 3 Infectious disease 0.05509671 0.10343823 0.5397122 1.443171
#> 4 Viral Infection Pathways 0.06961361 0.10343823 0.5311018 1.405059
#> 5 Immune System 0.31128812 0.31128812 0.4253640 1.131166
#> nMoreExtreme size leadingEdge
#> 1 188 21 6279, 62....
#> 2 780 15 6135, 61....
#> 3 526 19 929, 355....
#> 4 662 17 929, 613....
#> 5 2969 18 6279, 62....
#>
#> $Factor_13
#> pathway pval padj ES NES
#> 1 Infectious disease 0.0009673259 0.003800630 0.6824759 1.9287409
#> 2 Viral Infection Pathways 0.0015202519 0.003800630 0.6849741 1.9137847
#> 3 Developmental Biology 0.0036307625 0.006051271 0.6645914 1.8295170
#> 4 Disease 0.0057747834 0.007218479 0.6230769 1.7715767
#> 5 Immune System 0.9948320413 0.994832041 -0.1143908 -0.5001018
#> nMoreExtreme size leadingEdge
#> 1 8 19 4869, 90....
#> 2 13 17 4869, 90....
#> 3 32 15 9045, 62....
#> 4 53 21 4869, 90....
#> 5 769 18 929, 513....
#>
#> $Factor_14
#> pathway pval padj ES NES
#> 1 Developmental Biology 0.0001064056 0.000133007 0.9062500 2.395471
#> 2 Disease 0.0001051193 0.000133007 0.8417415 2.295903
#> 3 Infectious disease 0.0001054964 0.000133007 0.8669039 2.346979
#> 4 Viral Infection Pathways 0.0001056747 0.000133007 0.8936170 2.398999
#> 5 Immune System 0.2222222222 0.222222222 -0.2882457 -1.197634
#> nMoreExtreme size leadingEdge
#> 1 0 15 6164, 61....
#> 2 0 21 6164, 61....
#> 3 0 19 6164, 61....
#> 4 0 17 6164, 61....
#> 5 117 18 929, 362....
#>
#> $Factor_15
#> pathway pval padj ES NES
#> 1 Viral Infection Pathways 0.0001087784 0.0005438921 0.7361111 2.0495122
#> 2 Developmental Biology 0.0004392708 0.0010981770 0.7310739 2.0012432
#> 3 Infectious disease 0.0007551241 0.0012585401 0.6823557 1.9212872
#> 4 Disease 0.0043958400 0.0054948000 0.6304771 1.7860334
#> 5 Immune System 0.8202955237 0.8202955237 0.2552083 0.7145374
#> nMoreExtreme size leadingEdge
#> 1 0 17 4869, 62....
#> 2 3 15 6232, 78....
#> 3 6 19 4869, 62....
#> 4 40 21 4869, 62....
#> 5 7549 18 5473, 4869
#>
#> $Factor_16
#> pathway pval padj ES NES
#> 1 Viral Infection Pathways 0.0006393862 0.003196931 0.6986226 1.925168
#> 2 Developmental Biology 0.0040882195 0.006813699 0.6577213 1.784370
#> 3 Infectious disease 0.0030759440 0.006813699 0.6471931 1.804147
#> 4 Disease 0.0118293198 0.014786650 0.5949352 1.672219
#> 5 Immune System 0.3481989708 0.348198971 -0.2577690 -1.065138
#> nMoreExtreme size leadingEdge
#> 1 5 17 7852, 62....
#> 2 37 15 7852, 62....
#> 3 28 19 7852, 62....
#> 4 111 21 7852, 62....
#> 5 202 18 929, 513....
#>
#> $Factor_17
#> pathway pval padj ES NES
#> 1 Developmental Biology 0.000741997 0.002990010 0.7078037 1.8673325
#> 2 Infectious disease 0.001261167 0.002990010 0.7037357 1.9036915
#> 3 Viral Infection Pathways 0.001794006 0.002990010 0.6881356 1.8384582
#> 4 Disease 0.003459119 0.004323899 0.6524684 1.7745925
#> 5 Immune System 0.547169811 0.547169811 -0.2288559 -0.9203805
#> nMoreExtreme size leadingEdge
#> 1 6 15 6164, 62....
#> 2 11 19 6164, 62....
#> 3 16 17 6164, 62....
#> 4 32 21 6164, 62....
#> 5 260 18 929, 513....
#>
#> $Factor_18
#> pathway pval padj ES NES nMoreExtreme
#> 1 Immune System 0.08560768 0.4280384 0.5036946 1.397848 802
#> 2 Developmental Biology 0.46387299 0.4645994 0.3766108 1.019211 4294
#> 3 Disease 0.46459943 0.4645994 0.3603539 1.014640 4389
#> 4 Infectious disease 0.23678356 0.4645994 0.4316227 1.204928 2234
#> 5 Viral Infection Pathways 0.45952280 0.4645994 0.3700680 1.021795 4313
#> size leadingEdge
#> 1 18 3627, 26....
#> 2 15 6228, 61....
#> 3 21 2214, 96....
#> 4 19 2214, 96....
#> 5 17 9636, 62....
#>
#> $Factor_19
#> pathway pval padj ES NES
#> 1 Developmental Biology 0.0002155172 0.001077586 0.7596713 2.0335976
#> 2 Viral Infection Pathways 0.0012802731 0.003200683 0.6868687 1.8746697
#> 3 Infectious disease 0.0037194474 0.006199079 0.6444805 1.7699671
#> 4 Disease 0.0138492441 0.017311555 0.6023632 1.6657098
#> 5 Immune System 0.8094122658 0.809412266 0.2716142 0.7433329
#> nMoreExtreme size leadingEdge
#> 1 1 15 6232, 78....
#> 2 11 17 6232, 78....
#> 3 34 19 6232, 78....
#> 4 130 21 6232, 78....
#> 5 7601 18 6402, 26....
#>
#> $Factor_20
#> pathway pval padj ES NES nMoreExtreme
#> 1 Developmental Biology 0.02433581 0.1211962 0.5925050 1.565952 228
#> 2 Infectious disease 0.07271773 0.1211962 0.5234712 1.413193 692
#> 3 Viral Infection Pathways 0.06922752 0.1211962 0.5318504 1.423238 655
#> 4 Disease 0.18054973 0.2256872 0.4622005 1.253422 1720
#> 5 Immune System 0.60986877 0.6098688 0.3386207 0.911259 5808
#> size leadingEdge
#> 1 15 51316, 7....
#> 2 19 7852, 62....
#> 3 17 7852, 62....
#> 4 21 7852, 62....
#> 5 18 10578, 5....
#>
# }