Learn R Programming

stringgaussnet (version 1.1)

addFactorGraphsToCytoscape:

Add FactorNetworks object to Cytoscape

Description

This function allows to import an object of class FactorNetworks into a Cytoscape session.

Usage

addFactorGraphsToCytoscape(FactorNets, Name=deparse(substitute(FactorNets)), LayoutNames=rep("force-directed",length(FactorNets)), StyleNames=sapply(FactorNets,function(x) class(x[["Network"]])), port.number=1234)

Arguments

FactorNets

An object of class FactorNetworks

Name

The name of the added network in each collection

LayoutNames

The layout name to display the network in Cytoscape. By default it is "force-directed".

StyleNames

The style name to display the network in Cytoscape. We advice you to use addNetworkStyle() before this function. By default it is the network object class.

port.number

The local port number used by cyREST plugin to communicate with Cytoscape. By default it uses 1234.

Details

This function creates a collection for each level of factor, and adds the corresponding network in this collection. Cytoscape must be running during the use of this function.

See Also

checkCytoscapeRunning, addNetworkStyle, FactorNetworks.default

Examples

Run this code
# data(SpADataExpression)
# data(SpADEGenes)
# data(SpASamples)
# SpAData<-DEGeneExpr(t(SpADataExpression),SpADEGenes)

# StatusFactor<-paste(SpASamples$status,SpASamples$b27,sep=".")
# names(StatusFactor)=SpASamples$chipnum

# NodesForSIMoNe<-rownames(SpADEGenes)[1:17]
# GaussianSpAData<-DEGeneExpr(t(SpADataExpression[NodesForSIMoNe,]),SpADEGenes[NodesForSIMoNe,])

# GlobalSIMoNeNetNF<-getSIMoNeNet(GaussianSpAData)
# GlobalSIMoNeNet<-FilterEdges(GlobalSIMoNeNetNF,0.4)

# StatusFactorSIMoNeNet<-FactorNetworks(GaussianSpAData,StatusFactor,"SIMoNe")
# StatusFactorSIMoNeNet<-FilterEdges(StatusFactorSIMoNeNet,0.4)

# resetCytoscapeSession()
# addNetworkStyle("SIMoNeNet",class(GlobalSIMoNeNet),points.size.map="P.Value",
#	points.fill.map="logFC")
# addFactorGraphsToCytoscape(StatusFactorSIMoNeNet)

Run the code above in your browser using DataLab