Learn R Programming

PathwaySpace (version 1.0.2)

silhouetteMapping,PathwaySpace-method: Decorating PathwaySpace Images with Graph Silhouettes

Description

silhouetteMapping constructs an image baseline used to outline the graph layout in a PathwaySpace image.

Usage

# S4 method for PathwaySpace
silhouetteMapping(
  ps,
  baseline = 0.01,
  pdist = 0.05,
  fill.cavity = TRUE,
  verbose = TRUE
)

Value

A preprocessed PathwaySpace class object.

Arguments

ps

A PathwaySpace class object.

baseline

A fraction (in [0,1]) of the signal scale of a PathwaySpace image. This term only affects the image baseline projection, which represents a silhouette of the graph's layout outlined in the resulting image. When baseline = 0 (i.e. lower level of the signal scale), the baseline will extend over the entire image space, so no silhouette will be visible.

pdist

A term (in [0,1]) determining a distance unit for the signal decay function. This distance will affect the extent over which the convolution operation projects the image baseline.

fill.cavity

A single logical value specifying to fill cavities in the silhouette mask (when verbose=TRUE) or not (when verbose=FALSE).

verbose

A single logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE).

Author

Mauro Castro and TCGA Network.

See Also

circularProjection

Examples

Run this code
# Load a demo igraph
data('gtoy1', package = 'RGraphSpace')

# Create a new PathwaySpace object
ps <- buildPathwaySpace(gtoy1, nrc = 100)
# note: adjust 'nrc' to increase image resolution

# Set '1s' as vertex signal
vertexSignal(ps) <- 1

# Map graph silhouette
ps <- silhouetteMapping(ps, pdist = 0.1)

Run the code above in your browser using DataLab