SpatProtVis-class: Class 'SpatProtVis'

Description Usage Arguments Slots Methods Author(s) See Also Examples

Description

A class for spatial proteomics visualisation, that upon instantiation, pre-computes all defined visualisations. Objects can be created with the SpatProtVis constructor and visualised with the plot method.

The class is essentially a wrapper around several calls to plot2D that stores the dimensionality reduction outputs, and is likely to be updated in the future.

Usage

1
SpatProtVis(x, methods, dims, methargs, ...)

Arguments

x

An instance of class MSnSet to visualise.

methods

Dimensionality reduction methods to be used to visualise the data. Must be contained in plot2Dmethods (except "scree"). See plot2D for details.

dims

A list of numerics defining dimensions used for plotting. Default are 1 and 2. If provided, the length of this list must be identical to the length of methods.

methargs

A list of additional arguments to be passed for each visualisation method. If provided, the length of this list must be identical to the length of methods.

...

Additional arguments. Currently ignored.

Slots

vismats:

A "list" of matrices containing the feature projections in 2 dimensions.

data:

The original spatial proteomics data stored as an "MSnSet".

methargs:

A "list" of additional plotting arguments.

objname:

A "character" defining how to name the dataset. By default, this is set using the variable name used at object creation.

Methods

plot:

Generates the figures for the respective methods and additional arguments defined in the constructor. If used in an interactive session, the user is prompted to press 'Return' before new figures are displayed.

show:

A simple textual summary of the object.

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

See Also

The data for the individual visualisations is created by plot2D.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library("pRolocdata")
data(dunkley2006)
## Default parameters for a set of methods
## (in the interest of time, don't use t-SNE)
m <- c("PCA", "MDS", "kpca")
vis <- SpatProtVis(dunkley2006, methods = m)
vis
plot(vis)
plot(vis, legend = "topleft")

## Setting method arguments
margs <- c(list(kpar = list(sigma = 0.1)),
           list(kpar = list(sigma = 1.0)),
           list(kpar = list(sigma = 10)),
           list(kpar = list(sigma = 100)))
vis <- SpatProtVis(dunkley2006,
                   methods = rep("kpca", 4),
                   methargs = margs)
par(mfrow = c(2, 2))
plot(vis)

## Multiple PCA plots but different PCs
dims <- list(c(1, 2), c(3, 4))
vis <- SpatProtVis(dunkley2006, methods = c("PCA", "PCA"), dims = dims)
plot(vis)

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.