intersectSankey {EnrichIntersect}R Documentation

Plot Sankey diagram for intersecting sets

Description

Plot Sankey diagram for intersecting set through an array

Usage

intersectSankey(
  x,
  out.fig = NULL,
  color = NULL,
  step.names = c("Levels", "Variables", "Tasks"),
  fontSize = c(20, 13, 20),
  nodePadding = 11,
  nodeWidth = 5,
  margin = list(right = 180),
  ...
)

Arguments

x

an array for constructing intersecting set

out.fig

print the figure into "html", "pdf" or "png" file. Default is NULL with R graphics device

color

a vector of colors corresponding to individual tasks

step.names

names of the three dimensions of the array x, i.e. names of multiple levels, intermediate variables and tasks. Default is c("Levels","Variables","Tasks"). If step.names=NULL, it will not show the names

fontSize

a value or vector of three values. If it is one value, it is the font size for all labels. But a vector of three values specifies the font size of the labels in the left, middle and right, respectively. Default is c(20,10,20)

nodePadding

numeric essentially influences the width height

nodeWidth

numeric width of each node

margin

an integer or a named list/vector of integers for the plot margins

...

graphics parameters to be passed to sankeyNetwork() from R package networkD3

Value

An object of a D3 JavaScript intersecting Sankey diagram for visualising associations based on the input array.

Examples

# Data set 'cancers_genes_drugs' is an array with association scores between 56 genes (1st
# dimension), three cancer types (2nd dimension) and two drugs (3rd dimension)
data(cancers_genes_drugs, package = "EnrichIntersect")

intersectSankey(cancers_genes_drugs, step.names = c("Cancers", "Genes", "Drugs"))


[Package EnrichIntersect version 0.7 Index]