Correlation plot using the count data from seurat object
0
0
Entering edit mode
Sam • 0
@20e7909a
Last seen 8 days ago
Sweden

Hi,

I wanted to make a correlation plot for selected genes from my scRNAseq data. So i extracted the count data and generated a correlation plot using the following command:

Cells_DEGS <-FetchData(object = seurat_integrated, slot = 'counts', vars =  Genes_of_interest)
Cells_DEGS_df <- Cells_DEGS %>% data.frame() %>% rownames_to_column(var = 'Sample_cellName') %>% tibble()
cor.exp <- round(cor(Cells_DEGS_df[,2:36]),2)
melted_cor.exp <- melt(cor.exp)
head(melted_cor.exp)
library(ggplot2)
ggplot(data = melted_cor.exp, aes(x=Var1, y=Var2, fill=value)) + 
 geom_tile() + theme(axis.text.x = element_text(angle=70,vjust = 1, hjust=1)) +scale_fill_gradient2(low = "blue", high = "red", mid = "white", 
                                                                                                 midpoint = 0, limit = c(-1,1), space = "Lab", 
                                                                                                 name="Pearson\nCorrelation")

My question here is before i do the correlation plot, should i normalize the count data? If so how do i do it? Any suggestion will be appreciated!!

Thanks!

scRNAseq • 77 views
ADD COMMENT

Login before adding your answer.

Traffic: 219 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6