lozuponelab / AMON

Annotation of Metabolite Origin via Networks: A tool for predicting putative metabolite origins for microbes or between microbes and host with or without metabolomics data
MIT License
21 stars 11 forks source link

Fix div zero enrichment error #14

Closed sterrettJD closed 1 year ago

sterrettJD commented 1 year ago

If there are only a few KOs being assessed, if the KOs all belong to small pathways, or the KOs are incorrectly formatted, there will be no rows in the table. When performing p value adjustment, this will cause a division by 0 error.

I've added a check to see if there are 0 rows. If there are 0 rows, AMON now raises a more informative error.

This seems to make using more clear/robust for issues such as #12 .

kthurimella commented 1 year ago

LGTM!