smorabit / hdWGCNA

High dimensional weighted gene co-expression network analysis
https://smorabit.github.io/hdWGCNA/
Other
327 stars 33 forks source link

Incompatibility of plots, probably with dplyr #268

Closed SamueleSoraggi closed 1 month ago

SamueleSoraggi commented 1 month ago

Describe the bug

When using the plot for KMEs and the lolliplot plot for differential module expression, I get an incompatibility error. This happen in general with any data, and with the latest dev version (the commit 6bb2fc9, called bugfix SetModules).

Steps to reproduce

Commands of the type

PlotDMEsLollipop(
  seurat.network, 
  DMEs, 
  wgcna_name='tutorial', 
  pvalue = "p_val_adj",
)

or a standard KME plot

p <- capture.output({PlotKMEs(seurat.clustered, ncol=3, text_size = 4);})

all result in this error:

Error in `::`(., dplyr, distinct): 3 arguments passed to '::' which requires 2
Traceback:

1. PlotDMEsLollipop(seurat.network, DMEs, wgcna_name = "tutorial", 
 .     pvalue = "p_val_adj", )
2. PlotLollipop(modules, cur_DMEs, pvalue, avg_log2FC = "avg_log2FC")
3. dplyr::select(modules, c(module, color)) %>% dplyr::distinct

This happens with dplyr 1.0.9 installed.

smorabit commented 1 month ago

Hi, I was able to find and resolve the source of the error. Can you please re-install hdWGCNA and try it again?

devtools::install_github('smorabit/hdWGCNA', ref='dev')

SamueleSoraggi commented 1 month ago

Dear Sam, thanks a lot for responding quickly and fixing this. I have been testing it and it works now. I am deploying a single cell tutorial on a docker container and I have been using it to teach part of a course which includes your package, and we really liked it :)