################################################### ### chunk number 1: ################################################### library(GOSemSim) goSim("GO:0004022", "GO:0005515", ont="MF", measure="Wang") ################################################### ### chunk number 2: ################################################### go1 = c("GO:0004022","GO:0004024","GO:0004174") go2 = c("GO:0009055","GO:0005515") mgoSim(go1, go2, ont="MF", measure="Wang") ################################################### ### chunk number 3: ################################################### geneSim("241", "2561", ont="MF", organism="human", measure="Wang") ################################################### ### chunk number 4: ################################################### sim <- mgeneSim(c("835", "5261","241", "934"), ont="MF", organism="human", measure="Wang") sim library(cluster) pamCluster <- pam(as.dist(1-sim[complete.cases(sim), complete.cases(sim)]), 2) pamCluster$clustering ################################################### ### chunk number 5: ################################################### cluster1 <- c("835", "5261","241", "994", "514", "517", "533") cluster2 <- c("578","582", "583", "400", "409", "411") cluster3 <- c("307", "308", "317", "321", "506", "540", "378", "388", "396") clusters <- list(a=cluster1, b=cluster2, c=cluster3) clusterSim(cluster1, cluster2, ont="MF", organism="human", measure="Wang") clusters <- list(a=cluster1, b=cluster2, c=cluster3) mclusterSim(clusters, ont="MF", organism="human", measure="Wang")