stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
143 stars 24 forks source link

ccrepe filter based on p-values #97

Closed indrikwijaya closed 9 months ago

indrikwijaya commented 9 months ago

Dear @stefpeschel, thanks for this great and very comprehensive package!

I have a question regarding the use of ccrepe where in its standalone, we can filter the significant associations based on the adjusted p-values. However, I don't see this is possible/documented in NetCoMi. Is there any reason on why this is the case? I assume this will be under the 'sparsMethod' Or I apologize if I've missed this in the documentation.

stefpeschel commented 9 months ago

Hi,

NetCoMi's netConstruct function has an argument measurePar, to which you can pass a list with additional arguments for association estimation. This is directly passed to the function used for assocation estimation, ccrepe in your case.

NetCoMi also provides several sparsification methods. You can set sparseMethod to "t-test" (which is the default) to perform a statistical test so that non-significant correlations are set to zero and are thus filtered out. The adjust argument specifies the method used for multiple testing adjustment.

indrikwijaya commented 9 months ago

Dear @stefpeschel , thanks for the prompt reply!

I think the way ccrepe calculates p-value is different from the "t-test" method under sparseMethod. I also looked through the source code and don't think passing additional arguments to adjust for p-values into measurePar for ccrepe will remove the non-significant correlations based on the adjusted p-values calculated form ccrepe itself. Please correct me if I'm wrong! However, I managed to modify the code to add this extra filtering step whenever ccrepe is used. Thanks for the help :)