Skip to content

"Is It Feasible to Use Harmony Directly for Batch Correction in Seurat V5 Instead of “ IntegrateLayers“?" #249

Open
@Tylesteven

Description

@Tylesteven

I have multiple samples from various GEO datasets that need batch correction. Currently, I've created five Seurat objects in Seurat V5 and merged them into a single object. I would like to perform the batch correction not using the built-in method in Seurat V5, which is:

#============================

merged_sce <- merge(sce_GSE140393_DRE, y = list(sce_GSE148822_AD, sce_GSE157827_AD, sce_GSE160189_DRE, sce_GSE173731_DRE, sce_GSE174367_AD),
add.cell.ids = c("GSE140393_DRE", "GSE148822_AD", "GSE157827_AD", "GSE160189_DRE", "GSE173731_DRE", "GSE174367_AD"),
project = "Merged_All")

sce <- NormalizeData(merged_sce ) %>% FindVariableFeatures(selection.method = "vst",nfeatures = 3000)%>% ScaleData(vars.to.regress=c("percent.mt","nCount_RNA")) %>% RunPCA(npcs = 30, verbose = T)

sce_harm <- IntegrateLayers(object = sce,
method = HarmonyIntegration,
orig.reduction = "pca",
new.reduction = "integrated.Harmony",
verbose = TRUE)

Instead, I want to use Harmony directly with the following code:
sce_harm <- RunHarmony(sce, group.by.vars = c("dataset", "donor", "batch_id"))
The variables "dataset", "donor", "batch_id" are included in my metadata. Is this approach feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions