addAncestorGO: Add ancestor GO IDs

View source: R/GO.R

addAncestorGOR Documentation

Add ancestor GO IDs

Description

Given a list of GO IDs, add the corresponding ancestor GO IDs.

Usage

  addAncestorGO(go)

Arguments

go

A list of GO IDs. The elements of the list can be empty.

Details

The ancestor GO IDs for each GO ID are added to the elements.

Value

A list of GO IDs with their ancestor GO IDs.

Note

This function is mainly designed for processing the gff annotation generated from interproscan, where for each gene, a set of GO IDs are assigned. However, for GO enrichment analysis, we need a list of mapping from genes to the GO IDs and their ancestor GO IDs as well.

Author(s)

Ge Tan

Examples

  ## Not run: 
    library(GO.db)
    go <- list(c("GO:0005215", "GO:0006810", "GO:0016020"), "GO:0016579")
    addAncestorGO(go)
  
## End(Not run)

ge11232002/CNEr documentation built on Oct. 26, 2022, 7:08 p.m.