XL-mHG: A Semiparametric Test for Enrichment


Keywords
statistics, nonparametric, semiparametric, enrichment, test, ranked, lists, expression, python
License
GPL-3.0
Install
pip install xlmhg==2.5.4

Documentation

XL-mHG

master Coverage (master branch) Travis-CI build Status (master branch) Appveyor build Status (master branch) Documentation Status (master branch)
develop Coverage (develop branch) Travis-CI build Status (develop branch) Appveyor build Status (develop branch) Documentation Status (develop branch)

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.

Installation

$ pip install xlmhg

Getting started

The 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

Documentation

Please refer to the XL-mHG User Manual (hosted on ReadTheDocs).

Citing XL-mHG

If you use the XL-mHG test in your research, please cite Eden et al. (PLoS Comput Biol, 2007) and Wagner (PLoS One, 2015).

Copyright and License

Copyright (c) 2015-2019 Florian Wagner

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.