Open DelongZHOU opened 10 months ago
Hi,
Can you provide some more details, the code that you ran and the plots that were generated? What is the expected result vs the actual result etc.
My script follows your basic tutorial and Differential module eigengene (DME) analysis. It first sets up the seurat object, then loop over the cell types with a function.
The codes I used to generate the volcano plot is as following:
group1 <- seurat_obj@meta.data %>% subset(subtype == celltype & condition == 'ctrl') %>% rownames group2 <- seurat_obj@meta.data %>% subset(subtype == celltype & condition == 'treatment') %>% rownames DMEs <- FindDMEs( seurat_obj, barcodes1 = group1, barcodes2 = group2, test.use='wilcox', wgcna_name='' ) p<-PlotDMEsVolcano( seurat_obj, DMEs, wgcna_name = 'project1' )
but the figures generated in the basic tuto is colored code:
p <- PlotKMEs(seurat_obj, ncol=3)
Looks like a bug to me, each point in the volcano plot should be colored based on the module's color. Can you reproduce this behavior with the tutorial dataset? I have not personally encountered this. There might be a problem with your code though, it looks like you didn't specify the same wgcna_name
for both the FindDMEs
function and the PlotDMEsVolcano
function.
DMEs <- FindDMEs(
seurat_obj,
barcodes1 = group1,
barcodes2 = group2,
test.use='wilcox',
wgcna_name=''
)
p<-PlotDMEsVolcano(
seurat_obj,
DMEs,
wgcna_name = 'project1'
)
Hi Sam,
The wgcna name part is because I was trying to remove information relative to my project. The code I ran use the correct name.
For the tutorial dataset, the KME, lollipop and volcano plot are consistant: creation: https://smorabit.github.io/hdWGCNA/articles/basic_tutorial.html diff eigen: https://smorabit.github.io/hdWGCNA/articles/differential_MEs.html
The lollipop and volcano plots are using the color from the KME plot.
A few minute issues I noticed: (1) in my case the M13 module is assigned very pale blue and is almost invisible (2) the wgcna is named "tutorial" in the creation but in the DME is a different name (3) same with the rds name (4) in the DME tutorial, right before you introduce the volcano plot, the spelling of the lollipop function contains a typo (should be uppercase L here)
BTW can I assume no "real" module is assigned grey, i.e. once a module is created after the dendrogram it should get a color other than grey?
@DelongZHOU FindDMEs()
will create a new assay to reuse Seurat::FindMarkers()
. In your case, L6_CT-M2
is illegal for Seurat(underscores ('_')), which cause PlotDMEsVolcano()
receive wrong module names.
@DelongZHOU
FindDMEs()
will create a new assay to reuseSeurat::FindMarkers()
. In your case,L6_CT-M2
is illegal for Seurat(underscores ('_')), which causePlotDMEsVolcano()
receive wrong module names.
Heh this seems indeed to be the case. All my other modules with underscore in their name also failed to get the color while those without underscore are fine.
Hello,
I'm a bit confused about how color is used in the volcano plots vs in PlotKMEs and other plots
In some of my volcano plots all the modules retain their color, regardless if the pval of comparison; while other plots all modules are grey. Is there a meaningful difference in these two color regime?
Thank you!