smorabit / hdWGCNA

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

Question about gene-gene edge weight by condition #251

Closed DelongZHOU closed 3 weeks ago

DelongZHOU commented 1 month ago

Hi Sam, I'm currently making metacells within each condition and identifying modules over all conditions, then doing DME. I want to compare the connectivity of module in each condition, defined as the ratio of sum of all edge weight if I understood correctly this passage image from this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3677161/

Since I constructed the network over all conditions I assume the edge weight in TOM is also over all conditions. Would it be a good idea to do the following: a) subset the finished WGCNA/Seurat object by condition to keep the metacell composition b) construct the networks c) extract edge weight using the previously defined network from TOM

I also wonder if I should keep all edges in the sum, or only those are positive?

Any suggestions are welcome! Thank you!

smorabit commented 1 month ago

Hi,

This is a very interesting question, but at this time I believe that it is outside of the scope of hdWGCNA since you are essentially wanting to calculate a custom metric. I do not know anything about this particular calculation so I don't think I can provide meaningful advice. It seems like you can just write a custom function to implement this calculation for your purposes.

DelongZHOU commented 4 weeks ago

Hi Sam, Thanks for your input. Let me change my question to something more related to your package then. I just realized that your package doesn't support subsetting after SetupForWGCNA, and the metacells are made after this step. So I have to subset the original object and create metacells for each condition. Is the creation of metacells involve random process or will it still be the same as before, given I made the metacells by condition in the first time? How much does the metacell composition change the TOM/network etc?

Thank you! Best, Delong

DelongZHOU commented 3 weeks ago

According to my experiments subsetting from the original seurat object and rerunning the pipeline does not change TOM files. I consider my questions answered. Best, Delong