Learn R Programming

ToPASeq (version 1.6.0)

graphNEL2Pathway: Function to coerce a graphNEL to a Pathway

Description

The function coerces a graphNEL to a Pathway. It attempts to recover the edge types from "edgeType" attribute of edgeData. The result contains only the edge types present in the graph. If the edgeData do not contain this attribute, then "process(indirect effect)" is used in order to preserve directionality.

Usage

graphNEL2Pathway(graph, name = "pathway", ident = "unknown", database = "unknown", species = "unknown", date = NULL)

Arguments

graph
A graphNEL object to be coerced.
name
A character, name of the pathway. Defaults to "pathway"
ident
A character, type of the identificators, e.g "gene symbol"
database
A character, the name of the database the topology comes from
species
A character, the species to which the topology belong
date
A date, the date the topology was created

Value

A coerced Pathway

Examples

Run this code
pathway<-pathways("hsapiens","kegg")[[1]]
pathway<-pathwayGraph(pathway)
pathway
graphNEL2Pathway(pathway)

set.seed(123)
rg <- randomEGraph(LETTERS[1:20], edges = 30)
p<-graphNEL2Pathway(rg)
p
head(edges(p))

Run the code above in your browser using DataLab