sourceUnionCytoscape: Visualize in Cytoscape the graphical union induced by the...

Description Usage Arguments Details Note See Also Examples

View source: R/mainFunctions.R

Description

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.

Usage

1
2
3
4
5
sourceUnionCytoscape(sourceObj, name.graphs = names(sourceObj),
  collection.name = "SourceSetUnion",
  network.name = "UnionSourceSetsGraph", map.name.variable = NULL,
  method = "bonferroni", complete.edges = TRUE,
  return.unionGraph = FALSE)

Arguments

sourceObj

a SourceSetObj objects, i.e. the output of the sourceSet function.

name.graphs

the names of the graphs to be visualized. Default value is names(sourceObj). NOTE: even if a subset of graphs are selected in name.graphs, the returned statistics are always calculated on the entire collection in the sourceObj argument.

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 sourceSet function (column names of data input argument). If a label is not mapped, the original name is used.

method

correction method for p-values calculated on graphs. The adjustment methods allowed are: fdr (default), holm, hochberg, hommel, bonferroni, BH, BY or none. For more details refer to p.adjust.

complete.edges

if TRUE, the graphs selected in name.graphs are merged and the induced graph of the variables that appear at least in a source set is returned. if FALSE, the subgraph induced by the variables in the source set of each graph specified in name.graphs is found, and their union is returned.

return.unionGraph

if TRUE, the function returns the data frame of the edges of the resulting union graph, together with information about the variables obtained internally through the infoSource function.

Details

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.

Note

The function use the r2cytoscape package to connect to Cytoscape from R using CyREST. r2cytoscape can be downloaded from:

To enable the display function to work properly, three simple steps are required:

See Also

sourceSet, sourceCytoscape, r2cytoscape

Examples

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

cytoID.signaling.union<-sourceUnionCytoscape(results.all,
      name.graphs =graph.signaling ,collection.name ="SignalingPathway",
      network.name ="SignalingUnion")

## Other collection

cytoID.other.union<-sourceUnionCytoscape(results.all ,
      name.graphs =graph.other,collection.name ="OtherPathway" ,
      network.name ="OtherUnion")

SourceSet documentation built on Oct. 30, 2019, 9:38 a.m.