immunogenomics / harmony

Fast, sensitive and accurate integration of single-cell data with Harmony
https://portals.broadinstitute.org/harmony/
Other
513 stars 98 forks source link

harmony performance eval #225

Closed antoine4ucsd closed 9 months ago

antoine4ucsd commented 9 months ago

hello I am trying to figure out if harmonization worked I ran

merged_seurat <- merged_seurat_raw %>%
    NormalizeData() %>%
    FindVariableFeatures(selection.method = "vst", nfeatures = 3000) %>% 
    ScaleData() %>%
    SCTransform(vars.to.regress = c("percent.mt"))
merged_seurat <- RunPCA(merged_seurat, assay = "SCT", npcs = 50)

harmonized_seurat <- RunHarmony(merged_seurat, max_iter = 20,early_stop=F, 
                group.by.vars = c("orig.ident"),
                reduction = "pca", assay.use = "SCT", reduction.save = "harmony")

endling with

Harmony 20/20
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Warning: Invalid name supplied, making object name syntactically valid. New object name is Seurat..ProjectDim.SCT.harmony; see ?make.names for more details on syntax validity

but when I compare the Vinplot, I am not sure how to intepret the results. see for example the 5th sample in attached plot

p1<- VlnPlot(object = merged_seurat, features = "PC_1", group.by = "orig.ident", pt.size = .1)
p2<- VlnPlot(object = harmonized_seurat, features = "harmony_1", group.by = "orig.ident", pt.size = .1)

does that ring a bell? something I can optimize or this kind of vinplot does not inform about harmony performance? all advices are welcome thank you!

_plot PC1 harmony shared FCM harmony 2023-12-02

pati-ni commented 9 months ago

What is the culture complexity? If you have two cell types or more they could be creating different density peaks in the latent space.

You could check the convergence plot (convergence_plot=TRUE) and visualize the batchiness by UMAP?

antoine4ucsd commented 9 months ago

yes there are mutliple cell types (bulk tissue samples) - was trying to harmonize same tissues across different participants. would that make sense?

pati-ni commented 9 months ago

Yes, this would make perfect sense to determine common cell types across your participants. (Please use the latest version of the package)

antoine4ucsd commented 9 months ago

thank you.