Returns a two-column data.frame suitable for
clusterProfiler::enricher(TERM2NAME = ...).
The returned table is restricted to GO terms present in the current
GO or GOSubgraph object.
Optional size filtering can be applied based on the number of mapped genes per GO term.
Examples
data("go_cc_ecoli", package = "GOcontext")
# Export GO term names for the current graph
term2name <- as_term2name(go_cc_ecoli)
head(term2name)
#> term name
#> 1 GO:0000015 phosphopyruvate hydratase complex
#> 2 GO:0000109 nucleotide-excision repair complex
#> 3 GO:0000110 nucleotide-excision repair factor 1 complex
#> 4 GO:0000111 nucleotide-excision repair factor 2 complex
#> 5 GO:0000112 nucleotide-excision repair factor 3 complex
#> 6 GO:0000113 nucleotide-excision repair factor 4 complex
# Apply size filtering based on mapped genes
term2name_filtered <- as_term2name(
go = go_cc_ecoli,
minGSSize = 5,
maxGSSize = 100
)
head(term2name_filtered)
#> term name
#> 1 GO:0000345 cytosolic DNA-directed RNA polymerase complex
#> 2 GO:0000428 DNA-directed RNA polymerase complex
#> 3 GO:0000935 division septum
#> 4 GO:0005576 extracellular region
#> 5 GO:0005667 transcription regulator complex
#> 6 GO:0005694 chromosome