R/go.R
create_ontology_DAG_from_GO_db.Rd
Create the ontology_DAG object from the GO.db package
Mappings between alternative GO terms to official GO terms
create_ontology_DAG_from_GO_db(
namespace = "BP",
relations = "part of",
org_db = NULL,
evidence_code = NULL,
retrieve_alternative = FALSE,
verbose = simona_opt$verbose
)
alternative_GO_terms(
tag = c("replaced_by", "alt_id", "consider"),
version = NULL,
verbose = TRUE
)
One of "BP", "CC" and "MF".
Types of the GO term relations. In the GO.db package, the GO term relations can be "is_a", "part_of", "regulates", "negatively regulates", "positively regulates". Note since "regulates" is a parent relation of "negatively regulates", "positively regulates", if "regulates" is selected, "negatively regulates" and "positively regulates" are also selected. Note "is_a" is always included.
The name of the organism package or the corresponding database object, e.g. "org.Hs.eg.db"
or
directly the org.Hs.eg.db::org.Hs.eg.db
object for human, then the gene annotation to GO terms will be added
to the object. For other non-model organisms, consider to use the AnnotationHub package to find one.
A vector of evidence codes for gene annotation to GO terms. See https://geneontology.org/docs/guide-go-evidence-codes/.
Whether to retrieve alternative/obsolete GO terms from geneontology.org?
Whether to print messages.
In the go-basic.obo
file, there are three tags which define alternative GO terms: replaced_by
, alt_id
and consider
.
See https://owlcollab.github.io/oboformat/doc/GO.format.obo-1_4.html#S.2.2.1
Version of the go-basic.obo
file. By default it is the version for building GO.db package. The value is a string in the format of "2024-01-17".
An ontology_DAG
object.
A list of named vectors where names are alternative GO IDs and value vectors are current GO IDs in use.
dag = create_ontology_DAG_from_GO_db()
#>
#> relations: is_a, part_of
dag
#> An ontology_DAG object:
#> Source: GO BP / GO.db package 3.17.0
#> 27942 terms / 55956 relations
#> Root: GO:0008150
#> Terms: GO:0000001, GO:0000002, GO:0000003, GO:0000011, ...
#> Max depth: 18
#> Avg number of parents: 2.00
#> Avg number of children: 1.88
#> Aspect ratio: 363.92:1 (based on the longest distance from root)
#> 782.78:1 (based on the shortest distance from root)
#> Relations: is_a, part_of
#>
#> With the following columns in the metadata data frame:
#> id, name, definition