## ----style, echo = FALSE, results = 'asis'------------------------------------
BiocStyle::markdown()
## ----css, echo=FALSE, results='asis'------------------------------------------
cat("
")
## ----js, echo=FALSE, results='asis'-------------------------------------------
cat("
")
## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(
comment = ""
)
## ----env, message = FALSE, warning = FALSE, echo = TRUE-----------------------
library(goSorensen)
## ----eval=FALSE---------------------------------------------------------------
# if (!requireNamespace("goSorensen", quietly = TRUE)) {
# BiocManager::install("goSorensen")
# }
# library(goSorensen)
## -----------------------------------------------------------------------------
data("allOncoGeneLists")
## -----------------------------------------------------------------------------
sapply(allOncoGeneLists, length)
# First 15 gene identifiers of gene lists atlas and sanger:
allOncoGeneLists[["atlas"]][1:15]
allOncoGeneLists[["sanger"]][1:15]
## ----message = FALSE, warning = FALSE, eval = FALSE---------------------------
# if (!requireNamespace("org.Hs.eg.db", quietly = TRUE)) {
# BiocManager::install("org.Hs.eg.db")
# }
## ----message = FALSE, warning = FALSE, eval = TRUE----------------------------
library(org.Hs.eg.db)
## ----message = FALSE, warning = FALSE, echo = TRUE----------------------------
humanEntrezIDs <- keys(org.Hs.eg.db, keytype = "ENTREZID")
## ----echo=FALSE---------------------------------------------------------------
options(max.print = 50)
## ----eval=TRUE----------------------------------------------------------------
enrichedAtlas <- enrichedIn(allOncoGeneLists[["atlas"]],
geneUniverse = humanEntrezIDs,
orgPackg = "org.Hs.eg.db",
onto = "BP", GOLevel = 4)
enrichedAtlas
## -----------------------------------------------------------------------------
fullEnrichedAtlas <- enrichedIn(allOncoGeneLists[["atlas"]],
geneUniverse = humanEntrezIDs,
orgPackg = "org.Hs.eg.db",
onto = "BP", GOLevel = 4,
onlyEnriched = FALSE)
fullEnrichedAtlas
## -----------------------------------------------------------------------------
# number of GO terms in enrichedAtlas
length(enrichedAtlas)
# number of GO terms in fullEnrichedAtlas
length(fullEnrichedAtlas)
## ----echo=FALSE---------------------------------------------------------------
options(max.print = 100)
## ----eval=FALSE---------------------------------------------------------------
# enrichedInBP4 <- enrichedIn(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP", GOLevel = 4)
# enrichedInBP4
## ----echo=FALSE---------------------------------------------------------------
data("enrichedInBP4")
enrichedInBP4
## ----eval=FALSE---------------------------------------------------------------
# fullEnrichedInBP4 <- enrichedIn(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP", GOLevel = 4,
# onlyEnriched = FALSE)
# fullEnrichedInBP4
## ----echo=FALSE---------------------------------------------------------------
data("fullEnrichedInBP4")
fullEnrichedInBP4
## -----------------------------------------------------------------------------
# number of GO terms (rows) in enrichedInBP4
nrow(enrichedInBP4)
# number of GO terms (rows) in fullEnrichedInBP4
nrow(fullEnrichedInBP4)
## ----eval=FALSE---------------------------------------------------------------
# cont_atlas.sanger_BP4 <- buildEnrichTable(allOncoGeneLists$atlas,
# allOncoGeneLists$sanger,
# listNames = c("atlas", "sanger"),
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP",
# GOLevel = 4)
# cont_atlas.sanger_BP4
## ----echo=FALSE---------------------------------------------------------------
data("cont_atlas.sanger_BP4")
cont_atlas.sanger_BP4
## ----eval=FALSE---------------------------------------------------------------
# cont_all_BP4 <- buildEnrichTable(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP",
# GOLevel = 4)
## ----eval=FALSE---------------------------------------------------------------
# allContTabs <- allBuildEnrichTable(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# ontos = c("BP", "CC", "MF"),
# GOLevels = 3:10)
## ----eval=FALSE---------------------------------------------------------------
# eqTest_atlas.sanger_BP4 <- equivTestSorensen(allOncoGeneLists$atlas,
# allOncoGeneLists$sanger,
# listNames = c("atlas", "sanger"),
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP", GOLevel = 4,
# d0 = 0.4444,
# conf.level = 0.95)
# eqTest_atlas.sanger_BP4
## ----echo=FALSE---------------------------------------------------------------
data("eqTest_atlas.sanger_BP4")
eqTest_atlas.sanger_BP4
## -----------------------------------------------------------------------------
equivTestSorensen(cont_atlas.sanger_BP4,
d0 = 0.4444,
conf.level = 0.95)
## -----------------------------------------------------------------------------
upgrade(eqTest_atlas.sanger_BP4, d0 = 0.2857,
conf.level = 0.99, boot = TRUE)
## ----eval=FALSE---------------------------------------------------------------
# eqTest_all_BP4 <- equivTestSorensen(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# onto = "BP",
# GOLevel = 4,
# d0 = 0.4444,
# conf.level = 0.95)
## ----eval=FALSE---------------------------------------------------------------
# eqTest_all_BP4 <- equivTestSorensen(cont_all_BP4,
# d0 = 0.4444,
# conf.level = 0.95)
## ----echo=FALSE---------------------------------------------------------------
data(eqTest_all_BP4)
## ----echo=FALSE---------------------------------------------------------------
options(digits = 4)
## -----------------------------------------------------------------------------
getDissimilarity(eqTest_all_BP4, simplify = FALSE)
## -----------------------------------------------------------------------------
getPvalue(eqTest_all_BP4, simplify = FALSE)
## ----eval=FALSE---------------------------------------------------------------
# allEqTests <- allEquivTestSorensen(allOncoGeneLists,
# geneUniverse = humanEntrezIDs,
# orgPackg = "org.Hs.eg.db",
# ontos = c("BP", "CC", "MF"),
# GOLevels = 3:10,
# d0 = 0.4444,
# conf.level = 0.95)
## ----eval=FALSE---------------------------------------------------------------
# allEqTests <- allEquivTestSorensen(allContTabs,
# d0 = 0.4444,
# conf.level = 0.95)
## ----sessionInfo--------------------------------------------------------------
sessionInfo()