compute_GO_child_term_metrics {GeneSelectR}R Documentation

Retrieve and Plot the Offspring Nodes of GO Terms

Description

This function retrieves the children nodes for a set of Gene Ontology (GO) terms from a list of GO terms and can plot the offspring nodes' numbers and fractions for each term.

Usage

compute_GO_child_term_metrics(GO_data, GO_terms, ontology = "BP", plot = FALSE)

Arguments

GO_data

A list of GO data where each element corresponds to a different feature list. Each element should have a @result data frame with a column 'ID' containing GO terms.

GO_terms

A character vector containing GO term IDs for which offspring nodes are to be fetched.

ontology

A character string specifying the type of ontology to be considered. Can be one of 'BP' (Biological Process), 'MF' (Molecular Function), or 'CC' (Cellular Component). Default is 'BP'.

plot

A logical. If TRUE, the function plots the number and fraction of offspring nodes for each term in GO_terms across all feature lists in GO_data. Default is FALSE.

Value

A data frame with columns:

Examples


# Mock GO terms data frame
all_selection.GO_inbuilt <- data.frame(
  GO_ID = c("GO:0002376", "GO:0008150", "GO:0006955", "GO:0009628"),
  Description = c("immune system process",
                  "biological_process",
                  "immune response",
                  "response to virus"),
  Parent_GO_ID = c(NA, NA, "GO:0002376", "GO:0006955"), # Simplified parent-child
  stringsAsFactors = FALSE
)

# Mock vector of GO terms to compute metrics for
GO_terms_vec <- c("GO:0002376", "GO:0008150")

# Assuming compute_GO_child_term_metrics is defined and available
# df_res <- compute_GO_child_term_metrics(GO_data = all_selection.GO_inbuilt,
#                                        GO_terms = GO_terms_vec,
#                                        plot = TRUE)



[Package GeneSelectR version 1.0.1 Index]