This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to display gene expression after Harmony correction in scRNA-seq analysis

Hi,

I run Harmony correction (https://github.com/immunogenomics/harmony) to my scRNA-seq dataset just like below.

seuratObj <- RunHarmony(seuratObj, "dataset")

seuratObj <- RunUMAP(seuratObj, reduction = "harmony")

My questions are:

  1. How can I display gene expression among clusters based on gene expression matrix after harmony correction (like VlnPlot)

  2. How can I find DEGs based on gene expression matrix after harmony correction (like FindMarkers)

Thanks in advance.

scrna-seq correction harmony

1 answer

I ll recommend you to use Seurat V5. You can use harmony as below before looking your gene of interest expression in vln plot and preforming Findmarkers-

seuratObj <- IntegrateLayers(object = seuratObj, method = HarmonyIntegration, orig.reduction = "pca", new.reduction = "integrated.harmony",  verbose = FALSE)

seuratObj <- FindNeighbors(seuratObj, reduction = "integrated.harmony", dims = 1:30)
seuratObj <- FindClusters(seuratObj, resolution = 2, cluster.name = "harmony_clusters")
seuratObj <- RunUMAP(seuratObj, reduction = "integrated.harmony", dims = 1:30, reduction.name = "umap.harmony")

1. To display expression of your gene (for eg. CD8A in this case) of interest in Voiln plot, you can do sth like this-

VlnPlot(seuratObj,  features = "CD8A", group.by = "harmony_clusters") + NoLegend() + ggtitle("CD8A - harmony Clusters")

2. You can run FindMarkers in cluster1 as below-

Idents(seuratObj)="harmony_clusters"
cluster1.markers <- FindMarkers(seuratObj, ident.1 = 1, min.pct = 0.25)

Thank you for your replying. Just one more question.

Which expression matrix would be appropriate for displaying gene expression or identifying differentially expressed genes (DEGs) in your code? If the normalized expression matrix is used before Harmony correction, could the expression pattern be considered problematic due to uncorrected batch effects? Is my understanding correct?

Thanks

Log in to answer this question.