loadNetwork.sif: Load network from Cytoscape sif file

Description Usage Arguments Value Author(s) Examples

View source: R/IO.R

Description

The function loads a network from a Cytoscape sif file. Edge attributes are provided in the ea.file or vector of ea.files. The node attributes are provided the same way. For other formats see read.graph in the igraph package.

Usage

1
loadNetwork.sif(sif.file, na.file, ea.file, format=c("graphNEL", "igraph"), directed=FALSE)

Arguments

sif.file

Cytoscape sif file, containing the network.

na.file

File or vector of file with Cytoscape node attibutes.

ea.file

File or vector of file with Cytoscape edge attibutes.

format

Format of output graph, either graphNEL or igraph.

directed

Boolean value for directed or undirected graph.

Value

Graph with loaded attributes.

Author(s)

Daniela Beisser

Examples

1
2
3
4
5
6
7
8
## Not run: lib <- file.path(.path.package("BioNet"), "extdata") 
# load interaction file, node attribute file with a node weight of 2 for each node and the edge attribute file with a edge weight of 1 for each edge
network <- loadNetwork.sif(sif.file=file.path(lib,"cytoscape.sif"), na.file=file.path(lib,"n.weight.NA"), ea.file=file.path(lib,"weight.EA"), format="graphNEL", directed=FALSE);
network;
nodeData(network);
edgeData(network);

## End(Not run)

assaron/BioNet documentation built on Sept. 18, 2020, 12:02 a.m.