Learn R Programming

keggorthology (version 2.20.0)

keggDF2graph: create a graph from a specific data frame format for KEGG orthology

Description

create a graph from a specific data frame format for KEGG orthology

Usage

keggDF2graph(df, root="KO.June07root") data(KOgraph)

Arguments

df
the data frame
root
a name for root node

Value

a graphNEL-class instance

Details

the obvious directed graph structure from root to leaf nodes (pathway names) is instantiated for the orthology, nodeData attribute tag is loaded with the numerical tag for the term in KEGG, and nodeData attribute depth is loaded with depth from root

Based on keggorthology read of KEGG orthology, March 2 2010. Specifically, we run wget on ftp://ftp.genome.jp/pub/kegg/brite/ko/ko00001.keg and use parsing and modeling code given in inst/keggHTML to generate a data frame respecting the hierarchy, and then keggDF2graph to construct the graph.

Examples

Run this code
data(keggOrthDF)
keggOrthDF[1:5,]
data(KOgraph)
nodes(KOgraph)[1:4]
nodeData(KOgraph,,"tag")[1:5]
nodeData(KOgraph,,"depth")[1:5]

Run the code above in your browser using DataLab