pwAdjMatrices {PathWave}R Documentation

PathWave adjacency matrices builder

Description

Builds a list of and -if wanted prints- adjacency matrices for a list of bipartite graphs.

Usage

pwAdjMatrices(reactionList, compoundList, printMatrices = FALSE, matrixType = "adjacency")

Arguments

reactionList List of reactions. See details.
compoundList List of compounds. See details.
printMatrices Built matrices are printed in the working directory (default FALSE). See details.
matrixType Printed matrices could be of type "adjacency" or "distance" (default "adjacency").

Details

reactionList
List of reactions as returned by pwKEGGxml() -> reactions. List of graph IDs. For every graph ID a vector of the reaction IDs is stored.
compoundList
List of compoundss as returned by pwKEGGxml() -> compounds. List of graph IDs. For every graph ID various list of reaction IDs are stored. Every reaction ID list has a vector of compounds connected to the specific reaction.
printMatrices
File names for printed matrices are built by concatenating pathway ID with ending ".matrix". First two numbers in file are number of nodes and length of shortest path.

Value

A list is returned:

pathway ID List of different pathways.
nNodes Integer, number of nodes (reactions) in graph.
iMax Integer, length of longest shortest path between all pairs of reactions in graph.
M Adjacency matrix for the pathway ID.
dist Distance matrix for the pathway ID.

Author(s)

Gunnar Schramm

See Also

See Also as pwKEGGxml,pwLPFiles

Examples

#read in actual KEGG xml files
kegg.ftp="ftp://ftp.genome.jp/pub/kegg/xml/organisms/hsa/"
keggXml=pwKEGGxml(kegg.ftp)

#build adjacency matrices
adjacencyMatrices=pwAdjMatrices(reactionList=keggXml$reactions,compoundList=keggXml$compounds,printMatrices=FALSE)

[Package PathWave version 1.0 Index]