View source: R/mainFunctions.R
easyLookSource | R Documentation |
The function easyLookSource
e allows to summarize the results obtained from the sourceSet
function through a heatmap, using ggplot
library.
easyLookSource( sourceObj, name.graphs = names(sourceObj), map.name.variable = NULL, label.variable = "Variable", label.graph = "Graph", subname.variable = 10, subname.graph = 20, maxnum.variable = 50, maxnum.graph = 30, title = "Source Set for each Pathway", subtitle = NULL, coord.equal = TRUE, coord.flip = FALSE, strsplit.variable = " ", strsplit.graph = " ", col.primary = "#324E7B", col.secondary = "#86A6DF" )
sourceObj |
a |
name.graphs |
the graphs names to be visualized. Default value is |
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 |
label.variable |
title of the variable axis |
label.graph |
title of the graph axis |
subname.variable |
number of characters of the variable names labels to show. The function cuts the name at the first |
subname.graph |
number of characters of the graph names labels to show. The function cuts the name at the first |
maxnum.variable |
maximal number of variables to include in the plot. The variables are sorted internally and only the first |
maxnum.graph |
maximal number of graphs to include in the plot. The graphs are sorted internally and only the first |
title |
overall title of the plot |
subtitle |
subtitle of the plot |
coord.equal |
if |
coord.flip |
if |
strsplit.variable |
character containing regular expression to use for cut varibale labels to be shown. More details in |
strsplit.graph |
character containing regular expression to use for cut graph labels to be shown. More details in |
col.primary |
cell color for the variables responsable of primary dysregulation |
col.secondary |
cell color for the variables responsable of secondary dysregulation |
The plot is composed of a matrix whose rows represent pathways (i.e., graphs) and columns represent genes (i.e., variables). Each cell i, j can take one of the following configurations:
2
: blue color, if the i-th gene is in the primary set of the j-th pathway
1
: light blue color, if the i-th gene is in the secondary set of the j-th pathway
0
: gray, if the i-th gene belongs to the j-th pathway
NA
: white, if the i-th gene does not belong to the j-th pathway
In the plot, the pathways are vertically ordered - top to bottom - according to the numbers of nodes in the source set. The genes are horizontally ordered (from left to right) based on the number of times they appear in a source set.
The function returns a ggplot
object.
sourceSet
, sourceSankeyDiagram
## 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) n.primary<-length(lapply(results.all,function(x) x$primarySet)) # show only genes that appear in at least one of the source sets of the investigated pathways easyLookSource(sourceObj=results.all, maxnum.variable = n.primary, label.variable = "Genes",label.graph = "Pathways") # flip coordinates easyLookSource(sourceObj = results.all,maxnum.variable = n.primary,coord.flip = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.