View source: R/mainFunctions.R
sourceUnionCytoscape | R Documentation |
The function, thanks to the connection with the Cytoscape software, allows the user to create the graphical union induced by the source sets of a collection of graphs to be visualized in a unique session, while documenting interesting findings.
sourceUnionCytoscape( sourceObj, name.graphs = names(sourceObj), collection.name = "SourceSetUnion", network.name = "UnionSourceSetsGraph", map.name.variable = NULL, method = "bonferroni", complete.edges = TRUE, return.unionGraph = FALSE )
sourceObj |
a |
name.graphs |
the names of the graphs to be visualized. Default value is |
collection.name |
name of the collection of graphs displayed in Cytoscape. |
network.name |
name of the resulting union graph. |
map.name.variable |
a list of customized labels to be associated with the names of the genes. Each list element must contain only one value (i.e. the new label), and the name of each element must be associated with the names of the genes given as input to the |
method |
correction method for p-values calculated on graphs. The adjustment methods allowed are: |
complete.edges |
if |
return.unionGraph |
if |
The visual node attributes size and fill color are defined in a dynamic manner through a visual mapping based on the indices provided by the infoSource
function (automatically uploaded in the bottom panel - right side).
A continous mapper between sub.n.source
attribute and size is applied: higher values are represented with bigger nodes.
On the other hand, a color gradient mapper between fill node color and relevance
is adopted: higher values are highlighted with darker blue color.
The edges connecting nodes belonging to the graph induced by the source set of each graph are represented by a solid line; while, the edges that connect two variables linked in the union of the graphs, but not within the same source set of a single graph, have dotted lines (supplied only if complete.edges=TRUE
).
The default style can be changed manually either within Cytoscape (for further information see manual) or within an R package r2cytoscape
through network SUID returned by the sourceCytoscape
function (for further details see manual).
It is also possible to call the sourceCytoscape function multiple times, with all the graphs being visualized in a unique session within a collection specified by collection.name.
The function returns an interactive session in Cytoscape.
The function use the r2cytoscape
package to connect to Cytoscape from R using CyREST. r2cytoscape
can be downloaded from:
Bioconductor: biocLite("r2cytoscape")
;
GitHub: install_github("cytoscape/r2cytoscape")
.
To enable the display function to work properly, three simple steps are required:
Download Cytoscape (version 3.3 or later);
Complete installation wizard;
Launch Cytoscape (before calling the functions).
sourceSet
, sourceCytoscape
, r2cytoscape
## Load the SourceSetObj obtained from the source set analysis of ALL dataset # see vignette for more details print(load(file=system.file("extdata","ALLsourceresult.RData",package = "SourceSet"))) class(results.all) ## NB: Remember to launch cytoscape before running the following commands # Create two collections of pathways to visualize the results graph.signaling<-names(results.all)[grep("signaling",names(results.all))] graph.other<-setdiff(names(results.all),graph.signaling) ## Signaling collection if(interactive()){ cytoID.signaling.union<-sourceUnionCytoscape(results.all, name.graphs =graph.signaling ,collection.name ="SignalingPathway", network.name ="SignalingUnion") } ## Other collection if(interactive()){ cytoID.other.union<-sourceUnionCytoscape(results.all , name.graphs =graph.other,collection.name ="OtherPathway" , network.name ="OtherUnion") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.