MarioniLab / miloDE

Framework for sensitive DE testing (using neighbourhoods)
Other
57 stars 2 forks source link

using de_stat with wgcna in Vignette #28

Closed alwhiteh closed 1 year ago

alwhiteh commented 1 year ago

Hello,

Thank you for the package!

I'm trying to implement your tools on one of my own datasets by working through the vignette, but am having trouble with the section "Gene modules using WGCNA"

I'm not super familiar with writing functions in R, but I keep getting an error when trying to define the default for subset_hoods as NULL - Error: attempt to use zero-length variable name

Additionally, In the vignette, the de_stat object is also returned as a SCE and I am unable to run the dplyr commands listed under the comment : # focus on genes that DE in at least 2 nhoods

Does the de_stat object need to be in another format?

Best,

Alex

amissarova commented 1 year ago

Hey, I think that the problem here is that you pass de_stat in SCE format, when for this part of the vignette you need to pass it as data.frame. In the vignette, I convert de_stat to data.frame format

Can you try to convert de_stat: de_stat = miloDE::convert_de_stat(de_stat). Can you run it then?

alwhiteh commented 1 year ago

Hi, yes, this worked!

I also missed a bracket when copying, and it works with the SCE object in the function as well now.

Thanks!