Description Usage Arguments Value Examples
Creates scAlign object
1 2 3 4 |
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. |
data.use |
Specificies which data to use from a Seurat object for dimensionality reduction. |
project.name |
Name for current scAlign project. |
Initialized scAlign object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.