bindSeuratObj: Attach 'Seurat' object to 'Phemd' object

Description Usage Arguments Value Examples

View source: R/functions-core.R

Description

Allows user to attach batch-normalized reference cell data from Seurat into 'Phemd' object containing raw expression data and metadata

Usage

1
bindSeuratObj(phemd_obj, seurat_obj, batch.colname = "plt")

Arguments

phemd_obj

Phemd object initialized using createDataObj

seurat_obj

S4 'seurat' object containing batch-normalized reference cell data

batch.colname

Name of column in Seurat object that denotes batch ID

Value

'Phemd' object containing with attached Seurat object

Examples

1
2
3
4
5
6
7
8
my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
my_seuratObj <- Seurat::CreateSeuratObject(counts = t(all_expn_data[[1]]), project = "A")
my_seuratObj <- Seurat::FindVariableFeatures(object = my_seuratObj)
my_seuratObj <- Seurat::ScaleData(object = my_seuratObj, do.scale=FALSE, do.center=FALSE)
my_seuratObj <- Seurat::RunPCA(object = my_seuratObj, pc.genes = colnames(all_expn_data[[1]]), do.print = FALSE)
my_seuratObj <- Seurat::FindNeighbors(my_seuratObj, reduction = "pca", dims.use = 1:10)
my_seuratObj <- Seurat::FindClusters(my_seuratObj, resolution = 0.6, print.output = 0, save.SNN = TRUE)
my_phemdObj <- bindSeuratObj(my_phemdObj, my_seuratObj)

phemd documentation built on Nov. 8, 2020, 8:15 p.m.