SourceSet (version 0.1.1)

easyLookSource: Easy look results

Description

The function easyLookSourcee allows to summarize the results obtained from the sourceSet function through a heatmap, using ggplot library.

Usage

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")

Arguments

sourceObj

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

name.graphs

the graphs names to be visualized. Default value is names(sourceObj)

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

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 str.split character that doesn't exceed subname.variable

subname.graph

number of characters of the graph names labels to show. The function cuts the name at the first str.split character that doesn't exceed subname.variable

maxnum.variable

maximal number of variables to include in the plot. The variables are sorted internally and only the first maxnum.variable are be plotted.

maxnum.graph

maximal number of graphs to include in the plot. The graphs are sorted internally and only the first maxnum.variable are be plotted.

title

overall title of the plot

subtitle

subtitle of the plot

coord.equal

if TRUE, forces the scale coordinate system to be equal for the y and x axis. See also coord_fixed

coord.flip

if TRUE, flips cartesian coordinates so that horizontal becomes vertical, and vertical, horizontal. Default option sets to x axis the variables, and to the y axis the graphs. See also coord_flip

strsplit.variable

character containing regular expression to use for cut varibale labels to be shown. More details in subname.variable and subname.variable argument descriptions

strsplit.graph

character containing regular expression to use for cut graph labels to be shown. More details in subname.variable and subname.variable argument descriptions

col.primary

cell color for the variables responsable of primary dysregulation

col.secondary

cell color for the variables responsable of secondary dysregulation

Details

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.

See Also

sourceSet, sourceSankeyDiagram

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab