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

Description Usage Arguments Value Author(s) References Examples

View source: R/PlotPC2D.R

Description

2D PCA plots.

Usage

1
2
3
4
5
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.

Author(s)

Don Kang (donkang75@gmail.com) and George Tseng (ctseng@pitt.edu)

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

MetaPCA documentation built on May 2, 2019, 11:03 a.m.