Up: Component summary Component

MDSPlot

Plots multidimensional scaling of numeric data. An optional SampleGroupTable can be given to color groups differently in the plot or to use only a subset of columns from the input data.

Version 2.2
Bundle tools
Categories Quality Control Latex
Authors Kari Nousiainen (Kari.Nousiainen@Helsinki.FI), Viljami Aittomaki (viljami.aittomaki@helsinki.fi)
Issue tracker View/Report issues
Requires R ; scatterplot3d (R-package) ; cluster (R-package)
Source files component.xml MDSPlot.r
Usage Example with default values

Inputs

Name Type Mandatory Description
expr Matrix Mandatory Numeric data matrix
groups SampleGroupTable Optional Optional table that maps expr columns (i.e. samples) to groups. Only samples in valid groups are used for computing and plotting MDS. Groups are indicated with color. A sample may be included in several groups, but is used only once for computing MDS. Groups of type ratio are ignored.

Outputs

Name Type Description
mdsCoOrdinates Matrix The co-ordinates of the samples after multidimensional scaling.
report Latex A LaTeX document containing a scatter plot of the scaled samples (if plotting is possible).

Parameters

Name Type Default Description
caption string "Multidimensional Scaling" Caption for the LaTeX figure.
cex float 1.0 Scaling factor for point symbols or sample names in plot.
colorFunction string "" Custom function for colors. For example c('red', 'blue', 'green'), rainbow(3) or rainbow(%d), in which %d is replaced with the number of groups plotted. Default colors start from black and continue with colors from the rainbow function.
dimensions int 2 Number of dimensions the data is scaled into.
pagebreak boolean false If true, the output LaTeX report starts with a page break.
pch int 1 Defines point symbol for plotting. See help for points function in R. Ignored if plotNames is true.
plotLegend boolean true If true, a group legend is plotted, else no legend is shown. Ignored if groups is not present.
plotNames boolean true If true, sample names are plotted in the scatter plot, else symbols defined by pch are used.
sectionTitle string "Multidimensional Scaling" Title of the LaTeX section. If empty, no section statement is written.
sectionType string "subsection" Type of LaTeX section. One of section, subsection or subsubsection. If empty, no section statement is written.
width float 16 Width of plot figure in cm.

Test cases

Test case Parameters IN
expr
IN
groups
OUT
mdsCoOrdinates
OUT
report
case1 (missing) expr (missing) mdsCoOrdinates report
case2-groups properties expr groups mdsCoOrdinates report

caption=Ducks sporting,
cex=1.2,
colorFunction=rainbow(%d),
dimensions=3,
pagebreak=true,
pch=2,
plotNames=false,
sectionTitle=Ducks in MDS,
sectionType=subsubsection,
width=12

case3-similarSamples properties expr (missing) mdsCoOrdinates report

dimensions=3,
plotLegend=false

case4-failIdenticalSamples (missing) expr (missing) (expecting failure) (expecting failure)
case5-failTooFewSamples properties expr groups (expecting failure) (expecting failure)

dimensions=2


Generated 2019-02-08 07:42:18 by Anduril 2.0.0