Learn R Programming

gwascat (version 2.4.2)

obo2graphNEL: convert a typical OBO text file to a graphNEL instance (using Term elements)

Description

convert a typical OBO text file to a graphNEL instance (using Term elements)

Usage

obo2graphNEL(obo, kill = "\\[Typedef\\]", killTrailSp=TRUE)
node2uri(nn)
uri2node(us)

Arguments

obo
string naming a file in OBO format
nn
node name for converted graph, generally of form EFO:nnnnnnn
us
URI string from GWAS catalog annotation MAPPED_TRAIT_URI
kill
entity types to be excluded from processing -- probably this should be in a 'keep' form, but for now this works.
killTrailSp
In the textual version of EFO ca. Aug 2015, there is a trailing blank in the tag field defining EFO:0000001, which is not present in references to this term. Set this to TRUE to eliminate this, or graphNEL construction will fail to validate.

Value

  • a graphNEL instance

Details

Very rudimentary list and grep operations are used to retain sufficient information to map the DAG to a graphNEL, using formal term identifiers as node names and 'is-a' relationships as edges, and term names and other metadata are assigned to nodeData components.

References

For use with human disease ontology, http://www.obofoundry.org/cgi-bin/detail.cgi?id=disease_ontology

Examples

Run this code
data(efo.obo.g)
hn = nodes(efo.obo.g)[1:5]
hn
nodeData(efo.obo.g, hn[5])

Run the code above in your browser using DataLab