scAlignCreateObject {scAlign} | R Documentation |
Creates scAlign object
scAlignCreateObject( sce.objects, genes.use = NULL, labels = list(), pca.reduce = FALSE, pcs.compute = 20, cca.reduce = FALSE, ccs.compute = 15, cca.standardize = TRUE, data.use = "scale.data", project.name = "scAlignProject" )
sce.objects |
List of Seurat or Matrix objects; sample x feature. |
genes.use |
Genes to use during PCA/CCA, all genes used as default. |
labels |
List of labels for each object. |
pca.reduce |
Initial step of dimensionality be performced by PCA. |
pcs.compute |
Number of PCs to retrain for alignment. |
cca.reduce |
Initial step of dimensionality be performced by CCA. |
ccs.compute |
Number of CCs to retrain for alignment. |
cca.standardize |
Standardize the data matrices before CCA. |
data.use |
Specificies which data to use from a Seurat object for dimensionality reduction. |
project.name |
Name for current scAlign project. |
Initialized scAlign object
library(Seurat) library(SingleCellExperiment) ## Input data, 1000 genes x 100 cells data = matrix(sample.int(10000, 1000*100, TRUE), 1000, 100) rownames(data) = paste0("gene", seq_len(1000)) colnames(data) = paste0("cell", seq_len(100)) age = c(rep("young",50), rep("old",50)) labels = c(c(rep("type1",25), rep("type2",25)), c(rep("type1",25), rep("type2",25))) ctrl.data = data[,which(age == "young")] stim.data = data[,which(age == "old")] ctrlSCE <- SingleCellExperiment( assays = list(scale.data = data[,which(age == "young")])) stimSCE <- SingleCellExperiment( assays = list(scale.data = data[,which(age == "old")])) ## Build the scAlign class object and compute PCs scAlignHSC = scAlignCreateObject(sce.objects = list("YOUNG"=ctrlSCE, "OLD"=stimSCE), labels = list(labels[which(age == "young")], labels[which(age == "old")]), pca.reduce = TRUE, pcs.compute = 50, cca.reduce = TRUE, ccs.compute = 15, project.name = "scAlign_Kowalcyzk_HSC")