View source: R/run_pca_cc_genes.R
| run_pca_cc_genes | R Documentation |
Run PCA on Gene Ontology cell cycle genes abd get a new SingleCellExperiment. User could use this function to learn new reference projection matrix.
sce.o |
A SingleCellExperiment contains library size normalized **log-expression** matrix. |
gname |
Alternative rownames of |
exprs_values |
Integer scalar or string indicating which assay of |
gname.type |
The type of gene names as in |
species |
The type of species in |
AnnotationDb |
An AnnotationDb objects. It is used to map ENSEMBL IDs to gene SYMBOLs.
If no AnnotationDb object being given, the function will use |
ntop |
The number of genes with highest variance to use when calculating PCA, as in |
ncomponents |
The number of component components to obtain, as in |
name |
String specifying the name to be used to store the result in the |
The function require an output of a SingleCellExperiment object which contains the library size normalized **log-expression** matrix. The full dataset will
be subsetted to genes in the Gene Ontology cell cycle gene list (GO:0007049). The corresponding AnnotationDb object will be
org.Mm.eg.db and org.Hs.eg.db for mouse and human respectively. If runSeuratBy is set, the data will be
integrated to remove batch effect between samples/batches by Seurat.
User can use this function to make new reference projection matrix by getting the 'rotation' attribute in PCA results. Such as
attr(reducedDim(sce.o, 'PCA'), 'rotation')[, 1:2]. See examples for more details.
A subset SingleCellExperiment object with only GO cell cycle genes will be return.
The PCA resulting will be save in reducedDims with chosen name reducedDims(..., name).
If Seurat integration is performed, another reducedDims with name 'matched.'+name will also be included in the SingleCellExperiment.
Shijie C. Zheng
data(neurosphere_example, package = "tricycle") ### Use internal NeuroRef to project and infer tricyclePosition neurosphere_example <- estimate_cycle_position(neurosphere_example) ### Build new reference gocc_sce.o <- run_pca_cc_genes(neurosphere_example) new.ref <- attr(reducedDim(gocc_sce.o, "PCA"), "rotation")[, seq_len(2)] ### Use new reference to project and infer tricyclePosition new_sce <- estimate_cycle_position(neurosphere_example, ref.m = new.ref, dimred = "tricycleEmbedding2") plot(neurosphere_example$tricyclePosition, new_sce$tricyclePosition)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.