loadNetwork.sif {BioNet} | R Documentation

## Load network from Cytoscape sif file

### 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

    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

    ## 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)

[Package BioNet version 1.52.0 Index]