RunPCA.Exp {MARVEL} | R Documentation |
Principle component analysis for gene Data
Description
Performs principle component analysis using gene expression values.
Usage
RunPCA.Exp(
MarvelObject,
sample.ids = NULL,
cell.group.column,
cell.group.order = NULL,
cell.group.colors = NULL,
features,
min.cells = 25,
point.size = 0.5,
point.alpha = 0.75,
point.stroke = 0.1
)
Arguments
MarvelObject |
Marvel object. S3 object generated from |
sample.ids |
Character strings. Specific cells to plot. |
cell.group.column |
Character string. The name of the sample metadata column in which the variables will be used to label the cell groups on the PCA. |
cell.group.order |
Character string. The order of the variables under the sample metadata column specified in |
cell.group.colors |
Character string. Vector of colors for the cell groups specified for PCA analysis using |
features |
Character string. Vector of |
min.cells |
Numeric value. The minimum no. of cells expressing the gene to be included for analysis. |
point.size |
Numeric value. Size of data points on reduced dimension space. |
point.alpha |
Numeric value. Transparency of the data points on reduced dimension space. Take any values between 0 to 1. The smaller the value, the more transparent the data points will be. |
point.stroke |
Numeric value. The thickness of the outline of the data points. The larger the value, the thicker the outline of the data points. |
Value
An object of class S3 containing with new slots MarvelObject$PCA$Exp$Results
, MarvelObject$PCA$Exp$Plot
, and MarvelObject$PCA$Exp$Plot.Elbow
.
Examples
marvel.demo <- readRDS(system.file("extdata/data", "marvel.demo.rds", package="MARVEL"))
# Define genes for analysis
gene_ids <- marvel.demo$Exp$gene_id
# PCA
marvel.demo <- RunPCA.Exp(MarvelObject=marvel.demo,
sample.ids=marvel.demo$SplicePheno$sample.id,
cell.group.column="cell.type",
cell.group.order=c("iPSC", "Endoderm"),
min.cells=5,
features=gene_ids,
point.size=2
)
# Check outputs
head(marvel.demo$PCA$Exp$Results$ind$coord)
marvel.demo$PCA$Exp$Plot