zoomPC: Sample-specific PCA visualizations

Description Usage Arguments Value See Also Examples

Description

Supporting PCA visualizations and sample-specific metadata including standard 2-component PCA plot labeled with query, a diverging lollipop chart showing the PC breakdown for the query, and an interactive PCA plot showing the location of the query in 3D space.

Usage

1
zoomPC(x, y, pcData, bestPCSet, clusters, iterationResults, outPath)

Arguments

x

approximate x coordinate value from optimal PCA plot. See details for more information.

y

same as x.

pcData

a validated R matrix containing numeric scaled PCA data.

bestPCSet

a matrix whose columns contain the optimal principal components.

clusters

vector of predicted labels

iterationResults

list of iteration results from PCA filtering, where each iteation has one less PC. List elements are PCA matrices. Last entry in the list corresponds to the top 2 PCs for clustering.

outPath

path to ouput directory where pcclust_visualization folder was generated.

Value

NULL. Outputs high quality .svg files in pcclust_visualization for each of the 2 plots.

See Also

ggplot

svg

plot3d

text3d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data <- validateAndLoadData(iris)
pcObj <- prcomp(data)
pcData <- pcObj$x
iterationResults <- executePCFiltering(pcData)
bestPCSet <- iterationResults[[length(iterationResults)]]
clusterResults <- evaluateClusterQuality(bestPCSet)
optimalModel <- determineOptimalModel(bestPCSet)
clusters <- optimalModel$classification
out <- visualizePCA(bestPCSet, clusters, pcObj)
x <- 0.5
y <- -0.3
zoomPC(x, y, pcData, bestPCSet, clusters, iterationResults, out)

audrina/pcclust documentation built on May 31, 2019, 12:44 a.m.