#' Builds GO annotation database
#'
#' @return
#' @export
#'
#' @import org.Hs.eg.db
#'
#'
build.GOannotaions <- function() {
proteins <- rownames(getData())
a <- mget(x = proteins, envir = org.Hs.egACCNUM2EG, ifnotfound = NA)
message("ok")
b <- unlist(lapply(a, function(x) x[[1]]))
annotations <- lapply(mget(na.omit(b), org.Hs.egGO), names)
names(annotations) <- names(b)[match(names(annotations), b)]
for(i in 1:length(a)) {
if(!names(a)[i] %in% names(annotations)) {
annotations[length(annotations) + 1] <- list(NULL)
names(annotations)[length(annotations)] <- names(a)[i]
}
}
saveThis(annotations, "annotations", "info")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.