Globaltest in the MetaboAnalystR package

I had a question about the implementation of Globaltest in the MetaboAnalystR package with the CalculateGlobalTestScore function.

Specifically, I’ve been trying to reproduce the output of this function using the gt function in the globaltest package. The original Metabolite Set Enrichment Analysis paper implies that the linear modeling version of the globaltest is applied for MetaboAnalyst. However I’ve found that this version of the test can’t be applied to data with binary outcomes. When I apply the logistic version of the test, I get almost every pathway returned as significant, even with multiple test correction.

Could you give any insight on how the test is performed in the package? Any help would be much appreciated.