mortazavilab / PyWGCNA

PyWGCNA is a Python package designed to do Weighted Gene Correlation Network analysis (WGCNA)
https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btad415/7218311
MIT License
209 stars 48 forks source link

findModules() inappropriately passes all kwargs to pickSoftThreshold() and cuttreeHybrid() #94

Closed JShermanK1 closed 6 months ago

JShermanK1 commented 6 months ago

Thanks for all the work.

I'm trying to do findModules(deepSplit= 0) to get cuttreeHybrid(deepSplit= 0), but deepSplit is being passed to pickSoftThreshold() which results in got an unexpected keyword argument 'deepSplit' . Maybe take the user provided kwargs and only fill in the unspecified keys with default values, then you can parcel out kwargs to the appropriate function calls?

As a sidenote, the API documentation states that deepSplit defaults to 1, but when I dig into the code it appears that it is actually 2.

I am ultimately trying to see if broader clusters result in better gene set enrichment. Am I going about this in a naive manner?

nargesr commented 6 months ago

Hi @JShermanK1 , Sorry for the delay! I just released the new version which hopefully solves your problem

findModules() is more like a wrapper function so I ended up changing the input a little bit. please look at the API documentation and let me know if you have any problems/questions.

JShermanK1 commented 6 months ago

Hi @nargesr,

Thanks for the effort. The new keywords argument seems to be working so far.