deparse_go_value: Extract more easily readable information from a GOTERM datum.

View source: R/ontology_shared.R

deparse_go_valueR Documentation

Extract more easily readable information from a GOTERM datum.

Description

The output from the GOTERM/GO.db functions is inconsistent, to put it nicely. This attempts to extract from that heterogeneous datatype something easily readable. Example: Synonym() might return any of the following: NA, NULL, "NA", "NULL", c("NA",NA,"GO:00001"), "GO:00002", c("Some text",NA, NULL, "GO:00003") This function will boil that down to 'not found', ”, 'GO:00004', or "GO:0001, some text, GO:00004"

Usage

deparse_go_value(value)

Arguments

value

Result of try(as.character(somefunction(GOTERM[id])), silent = TRUE). somefunction would be 'Synonym' 'Secondary' 'Ontology', etc...

Value

something more sane (hopefully).

See Also

[GO.db]

Examples

## Not run: 
 ## goterms = GOTERM[ids]
 ## sane_goterms = deparse_go_value(goterms)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.