genesFromRandomPathways.Rd
This function first randomly selects a number (np) of pathways, then randomly selects a number (ng) of genes that are associated with at least one of the selected pathways. The function can be used to compare Sigora's performance to traditional overrepresentation tests.
genesFromRandomPathways(GPSrepo, np, ng)
GPSrepo | A signature repository (created by ..) or one of the precompiled options. |
---|---|
np | How many pathways to select. |
ng | Number of genes to be selected. |
A vector containing the "np" originally selected pathways.
A vector containing the "ng" selected genes from selectedPathways.
Foroushani AB, Brinkman FS and Lynn DJ (2013).“Pathway-GPS and SIGORA: identifying relevant pathways based on the over-representation of their gene-pair signatures.”PeerJ, 1
data('kegH') ## select 50 genes from 3 human KEGG pathways seed=1234 set.seed(seed) a1<-genesFromRandomPathways(kegH,3,50) #> ### randomly selected pathways are: #> hsa05218 #> hsa03440 #> hsa04060 ## originally selected pathways: a1[["selectedPathways"]] #> [1] "hsa05218" "hsa03440" "hsa04060" ## what are the genes a1[["genes"]] #> [1] "578" "3458" "80310" "56034" "27177" "27242" "53342" "2660" #> [9] "944" "163702" "4233" "657" "5291" "3624" "130399" "146956" #> [17] "8822" "3562" "8940" "5196" "4049" "268" "3444" "1436" #> [25] "3597" "5156" "8792" "282618" "3455" "1647" "9577" "29949" #> [33] "58985" "9518" "8742" "8743" "6376" "3439" "673" "3606" #> [41] "8793" "2253" "581" "8795" "3479" "5617" "56477" "10913" #> [49] "90" "3467" ## sigora's results sigoraRes <- sigora(GPSrepo =kegH, queryList = a1[["genes"]], level = 4) #> pathwy.id description pvalues Bonferroni #> 1 hsa04060 Cytokine-cytokine receptor interaction 2.787e-304 8.5e-302 #> successes PathwaySize N sample.size #> 1 216.39 14774.33 452219.2 227.45 ## compare to traditional methods results: oraRes <- ora(a1[["genes"]],kegH) dim(oraRes) #> [1] 29 6 oraRes #> pathwyid description success #> 1 hsa04060 Cytokine-cytokine receptor interaction 35 #> 2 hsa05218 Melanoma 12 #> 3 hsa04630 Jak-STAT signaling pathway 15 #> 4 hsa01521 EGFR tyrosine kinase inhibitor resistance 8 #> 5 hsa04151 PI3K-Akt signaling pathway 14 #> 6 hsa05164 Influenza A 10 #> 7 hsa05214 Glioma 7 #> 8 hsa04015 Rap1 signaling pathway 10 #> 9 hsa04650 Natural killer cell mediated cytotoxicity 8 #> 10 hsa05224 Breast cancer 8 #> 11 hsa05160 Hepatitis C 8 #> 12 hsa04014 Ras signaling pathway 9 #> 13 hsa04010 MAPK signaling pathway 10 #> 14 hsa04210 Apoptosis 7 #> 15 hsa04350 TGF-beta signaling pathway 6 #> 16 hsa05213 Endometrial cancer 5 #> 17 hsa05168 Herpes simplex infection 8 #> 18 hsa05215 Prostate cancer 6 #> 19 hsa05223 Non-small cell lung cancer 5 #> 20 hsa04217 Necroptosis 7 #> 21 hsa05216 Thyroid cancer 4 #> 22 hsa05212 Pancreatic cancer 5 #> 23 hsa05220 Chronic myeloid leukemia 5 #> 24 hsa05202 Transcriptional misregulation in cancer 7 #> 25 hsa05210 Colorectal cancer 5 #> 26 hsa05162 Measles 6 #> 27 hsa04550 Signaling pathways regulating pluripotency of stem cells 6 #> 28 hsa04510 Focal adhesion 7 #> 29 hsa05169 Epstein-Barr virus infection 7 #> pathwaySize pvalues Bonfer #> 1 294 1.279e-38 1.803390e-36 #> 2 72 2.309e-14 3.255690e-12 #> 3 162 6.941e-14 9.786810e-12 #> 4 79 4.164e-08 5.871240e-06 #> 5 354 4.542e-08 6.404220e-06 #> 6 170 1.367e-07 1.927470e-05 #> 7 75 5.556e-07 7.833960e-05 #> 8 210 9.769e-07 1.377429e-04 #> 9 131 2.123e-06 2.993430e-04 #> 10 147 5.042e-06 7.109220e-04 #> 11 155 7.474e-06 1.053834e-03 #> 12 232 1.933e-05 2.725530e-03 #> 13 295 2.038e-05 2.873580e-03 #> 14 136 2.996e-05 4.224360e-03 #> 15 94 3.483e-05 4.911030e-03 #> 16 58 3.883e-05 5.475030e-03 #> 17 195 3.978e-05 5.608980e-03 #> 18 97 4.164e-05 5.871240e-03 #> 19 66 7.274e-05 1.025634e-02 #> 20 162 9.163e-05 1.291983e-02 #> 21 37 1.006e-04 1.418460e-02 #> 22 75 1.343e-04 1.893630e-02 #> 23 76 1.430e-04 2.016300e-02 #> 24 186 2.170e-04 3.059700e-02 #> 25 86 2.563e-04 3.613830e-02 #> 26 138 2.940e-04 4.145400e-02 #> 27 140 3.177e-04 4.479570e-02 #> 28 199 3.283e-04 4.629030e-02 #> 29 201 3.489e-04 4.919490e-02