addNetworkStyle: Add network style to Cytoscape

Description Usage Arguments Details See Also Examples

View source: R/addNetworkStyle.R

Description

This function allows to add pre-defined styles to properly display networks from package stringgaussnet in Cytoscape.

Usage

1
2
3
addNetworkStyle(style.name, style.class, Annotations = F, points.size.map = "PValue",
	min.points.value = 0.05, max.points.value = 0, points.fill.map = "FC",
	min.points.fill = -2, max.points.fill = 2, port.number = 1234)

Arguments

style.name

The name you want to give to the style

style.class

The class of network used for edge mapping. Can be either "STRINGNet", "ShortPathSTRINGNet", "SIMoNeNet" or "WGCNANet". It depends on the class of network you wish to import.

Annotations

Does the style must include gene annotations? It depends if you wanted to add annotations during your network construction.

points.size.map

Node attribute for which the node size mapping is done. By default it is "PValue", which is the p-value from DE genes analysis results.

min.points.value

Maximum value of node attribute for which the size is minimal. By default it is 0.05.

max.points.value

Minimum value of node attribute for which the size is maximal. By default it is 0.

points.fill.map

Node attribute for which the node color mapping is done. By default it is the fold change.

min.points.fill

Minimum value for which the color mapping is done. By default it is -2.

max.points.fill

Maximum value for which the color mapping is done. By default it is 2.

port.number

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

Details

This function only adds a pre-defined style to the Cytoscape session, and does not import a network object. Cytoscape must be running with the plugin cyREST installed. This is much advised to use this function before importing your networks into the Cytoscape session, excepted for addMultiGraphToCytoscape(). The node size mapping is inversely proportional to the selected attribute. This is in the aim to preferably see genes with lowest p-values. The node color is blue for under-expressed genes, and red for over-expressed genes, depending on the fold change in DE genes analysis results. The node mapping is common for all network classes in the stringgaussnet package, whereas the edge mapping is more specific.

See Also

addGraphToCytoscape, checkCytoscapeRunning, addSTRINGNetMappings, addShortPathSTRINGNetMappings, addSIMoNeNetMappings, addWGCNANetMappings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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)

# resetCytoscapeSession()
# addNetworkStyle("SIMoNeNet",class(GlobalSIMoNeNet),points.size.map="P.Value",
#	points.fill.map="logFC")
# NetId<-addGraphToCytoscape(GlobalSIMoNeNet)

stringgaussnet documentation built on May 29, 2017, 10:50 a.m.