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

View source: R/functions-core.R

bindSeuratObjR Documentation

Attach 'Seurat' object to 'Phemd' object

Description

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

Usage

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


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)


wschen/phemd documentation built on Oct. 1, 2024, 4:45 a.m.