Learn R Programming

MetaPCA (version 0.1.4)

PlotPC2D: MetaPCA: Meta-analysis in the Dimension Reduction of Genomic data

Description

2D PCA plots.

Usage

PlotPC2D(coord, drawObjects=TRUE, drawEllipse=FALSE, dataset.name=NULL, pctInfo=NULL, main=NULL, sub=NULL, xlab=NULL, ylab=NULL, newPlot=TRUE, .points.size=1, .class=rownames(coord), .class.order=NULL, .class.color=NULL, .class2=NULL, .class2.order=NULL, .class2.shape=NULL, .annotation=TRUE, .legend=c("bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right", "center"))

Arguments

coord
2D Coordinates matrix of objects. Rows are objects and columns are coordinates.
drawObjects
Whether to draw objects as points.
drawEllipse
Whether to draw ellipses estimated from objects 2D distribution.
dataset.name
Name to be displayed as a part of title.
pctInfo
Explained percentage of variance by each PC.
main
Main title.
sub
Sub title.
xlab
Label for x-axis.
ylab
Label for y-axis.
newPlot
Whether to draw a plot in the new frame.
.points.size
Size of objects' points.
.class
Object's class label such as disease classification.
.class.order
The order of class representation.
.class.color
The color of class representation.
.class2
The second class label of each object such as study name.
.class2.order
The order of 2nd class representation.
.class2.shape
The shape of 2nd class representation.
.annotation
Whether to present annotation such as x,y axis labels, legend, or titles.
.legend
Location of legend in a plot.

Value

NA. A PCA plot is drawn.

Details

References

Dongwan D. Kang and George C. Tseng. (2011) Meta-PCA: Meta-analysis in the Dimension Reduction of Genomic data.

See Also

Examples

Run this code
## Not run: 
# 	#4 prostate cancer data which have three classes: normal, primary, metastasis
# 	data(prostate)
# 	metaPC <- MetaPCA(prostate, method="Angle", doPreprocess=FALSE)
# 	#Plotting 4 data in the same space with ellipses overlayed!
# 	coord <- foreach(dd=iter(metaPC$x), .combine=rbind) %do% dd$coord
# 	PlotPC2D(coord[,1:2], drawEllipse=T, dataset.name="Prostate", .class.order=c("Metastasis","Primary","Normal"), 
# 			.class.color=c('red','#838383','blue'), .annotation=T, newPlot=T,
# 			.class2=rep(names(metaPC$x), times=sapply(metaPC$x,function(x)nrow(x$coord))), 
# 			.class2.order=names(metaPC$x), .points.size=1)
# 
# ## End(Not run)

Run the code above in your browser using DataLab