barupal / ChemRICH

Chemical Similarity Enrichment analysis of metabolomics datasets
27 stars 13 forks source link

can I use the fold change values of metabolites as the effect size? #21

Open Wenyang1218 opened 1 month ago

Wenyang1218 commented 1 month ago

Hello, I am running ChemRich analysis in R using the script chemrich_chemical_classes.R. Can I use the fold change values of metabolites between two groups as the effect size? When I use fold change values as the effect size, many sets have cluster p-values from the KS test equal to 0.000000e+00. What could be causing this?

barupal commented 1 month ago

You can use FC values as effect sizes. But the KS test p-value does not depend on FC values, it only need the raw p-values. The zero values mean it was lower than the minimum value in R.

Wenyang1218 commented 1 month ago

Does a KS test p-value of 0 mean that the set is the most significantly changed? When handling cluster.pvalues[which(cluster.pvalues == 0)] <- 2.2e-20, should I set the p-value to the minimum value instead of 2.2e-20?

barupal commented 1 month ago

If there is only one p-value==0, then that set is the most significant one. Yes, you can set the ks-test p-value to the minimum value returned.

Wenyang1218 commented 1 month ago

Thank you very much!But I have several sets with p-value==0,What should I do in this case?

barupal commented 1 month ago

.Machine You can try lowering the double.eps if that returns smaller p-values.

Wenyang1218 commented 1 month ago

thank you very much!But I still haven't solved it.