Plot gene-set network
plot_gs_network(
normalisedScores,
gsTopology,
colorBy = c("robustZ", "pvalue"),
foldGSname = TRUE,
foldafter = 2,
layout = "fr",
edgeAlpha = 0.8,
up_col = "brown3",
down_col = "steelblue3",
scale_edgeWidth = 10,
scale_nodeSize = 15,
nodeShape = 16,
color_lg = TRUE,
color_lg_title = NULL,
lb_size = 3,
lb_color = "black",
plotIsolated = FALSE
)A dataframe as described in the details section
List of pathway topology matrices generated using function retrieve_topology
Choose to color nodes either by "robustZ" or "pvalue". A column must exist in the normalisedScores for the chosen parameter
logical(1). Should long gene-set names be folded into two lines
The number of words after which gene-set names should be folded. Defaulted to 2
The layout algorithm to apply
Transparency of edges
The color to label activated gene-sets. Only applicable if colorBy is set to be "robustZ"
The color to label inhibited gene-sets. Only applicable if colorBy is set to be "robustZ"
Parameter for scaling edge width. Defaulted to 10. Higher numbers reduce all edge width
Parameter for scaling node size. Defaulted to 15. Higher numbers decreases all node sizes
The shape to use for nodes
logical(1). Should color legend be shown
Title for the color legend
Size of node text labels
Color of node text labels
logical(1). If nodes not connected to any other node should be plotted. Default to FALSE
A ggplot2 object
load(system.file("extdata", "gsTopology.rda", package = "sSNAPPY"))
load(system.file("extdata", "normalisedScores.rda", package = "sSNAPPY"))
#Subset pathways significantly perturbed in sample R5020_N2_48
subset <- dplyr::filter(normalisedScores, adjPvalue < 0.05, sample == "R5020_N2_48")
# Color network plot nodes by robust z-score
plot_gs_network(subset, gsTopology,
colorBy = "robustZ", layout = "dh",
color_lg_title = "Robust Z-score")
# Color network plot nodes by p-values
plot_gs_network(subset, gsTopology, layout = "dh",
colorBy = "pvalue", color_lg_title = "P-value")