LoopFeature-class {RPointCloud}R Documentation

LoopFeature Objects For Visualizing Features That Define Loops

Description

The LoopFeature class is a tool for understanding and visualizing loops (topological circles) and the features that can be used to define and interpret them. Having found a (statistically significant) loop, we investigate a feature by computing its mean expression in sectors of a fixed width (usually 20 degrees) at a grid of angles around the circle (usually multiples of 15 degrees from 0 to 360). We model these data using the function

f(\theta) = A + B\sin(\theta) + C\cos(\theta).

We then compute the "fraction of unexplained variance" by dividing the residual sum of squares from this model by the total variance of the feature. Smaller values of this statistic are more likely to identify features that vary sytematically around the circle with a single peak and a single trough.

Usage

LoopFeature(circMeans)
## S4 method for signature 'LoopFeature,missing'
plot(x, y, ...)
## S4 method for signature 'LoopFeature,character'
plot(x, y, ...)
## S4 method for signature 'LoopFeature'
image(x, ...)

Arguments

circMeans

A matrix, assumed to be the output from a call to the angleMeans function. Columns are features and rows are angles.

x

A LoopFeature object.

y

A character vector; the set of features to plot.

...

The usual set of additional graphical parameters.

Value

The LoopFeature function constructs and returns an object of the LoopFeature class

The plot and image methods return (invisibly) the LoopFeature object that was their first argument.

Slots

data:

The input circMeans data matrix.

fitted:

A matrix that is the same size as data; the results of fitting a model for each feature as a linear combination of sine and cosine.

RSS:

A numeric vector; the residual sum of squares for each model.

V:

A numeric vector; the total variance for each feature.

Kstat:

A numeric vector, the unexplained variance statistic, RSS/V.

Methods

plot(x, y, ...):

For the selected features listed in y (which can be missing or "all" to plot all features), plots the fitted model as a curve along with the observed data.

image(x, ...)

Produce a 2D image of all the features, with each one scaled to the range [0,1] and with the rows ordered by where around the loop the maximum value occurs.

Author(s)

Kevin R. Coombes <krc@silicovore.com>

Examples

data(CLL)
view <- cmdscale(daisydist)
circular <- angleMeans(view, ripdiag, NULL, clinical)
lf <- LoopFeature(circular)
sort(lf@Kstat)
plot(lf, "Serum.beta.2.microglobulin")
opar <- par(mai = c(0.82, 0.2, 0.82, 1.82))
image(lf, main = "Clinical Factors in CLL")
par(opar)


[Package RPointCloud version 0.6.2 Index]