Usage
networkPlot(gsaRes, class, direction, adjusted=FALSE, significance=0.001, geneSets=NULL, overlap=1, lay=1, label="names", cexLabel=0.9, ncharLabel=25, cexLegend=1, nodeSize=c(10,40), edgeWidth=c(1,15), edgeColor=NULL, scoreColors=NULL, main)
Arguments
gsaRes
an object of class GSAres
, as returned from runGSA()
or an object returned from runGSAhyper()
.
class
a character string determining the p-values of which directionality class that should be used as significance information for the plot. Can be one of "distinct"
, "mixed"
, "non"
. Has to be "non"
if the result from runGSAhyper()
is used.
direction
a character string giving the direction of regulation, can be either "up"
, "down"
or "both"
(for pValue="distinct"
only).
adjusted
a logical, if adjusted p-values should be used, or not. Note that if runGSA
was run with the argument adjMethod="none"
, the adjusted p-values will be equal to the original p-values.
significance
the significance cut-off that determines which gene sets are included in the plot. Defaults to 0.001.
geneSets
a character vector of gene set names, to be included in the plot. Defaults to NULL
, but if given, the argument significance
will not be used.
overlap
a positive numerical. Determines the smallest number of sharing genes between two gene-sets that is needed in order to draw a line/edge between the gene-sets. Defaults to 1.
lay
a numerical between 1-5, or a layout function (see layout
in the igraph
package). 1-5 sets the layout to one of the five default layout for the network plot.
label
a character string, either "names"
,"numbers"
, "numbersAndSizes"
or "namesAndSizes"
, determining the labels used for the nodes. The names are the gene set names, numbers is an arbritary numbered list of the gene sets used in the plot connected to the named list returned by the funtion. Sizes are the gene set sizes, e.g. the number of genes.
cexLabel
the text size of the node labels.
ncharLabel
the number of characters to include in the node labels.
cexLegend
the text size of the legend.
nodeSize
a numerical vector of length 2 giving the maximum and minimum node sizes. The node size represents the size of the gene set, and all values will be scaled to the given interval.
edgeWidth
a numerical vector of length 2 giving the maximum and minimum edge widths. The edge width represents the number of shared genes between two gene sets, and all values will be scaled to the given interval.
edgeColor
a character vector giving the colors to use for increasing edge width. Can also be set to a single color. Defaults to a gray-scale.
scoreColors
a character vector giving the colors from which the gradient used for node coloring will be created. In the case of pValue="distinct"
and direction="both"
the first half of the vector will be used for the up-regulated gene sets and the second part will be used for the down-regulated gene sets.
main
an optional character vector setting the title of the plot.