Learn R Programming

lumi (version 2.24.0)

plotSampleRelation: visualize the sample relations

Description

plot the sample relations based on MDS or hierarchical clustering

Usage

plotSampleRelation(x, subset = NULL, cv.Th = 0.1, standardize = TRUE, method = c("cluster", "mds"), dimension = c(1, 2), color = NULL, main = NULL, pch=NULL, addLegend=TRUE, ...)

Arguments

x
a LumiBatch object, ExpressionSet object or a matrix with each column corresponding to a sample
subset
the subset probes used to determine the sample relations. If it is one number, then randomly selected "number" of probes will be used. If not provide, all the probes will be used.
cv.Th
the threshold of the coefficient of variance of probes used to select probes to estimate sample relations
standardize
standardize the expression profiles or not
method
"MDS" or "hierarchical clustering"
dimension
the principle components to visualize the MDS plot
color
the color for each sample during plot. Only support the "mds" method
main
the title of the plot
pch
use symbols instead of text to label the samples
addLegend
Whether to add legend to MDS (two-dimensional PCA) plot
...
Other parameters used by plot function.

Value

Invisibly return the hierarchical clustering results (if 'cluster' method used) or coordinates of the mds plot (if 'mds' method used) .

Details

Estimate the sample relations based on selected probes (based on large coefficient of variance (mean / standard variance)). Two methods can be used: MDS (Multi-Dimensional Scaling) or hierarchical clustering methods.

See Also

lumiQ, LumiBatch, , plot,ExpressionSet-method

Examples

Run this code

## load example data
data(example.lumi)

## plot the sample relations with MDS
## the color of sample is automatically set based on the sample type
plotSampleRelation(example.lumi, col=c('100US', '95US:5P', '100US', '95US:5P'))

## plot the sample relations with hierarchical clustering
plotSampleRelation(example.lumi, method='cluster')

Run the code above in your browser using DataLab