run_pca | R Documentation |
PCA analysis, eventually using a subset of core cells for the PC construction.
run_pca(z_df, core_cells = NULL, out_pcs = 100)
z_df |
a data.frame with z-scores for each cell |
core_cells |
if non-NULL, a vector with the names of the cells to use as core cells. See details. Default is NULL. |
out_pcs |
the number of top PCs to report. Default is 100. |
Cells in core_cells are used to build the principal components to which
all cells are then projected to. Usually used to reduce the effect of
cell cycle in the PCA, by using only cells that don't cycle (see qc_cells
)
as core_cells.
The graph (sdev.graph) shows the standard deviation for the top 50 PCs. To
show more/less PCs, add xlim(1,N)
to the sdev.graph. See examples.
a list with
x |
the PC matrix |
sdev |
the standard deviations of the PCs |
sdev.graph |
a ggplot graph of the sdev |
Jean Monlong
## Not run: pca.o = run_pca(z) ## Zoom in to the top 20 PCs pca.o$sdev.graph + xlim(1,20) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.