Thank you, very helpful!!
• 0 views
•
link
Hi
I have multiple parent GO terms for which I want the offspring. The R script I found can only give the offspring for one term at a time. How can I the offspring for a list of parent GO terms?
Any help greatly appreciated.
library(GO.db)
offspring = GOMFOFFSPRING[["GO:0003824"]]
Just use a loop, e.g.:
my.query.terms <- c("GO:0003824", "GO:0003825", "GO:0003826")
results <- vector(mode = "list", length = length(my.query.terms))
for (i in seq_along(my.query.terms)) {
results[[i]] <- GOMFOFFSPRING[[my.query.terms[i]]]
}
Thank you, very helpful!!
Log in to answer this question.