plotgenes {made4} | R Documentation |
Graph xy plot of variables but only label variables at ends of X and Y axes. Useful for graphing genes coordinates ($co) resulting from PCA or COA of microarray data.
plotgenes(dudivar, nlab = 10, axes1 = 1, axes2 = 2, varlabels = row.names(dudivar), boxes = TRUE, colpoints = "black", ...)
dudivar |
a data.frame or matrix with at least two
columns, containing x, y coordinates to be plotted |
nlab |
Numeric. An integer indicating the number of variables at ends of axes to be labelled |
axes1 |
An integer, the column number for the x-axis. Default is 1, so axes 1 is dudivar[,1] |
axes2 |
An integer, the column number for the y-axis. Default is 2, so axes 2 is dudivar[,2] |
varlabels |
A vector of variables labels. Default is row.names(dudivar) |
boxes |
A logical, indicating whether a box should be plotted surrounding each variable label. The default is TRUE. |
colpoints |
The colour of the points on the plot. The default is "black" |
... |
further arguments passed to or from other method |
plotgenes
calls the function genes
which return an index of the "top"
variables at the ends of the x and y axes.
If you wish to return a table or list of the top genes at
the end of an axis, use the function topgenes
.
An xy plot
plotgenes
plots variables using s.var
, which is a modified version
of s.label
.
Aedin Culhane
data(khan) if (require(ade4, quiet = TRUE)) { khan.bga<-bga(khan$train, khan$train.classes) } attach(khan.bga) par(mfrow=c(2,2)) s.var(bet$ls, col=as.numeric(khan$train.classes), clabel=0.8) plotgenes(bet$co, colpoints="red") plotgenes(bet$co, colpoints="red", varlabels=khan$annotation$Symbol) plotgenes(bet$co, colpoints="gray", varlabels=khan$annotation$Symbol, boxes=FALSE) s.groups(bet$ls, khan$train.classes, add.plot=TRUE, col=c(1:length(levels(khan$train.classes))) )