Description Usage Arguments Details Value Author(s) See Also Examples
Run principal component analysis, correspondence analysis or non-symmetric correspondence analysis on gene expression data
1 2 3 |
dataset |
Training dataset. A |
classvec |
A |
type |
Character, "coa", "pca" or "nsc" indicating which data transformation is required. The default value is type="coa". |
ord.nf |
Numeric. Indicating the number of eigenvector to be saved, by default, if NULL, all eigenvectors will be saved. |
trans |
Logical indicating whether 'dataset' should be transposed before ordination. Used by BGA
Default is |
x |
An object of class |
arraycol, genecol |
Character, colour of points on plot. If arraycol is NULL,
arraycol will obtain a set of contrasting colours using |
nlab |
Numeric. An integer indicating the number of variables (genes) at the end of axes to be labelled, on the gene plot. |
axis1 |
Integer, the column number for the x-axis. The default is 1. |
axis2 |
Integer, the column number for the y-axis, The default is 2. |
genelabels |
A vector of variables labels, if |
arraylabels |
A vector of variables labels, if |
... |
further arguments passed to or from other methods. |
ord
calls either dudi.pca
, dudi.coa
or dudi.nsc
on the input dataset. The input format of the dataset
is verified using array2ade4
.
If the user defines microarray sample groupings, these are colours on plots produced by plot.ord
.
Plotting and visualising bga results:
2D plots:
plotarrays
to draw an xy plot of cases (\$ls).
plotgenes
, is used to draw an xy plot of the variables (genes).
3D plots:
3D graphs can be generated using do3D
and html3D
.
html3D
produces a web page in which a 3D plot can be interactively rotated, zoomed,
and in which classes or groups of cases can be easily highlighted.
1D plots, show one axis only:
1D graphs can be plotted using graph1D
. graph1D
can be used to plot either cases (microarrays) or variables (genes) and only requires
a vector of coordinates (\$li, \$co)
Analysis of the distribution of variance among axes:
The number of axes or principal components from a ord
will equal nrow
the number of rows, or the
ncol
, number of columns of the dataset (whichever is less).
The distribution of variance among axes is described in the eigenvalues (\$eig) of the ord
analysis.
These can be visualised using a scree plot, using scatterutil.eigen
as it done in plot.ord
.
It is also useful to visualise the principal components from a using a ord
or principal components analysis
dudi.pca
, or correspondence analysis dudi.coa
using a
heatmap. In MADE4 the function heatplot
will plot a heatmap with nicer default colours.
Extracting list of top variables (genes):
Use topgenes
to get list of variables or cases at the ends of axes. It will return a list
of the top n variables (by default n=5) at the positive, negative or both ends of an axes.
sumstats
can be used to return the angle (slope) and distance from the origin of a list of
coordinates.
A list with a class ord
containing:
ord |
Results of initial ordination. A list of class "dudi" (see |
fac |
The input classvec, the |
Aedin Culhane
See Also dudi.pca
, dudi.coa
or dudi.nsc
, bga
,
1 2 3 4 5 6 7 8 9 10 11 | data(khan)
if (require(ade4, quiet = TRUE)) {
khan.coa<-ord(khan$train, classvec=khan$train.classes, type="coa")
}
khan.coa
plot(khan.coa, genelabels=khan$annotation$Symbol)
plotarrays(khan.coa)
# Provide a view of the first 5 principal components (axes) of the correspondence analysis
heatplot(khan.coa$ord$co[,1:5], dend="none",dualScale=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.