## We show how to extract information from KEGGPathway objects
## Parse KGML file into a 'KEGGPathway' object
mapfile <- system.file("extdata/map00260.xml", package="KEGGgraph")
maptest <- parseKGML(mapfile)
## short summary of the pathway
maptest
## get information of the pathway
getPathwayInfo(maptest)
## nodes of the pathway
nodes <- nodes(maptest)
node <- nodes[[3]]
getName(node)
getType(node)
getDisplayName(node)
## edges of the pathway
edges <- edges(maptest)
edge <- edges[[3]]
getEntryID(edge)
getSubtype(edge)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(KEGGgraph)
Attaching package: 'KEGGgraph'
The following object is masked from 'package:graphics':
plot
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/KEGGgraph/KEGGPathway-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: KEGGPathway-class
> ### Title: Class "KEGGPathway"
> ### Aliases: KEGGPathway-class edges,KEGGPathway,ANY-method edges<-
> ### edges<-,KEGGPathway-method getName,KEGGPathway-method
> ### getTitle,KEGGPathway-method nodes<-,KEGGPathway,ANY-method
> ### nodes,KEGGPathway-method edges,KEGGPathway-method
> ### show,KEGGPathway-method getTitle,KEGGPathway-method
> ### Keywords: classes
>
> ### ** Examples
>
> ## We show how to extract information from KEGGPathway objects
> ## Parse KGML file into a 'KEGGPathway' object
> mapfile <- system.file("extdata/map00260.xml", package="KEGGgraph")
> maptest <- parseKGML(mapfile)
>
> ## short summary of the pathway
> maptest
KEGG Pathway
[ Title ]: Glycine, serine and threonine metabolism
[ Name ]: path:map00260
[ Organism ]: map
[ Number ] :00260
[ Image ] :http://www.genome.jp/kegg/pathway/map/map00260.gif
[ Link ] :http://www.genome.jp/dbget-bin/show_pathway?map00260
------------------------------------------------------------
Statistics:
144 node(s)
371 edge(s)
68 reaction(s)
------------------------------------------------------------
>
> ## get information of the pathway
> getPathwayInfo(maptest)
[ Title ]: Glycine, serine and threonine metabolism
[ Name ]: path:map00260
[ Organism ]: map
[ Number ] :00260
[ Image ] :http://www.genome.jp/kegg/pathway/map/map00260.gif
[ Link ] :http://www.genome.jp/dbget-bin/show_pathway?map00260
>
> ## nodes of the pathway
> nodes <- nodes(maptest)
> node <- nodes[[3]]
> getName(node)
[1] "cpd:C16432"
> getType(node)
[1] "compound"
> getDisplayName(node)
[1] "C16432"
>
> ## edges of the pathway
> edges <- edges(maptest)
> edge <- edges[[3]]
> getEntryID(edge)
Entry1ID Entry2ID
"17" "81"
> getSubtype(edge)
$subtype
[ Subtype name ]: compound
[ Subtype value ]: 96
>
>
>
>
>
> dev.off()
null device
1
>