detectOntoDB: Detect ontology database from ontology ID

Description Usage Arguments Value Examples

View source: R/detectOntoDB.R

Description

Checks each ID across "DO", "GO", "KEGG", "MKEGG" and "REACTOME" databases and returns the database name.

Usage

1
detectOntoDB(ontology.id, NA.if.no.match = TRUE)

Arguments

ontology.id

A character vector with ontology IDs

NA.if.no.match

If an ID is not present across all databases, corresponding element of vector will be assigned as NA (default: TRUE). If FALSE, function will throw an error and stop.

Value

A character vector with the name of the databases.

Examples

1
2
3
4
5
6
7
8
ontology.ids <- lapply(sample_data, function(x){head(x$ID, 3)})
ontology.ids <- do.call(c, ontology.ids)
ontology.ids
detectOntoDB(ontology.ids)

ontology.ids2 <- c(ontology.ids[1:3], "random-id-here")
ontology.ids2
detectOntoDB(ontology.ids2)

altintasali/ontoClust documentation built on Dec. 19, 2021, 1:36 a.m.