scAlignCreateObject: Creates scAlign object

Description Usage Arguments Value Examples

View source: R/scAlignClass.R

Description

Creates scAlign object

Usage

1
2
3
4
scAlignCreateObject(sce.objects, genes.use = NULL, labels = list(),
  pca.reduce = FALSE, pcs.compute = 20, cca.reduce = FALSE,
  ccs.compute = 15, data.use = "scale.data",
  project.name = "scAlignProject")

Arguments

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.

Value

Initialized scAlign object

Examples

 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")

scAlign documentation built on April 28, 2020, 6:10 p.m.