Adding Alpha/Transparency to FeaturePlot · Issue #21 · samuel-marsh/scCustomize (original) (raw)
Hey Samuel, thank you so much for putting together this tool, I am exploring it at the moment and am already super happy with it!
As you noted in the vignette, the FeaturePlot from Seurat makes it sometwhat difficult to interpret the gene expression in a way as the non-expressing cells are sometimes plotted on top of the expressing cells, your solution to by default order them imho makes a lot of sense! However, in this case, you might also be over-emphasizing certain areas in the case that there are more non-expressing cells but the few expressing cells are placed on top?
For this reason, I was wondering if it would be possible to implement the alpha parameter to the function, as it would allow to "see through" the expressors and would additionally highlight areas of high expression.
I have searched this in the Seurat github aswell and it doesn't seem that they are implementing it, but I found this code snippet that makes it somewhat work: plot$layers[[1]]$aes_params$alpha <- 0.6 (my main issue is that this will only affect the last column if split by sample e.g.)
Thanks again for all the work you put into this and for sharing it!
Best, Julia