calc_PCAs | R Documentation |
This is a wrapper function for prcomp, designed for running PCA on RNAseq data. It transposes the input data, and adds two elements to the prcomp object, containing the following for each PC: the percent variance, and a character string for labeling plot axes.
calc_PCAs(counts, cpm = TRUE, log2_transform = FALSE, ...)
counts |
matrix or data frame of gene expression counts, or an object from which counts can be extracted. Should have genes in rows and samples in columns |
cpm |
logical, whether to transform the counts to counts-per-million (using |
log2_transform |
logical, whether to transform the counts (using |
... |
(optional) additional arguments passed to prcomp, such as |
a prcomp object, with additional list elements containing the percent variance and strings for labeling plot axes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.