XL-mHG: A Semiparametric Test for Enrichment
This is an efficient Python/Cython implementation of the semiparametric XL-mHG test for enrichment in ranked lists. The XL-mHG test is an extension of the nonparametric mHG test, which was developed by Dr. Zohar Yakhini and colleagues.
$ pip install xlmhg
xlmhg package provides two functions (one simple and more more advanced)
for performing XL-mHG tests. These functions are documented in the
User Manual. Here’s a quick example using the “simple” test function:
import xlmhg stat, cutoff, pval = xlmhg.xlmhg_test(v, X, L)
Where: v is the ranked list of 0’s and 1’s, represented by a NumPy array of integers, X and L are the XL-mHG parameters, and the return values have the following meanings:
- stat: The XL-mHG test statistic
- cutoff: The cutoff at which XL-mHG test statistic was attained
- pval: The XL-mHG p-value
Please refer to the XL-mHG User Manual (hosted on ReadTheDocs).
Copyright and License
Copyright (c) 2015-2017 Florian Wagner
XL-mHG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, Version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.