yuabrahamliu / CWGCNA

CWGCNA is an R package to perform causal inference from the WGCNA framework.
12 stars 2 forks source link

Different results compared with WGCNA #12

Closed ruikangHAN closed 1 month ago

ruikangHAN commented 1 month ago

Hi, I used both CWGCNA and WGCNA on the same input data, with the same parameter (sftpowers = 8, minclustersize = 30, mergecutheight = 0.25,maxblocksize = 30000). Then I compared the modules produced by these two packages, and I found that the number of modules are the same, yet the numbers of genes in each modules are slightly different. I would appreciate it if you can tell me the reasons. Thanks a lot!

yuabrahamliu commented 1 month ago

Hi, I used both CWGCNA and WGCNA on the same input data, with the same parameter (sftpowers = 8, minclustersize = 30, mergecutheight = 0.25,maxblocksize = 30000). Then I compared the modules produced by these two packages, and I found that the number of modules are the same, yet the numbers of genes in each modules are slightly different. I would appreciate it if you can tell me the reasons. Thanks a lot!

Sorry for this late reply. If "the number of modules" is "the same, yet the numbers of genes in each" module "are slightly different", the reason should be the random steps included in the original WGCNA pipeline, such as the function blockwiseModules.

You only mentioned using the same parameters, sftpowers, minclustersize, mergecutheight, and maxblocksize, but you did not mention the random seed you used. Therefore, you should use the default ones for CWGCNA and WGCNA, respectively.

The help document has indicated that the default random seed for all the random steps for the function diffwgcna in CWGCNA is 2022. For WGCNA, the default seed for blockwiseModules is 54321, and its other functions may use different default seeds. It would help if you unify them to repeat the results. Thank you.