plot.EvoWeb: Plot predictions in a EvoWeb object

View source: R/EvoWeb-class.R

plot.EvoWebR Documentation

Plot predictions in a EvoWeb object

Description

EvoWeb objects are outputted from predict.EvoWeaver.

This function plots the predictions in the object using a force-directed embedding of connections in the adjacency matrix.

This function is still a work in progress.

Usage

## S3 method for class 'EvoWeb'
plot(x, NumSims=10,
      Gravity=0.05, Coulomb=0.1, Connection=5,
      MoveRate=0.25, Cutoff=0.2, ColorPalette=topo.colors,
      Verbose=TRUE, ...)

Arguments

x

A EvoWeb object. See EvoWeb

NumSims

Number of iterations to run the model for.

Gravity

Strength of Gravity force. See 'Details'.

Coulomb

Strength of Coulomb force. See 'Details'.

Connection

Strength of Connective force. See 'Details'.

MoveRate

Controls how far each point moves in each iteration.

Cutoff

Cutoff value; if abs(val) < Cutoff, that Connection is shrunk to zero.

ColorPalette

Color palette for graphing. Valid inputs are any palette available in palette.pals(). See palette for more info.

Verbose

Logical indicating whether to print progress bars and messages. Defaults to TRUE.

...

Additional parameters for consistency with generic.

Details

This function plots the EvoWeb object using a force-directed embedding. This embedding has three force components:

  • Gravity Force: Attractive force pulling nodes towards (0,0)

  • Coulomb Force: Repulsive force pushing close nodes away from each other

  • Connective Force: Tries to push node connections to equal corresponding values in the adjacency matrix

The parameters in the function are sufficient to get an embedding, though users are welcome to try to tune them for a better visualization. This function is meant to aid with visualization of the adjacency matrix, not for concrete analyses of clusters.

The function included in this release is early stage. Next release cycle will update this function with an updated version of this algorithm to improve plotting, visualization, and runtime.

Value

No return value; creates a plot in the graphics window.

Author(s)

Aidan Lakshman ahl27@pitt.edu

See Also

predict.EvoWeaver

EvoWeb

Examples

exData <- get(data("ExampleStreptomycesData"))
ew <- EvoWeaver(exData$Genes)

# Subset isn't necessary but is faster for a working example
# Same w/ method='ExtantJaccard'
evoweb <- predict(ew, Method='ExtantJaccard', Subset=1:50)

plot(evoweb)

npcooley/SynExtend documentation built on Nov. 15, 2024, 3:02 p.m.