networkSimplify: Simplify sif network into igraph network graph object

Description Usage Arguments Details Value Author(s) Examples

View source: R/networkSimplify.R

Description

This function removes duplicated edges and loops to create an igraph graph object from tab delimited sif formatted network file.

Usage

1
networkSimplify(sifNetwork, directed = FALSE)

Arguments

sifNetwork

A file with sif network format (There are three columns in the file separated by tab, nodeA interactionType nodeB )

directed

Logical, treat network as directed or undirected graph

Details

For undirected graph, networkSimplify removes duplicated edges and loops to create an igraph graph object from tab delimited sif formatted network file.

For directed graph, networkSimplify selects the first edge and removes the rest duplicated edges and loops to create an igraph graph object from tab delimited sif formatted network file.

Value

a igraph graph object

Author(s)

Eric Minwei Liu, emliu.research@gmail.com

Examples

1
2
3
4
data(netbox2010)

sifNetwork <- netbox2010$network
graphReduced <- networkSimplify(sifNetwork, directed = FALSE)

netboxr documentation built on Nov. 8, 2020, 5:01 p.m.