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