This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R script for offspring GO terms

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"]]
multiple script terms go

1 answer

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]]]
}

Log in to answer this question.