if (FALSE) {
# Be careful when testing this since it involves GO similarity computation
# and might produce unpredictable results in some environments
library("GOSemSim")
library("org.Hs.eg.db")
# By GO terms
go1 <- c("GO:0004022", "GO:0004024", "GO:0004023")
go2 <- c("GO:0009055", "GO:0020037")
twoGOSim(go1, go2, type = "go", ont = "MF", measure = "Wang")
# By Entrez gene id
gene1 <- "1956" # EGFR
gene2 <- "2261" # FGFR3
twoGOSim(gene1, gene2, type = "gene", ont = "BP", measure = "Lin")
}
Run the code above in your browser using DataLab