-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Hello,
Thank you for this cool method, I had very nice results with it!
When I'm analyzing scRNA-seq data using Seurat and Harmony, I'm regressing out covariates (e.g., library, sample type) at two steps:
- During Scaling:
# pseudocode
NormalizeData(obj) |>
ScaleData(obj, vars.to.regress = c('library', 'sample_type')) |>
PCA(obj) - During Batch Correction with Harmony:
library_sample_type = paste0('library', 'sample_type')
RunHarmony(obj, group.by.vars = c('library_sample_type')) -> resultThis means I'm addressing the covariates twice—once in ScaleData and again in RunHarmony. My questions are:
- Is this redundancy problematic?
- Specifically, could correcting for covariates at both steps lead to overcorrection?
- What are the potential consequences of regressing out covariates in both steps?
- Could it affect downstream analyses like clustering or differential expression by reducing variability too much?
- What would be the recommended best practice?
- Should I regress out covariates only during
RunHarmonyor OK to use them in both? - E.g. marker heatmap plots are based on
ScaleData, that is one reason to correct already at scaling (of course I could redo scaling and PCA after Harmony).
- Should I regress out covariates only during
I'd appreciate any guidance on whether I should adjust my workflow to correct for covariates in just one of these steps to avoid problems that you can foresee.
Thank you for your help!
Metadata
Metadata
Assignees
Labels
No labels