Learn R Programming

stringgaussnet (version 1.1)

as.igraph.stringgaussnet: Convert stringgaussnet network into igraph

Description

This function converts any network object from the package stringgaussnet into an igraph object (package igraph).

Usage

## S3 method for class 'stringgaussnet':
as.igraph(x, ...)

Arguments

x
A network object from stringgaussnet package. Can be of class STRINGNet, ShortPathSTRINGNet, SIMoNeNet or WGCNANet.
...
Additional parameters. Not used here

Value

  • An igraph object with non-directed edges (can be multiple).

Details

This function is used in this package to convert a network into an igraph object, and then into a json object in order to import the network into Cytoscape. But you can use this function anywhere in your R script if you wish to manipulate your network with the igraph package.

See Also

addGraphToCytoscape

Examples

Run this code
data(SpADataExpression)
data(SpADEGenes)
SpAData<-DEGeneExpr(t(SpADataExpression),SpADEGenes)
NodesForSIMoNe<-rownames(SpADEGenes)[1:17]
GaussianSpAData<-DEGeneExpr(t(SpADataExpression[NodesForSIMoNe,]),SpADEGenes[NodesForSIMoNe,])
GlobalSIMoNeNet<-getSIMoNeNet(GaussianSpAData,AddAnnotation=FALSE)
iGraphSpAObj<-as.igraph.stringgaussnet(GlobalSIMoNeNet)

Run the code above in your browser using DataLab