Description Usage Arguments Value
Clusters the data using k-means clustering after finding the optimal number of clusters for the dataset using the silhouette method. The results of the clustering are used along with PCA to see whether all the samples of a batch lie in the same cluster. The silhouette plot, the PCA biplot, and the files containing the avg. silhouette width (for k = 2 to k = 7) and the clustering information (for optimal k) is saved to the k-means folder created in the working directory.
1 2 3 4 5 6 7 8 | kmeans_PCA(
exprData,
batch.info,
batch = "Batch",
NameString = "",
when,
return.plot = FALSE
)
|
exprData |
gene expression dataset (rows should be samples, column should be genes) |
batch.info |
contains the samples names and the batches they belong to |
batch |
title of the batch being used for correction |
NameString |
string that will be appear in all output filenames. Default="" (empty string) |
when |
String indicating when the clustering is taking place (before batch correction or after batch correction?) |
return.plot |
Should the plot be returned as an object to the environment? If FALSE, plot is saved to a pdf file, if TRUE, plot is returned to the environment. Default = FALSE |
Returns the optimal number of clusters (k) that has the maximum average silhouette width (ignoring k=2) and was used for clustering and plotting. If return.plot=TRUE, the cophenetic coefficient plot and the PCA plot denoting NMF clusters are also returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.