Last data update: 2014.03.03

R: Class 'KEGGEdge'
KEGGEdge-classR Documentation

Class 'KEGGEdge'

Description

A class to represent 'relation' elements in KGML files and edge objects in a KEGG graph

Objects from the Class

Objects are normally created by parseRelation function, which is not intended to be called by user directly

Slots

entry1ID:

The entryID of the first KEGGNode

entry2ID:

The entryID of the second KEGGNode

type:

The type of the relation, see getType-methods

subtype:

The subtype(s) of the edge, a list of KEGGEdgeSubType

Methods

getEntryID

signature(obj = "KEGGEdge"): Get entryIDs of the edge in the order specified by the direction of the edge

getType

signature(object = "KEGGEdge"): Get the relation type

getName

signature(object = "KEGGEdge"): Get the names of edges in the convention of Rgraphviz, 'node1~node2'

show

signature(object = "KEGGEdge"): Show method

Author(s)

Jitao David Zhang mailto:jitao_david.zhang@roche.com

References

KGML Manual http://www.genome.jp/kegg/docs/xml/

See Also

KEGGNode-class

Examples

mapfile<- system.file("extdata/map00260.xml", package="KEGGgraph")
maptest <- parseKGML(mapfile)

x <- edges(maptest)[[1]]
class(x)

## examples to extract information from KEGGEdge
getName(x)
getEntryID(x)

getType(x)
getSubtype(x)

subtype <- getSubtype(x)[[1]]
getName(subtype)

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/KEGGEdge-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: KEGGEdge-class
> ### Title: Class 'KEGGEdge'
> ### Aliases: KEGGEdge-class show,KEGGEdge-method entryID<-,KEGGEdge-method
> ###   getName,KEGGEdge-method
> ### Keywords: classes
> 
> ### ** Examples
> 
> mapfile<- system.file("extdata/map00260.xml", package="KEGGgraph")
> maptest <- parseKGML(mapfile)
> 
> x <- edges(maptest)[[1]]
> class(x)
[1] "KEGGEdge"
attr(,"package")
[1] "KEGGgraph"
> 
> ## examples to extract information from KEGGEdge
> getName(x)
[1] "17~34"
> getEntryID(x)
Entry1ID Entry2ID 
    "17"     "34" 
> 
> getType(x)
[1] "ECrel"
> getSubtype(x)
$subtype
  [ Subtype name ]: compound
  [ Subtype value ]: 96

> 
> subtype <- getSubtype(x)[[1]]
> getName(subtype)
[1] "compound"
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>