Entering edit mode
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!