Hi all,
I am trying to plot the average gene expression of two clusters within my single cell RNAseq data using the CellScatter function (Seurat). I followed the exact steps of the vignette, however my plot looks like a black square sheet of evenly distributed cells instead of a proper cell scatter. Here is the code:
#Calculate the average gene expression within clusters to plot
cluster.averages <- AverageExpression(thymus)
head(cluster.averages[["RNA"]][, 1:3])
#Return this information as a Seurat object (enables downstream plotting and analysis) First,replace spaces with underscores '_' so ggplot2 doesn't fail
orig.levels <- levels(thymus)
Idents(thymus) <- gsub(pattern = " ", replacement = "_", x = Idents(thymus))
orig.levels <- gsub(pattern = " ", replacement = "_", x = orig.levels)
levels(thymus) <- orig.levels
cluster.averages <- AverageExpression(thymus, return.seurat = TRUE)
cluster.averages
#How can I plot the average expression of cluster 1 vs. cluster 2? Pass do.hover = T for an interactive plot to identify gene outliers
CellScatter(cluster.averages, cell1 = "1", cell2 = "2")
In my data I have three clusters named 1-3. I am trying to plot the average gene expression of cluster 1 against cluster 2. Any idea what I might have done wrong? I wanted to post an image of the plot I am now getting but not sure how to. Sorry, I am still quite new!
Many thanks in advance, Florencia
Can you post the output of
head(cluster.averages[["RNA"]][, 1:3])
andcluster.averages
?Hi geek_y,
Of course:
Hope this brings some clarification!
Kind regards, Florencia
I don't see any problem with the data format. Did you see clear clusters with tSNE or UMAP before taking the average of gene expression for each cluster ? Here is a guideline on how to add images in biostars.
Thank you for the link to the guideline for images, geek_y!
I indeed could distinguish clear clusters to my opinion (although I only had a little more than 300 cells).
Here's my attempt to posting images then:
Many cheers again for your time, Florencia