Hi, I'm trying to plot some genes using FeaturePlot. I have two datasets. First I did this operation on the two datasets analyzed independently and lets say that I found that the gene X was not expressed at all in one dataset and just in very few cells in the other. Usually the cells in which the gene is not expressed are colored in grey.
Then, I did the same operation integrating the two datasets but in this case, splitting the plot for condition, I was really confused because the dots were colored al inl violet in a condition (where is not expressed at all) and grey in the othe (with just few colored dots as expected.
I want the dots colored in grey if the gene is not expressed at all. How can I do?
This is my code
library(dplyr)
library(Seurat)
library(patchwork)
library(ggplot2)
Idents(combined1) <- combined1$orig.ident
DefaultAssay(combined1) <- "RNA"
genes<-c("Nog", "Chrd", "Fst", "Gdf5", "Gdf6", "Bmp7", "Musk")
FeaturePlot(combined1, features =genes, split.by="ident")+theme(text = element_text(size = 20))
Here you can find the image https://drive.google.com/file/d/1CraeqHblj2H44aOQhZETyaOU5Bsbcryn/view?usp=sharing All plots referred to first dataset are on the left, all the plots referred to the second dataset on the right.
I'm referring to "Gdf6" and "Bmp7" in the left dataset.
Thanks Francesca
Please provide your code and include an image of the figure you are describing.
I updated the post, thanks
The default for color scaling is
keep.scale="feature"
which has never worked well for me (I've run into the same problem you have). One option is to scale by all sampleskeep.scale="all"
.Thanks a lot. It seems better in this way!