Pearson Correlation Single cell seurat
0
0
Entering edit mode
2.2 years ago
Payal ▴ 160

Hello,

I am doing my singlecell analysis in Seurat. I want to create Pearson correlation matrix of a set of genes per cluster basis. I want to see how these set of genes are co-expressed in all clusters.

Something like this(Referenced from Deseq2 manual) enter image description here

I know about Seurat has FeatureScatter but that's only one gene against another. How to do for multiple genes? Also which data slot is appropriate for this kind of analysis?

Thanks

singlecell seurat • 3.0k views
ADD COMMENT
0
Entering edit mode

Can you be a bit more specific about how you want this to break down? Do you want one correlation matrix per cluster and to visualize the matrices? Or do you actually want scatterplots like FeatureScatter? And, within the same figure, do you want to look at all pairs of genes within one cluster; or to look at the same pair of genes across multiple clusters?

ADD REPLY
0
Entering edit mode

I want to look at all pairs of genes within one cluster. I want one correlation matrix per cluster for a set of around 90 genes I am interested in. I actually want to create a plot like below. enter image description here

Example: GeneA to GeneD in row for cluster 1 and again GeneA to D in column for cluster 1, with their correlation values.

ADD REPLY
0
Entering edit mode

Something like this

clusterCorPlot <- function(seurObj, cluster.id, gene.list, assay='RNA', slot='data') {
  gene.dat <- getAssayData(
      subset(seurObj, seurat_cluster == cluster.id), 
       assay=assay, 
       slot=slot)[gene.list,]
  ggcorrplot(as.data.frame(t(gene.dat)))
}

should be a good starting point. (Untested)

ADD REPLY

Login before adding your answer.

Traffic: 2841 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