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 can be returned 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 being targetting for additional functionality in later releases.

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

Integer; Number of iterations to run the model for.

Gravity

Numeric; Strength of Gravity force. See 'Details'.

Coulomb

Numeric; Strength of Coulomb force. See 'Details'.

Connection

Numeric; Strength of Connective force. See 'Details'.

MoveRate

Numeric; Controls how far each point moves in each iteration.

Cutoff

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

ColorPalette

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

Verbose

Logical; Determines if status messages and progress bars should be displayed while running.

...

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 June 8, 2025, 5:24 a.m.