XL-mHG: A Semiparametric Test for Enrichment
Project description
XL-mHG
======
| |pypi| |versions| |license|
=========== =====================================================
**master** |codecov-master| |travis-master| |appveyor-master|
**develop** |codecov-develop| |travis-develop| |appveyor-develop|
=========== =====================================================
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.
__ xlmhg_paper_
__ mhg_paper_
__ zohar_
If you use the XL-mHG test in your research, please cite `Eden et al. (PLoS
Comput Biol, 2007)`__ and `Wagner (PLoS One, 2015)`__.
__ mhg_paper_
__ go_pca_paper_
Installation
------------
.. code-block:: bash
$ pip install xlmhg
Usage
-----
.. code-block:: python
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
type \"np.uint8\", `X`` and ``L`` are parameters, and the return values have
the following meanings:
- ``stat``: The XL-mHG test statistic
- ``cutoff``: The cutoff at which the XL-mHG test statistic was attained
- ``pval``: The XL-mHG p-value
What do the ``X`` and ``L`` parameters mean?
--------------------------------------------
- ``X`` refers to the minimum number of "1's" that have to be seen before
anything can be called "enrichment".
- ``L`` is the lowest cutoff (i.e., the largest ``n``) that is being tested
for enrichment.
A more direct way to understand ``X`` and ``L`` is through the definition of
the XL-mHG test statistic. It is defined as the minimum hypergeometric p-value
over all cutoffs at which at least ``X`` "1's" have already been seen, and
excluding any cutoffs larger than ``L``. For `X=1` and `L=N`, the XL-mHG test
reduces to the mHG test.
Background
----------
For a discussion of the statistical background and implementation of this test,
please see the `Technical Report on arXiv <http://arxiv.org/abs/1507.07905>`_,
as well as the `XL-mHG PeerJ Preprint article`__.
__ xlmhg_paper_
Copyright and License
---------------------
Copyright (c) 2015, 2016 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/>.
.. _xlmhg_paper: https://doi.org/10.7287/peerj.preprints.1962v1
.. _zohar: http://bioinfo.cs.technion.ac.il/people/zohar
.. _mhg_paper: https://dx.doi.org/10.1371/journal.pcbi.0030039
.. _go_pca_paper: https://dx.doi.org/10.1371/journal.pone.0143196
.. |pypi| image:: https://img.shields.io/pypi/v/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: PyPI version
.. |versions| image:: https://img.shields.io/pypi/pyversions/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: Python versions supported
.. |license| image:: https://img.shields.io/pypi/l/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: License
.. |travis-master| image:: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=master
:alt: Travis-CI build Status (master branch)
:scale: 100%
:target: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=master
.. |travis-develop| image:: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=develop
:alt: Travis-CI build Status (develop branch)
:scale: 100%
:target: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=develop
.. |appveyor-master| image:: https://ci.appveyor.com/api/projects/status/wpon7qkwpxx3fe6q/branch/master?svg=true
:alt: Appveyor build Status (master branch)
:scale: 100%
:target: https://ci.appveyor.com/project/flo-compbio/xlmhg/branch/master
.. |appveyor-develop| image:: https://ci.appveyor.com/api/projects/status/wpon7qkwpxx3fe6q/branch/develop?svg=true
:alt: Appveyor build Status (develop branch)
:scale: 100%
:target: https://ci.appveyor.com/project/flo-compbio/xlmhg/branch/develop
.. |codecov-master| image:: https://codecov.io/gh/flo-compbio/xlmhg/branch/master/graph/badge.svg
:alt: Coverage (master branch)
:target: https://codecov.io/gh/flo-compbio/xlmhg/branch/master
.. |codecov-develop| image:: https://codecov.io/gh/flo-compbio/xlmhg/branch/develop/graph/badge.svg
:alt: Coverage (develop branch)
:target: https://codecov.io/gh/flo-compbio/xlmhg/branch/develop
======
| |pypi| |versions| |license|
=========== =====================================================
**master** |codecov-master| |travis-master| |appveyor-master|
**develop** |codecov-develop| |travis-develop| |appveyor-develop|
=========== =====================================================
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.
__ xlmhg_paper_
__ mhg_paper_
__ zohar_
If you use the XL-mHG test in your research, please cite `Eden et al. (PLoS
Comput Biol, 2007)`__ and `Wagner (PLoS One, 2015)`__.
__ mhg_paper_
__ go_pca_paper_
Installation
------------
.. code-block:: bash
$ pip install xlmhg
Usage
-----
.. code-block:: python
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
type \"np.uint8\", `X`` and ``L`` are parameters, and the return values have
the following meanings:
- ``stat``: The XL-mHG test statistic
- ``cutoff``: The cutoff at which the XL-mHG test statistic was attained
- ``pval``: The XL-mHG p-value
What do the ``X`` and ``L`` parameters mean?
--------------------------------------------
- ``X`` refers to the minimum number of "1's" that have to be seen before
anything can be called "enrichment".
- ``L`` is the lowest cutoff (i.e., the largest ``n``) that is being tested
for enrichment.
A more direct way to understand ``X`` and ``L`` is through the definition of
the XL-mHG test statistic. It is defined as the minimum hypergeometric p-value
over all cutoffs at which at least ``X`` "1's" have already been seen, and
excluding any cutoffs larger than ``L``. For `X=1` and `L=N`, the XL-mHG test
reduces to the mHG test.
Background
----------
For a discussion of the statistical background and implementation of this test,
please see the `Technical Report on arXiv <http://arxiv.org/abs/1507.07905>`_,
as well as the `XL-mHG PeerJ Preprint article`__.
__ xlmhg_paper_
Copyright and License
---------------------
Copyright (c) 2015, 2016 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/>.
.. _xlmhg_paper: https://doi.org/10.7287/peerj.preprints.1962v1
.. _zohar: http://bioinfo.cs.technion.ac.il/people/zohar
.. _mhg_paper: https://dx.doi.org/10.1371/journal.pcbi.0030039
.. _go_pca_paper: https://dx.doi.org/10.1371/journal.pone.0143196
.. |pypi| image:: https://img.shields.io/pypi/v/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: PyPI version
.. |versions| image:: https://img.shields.io/pypi/pyversions/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: Python versions supported
.. |license| image:: https://img.shields.io/pypi/l/xlmhg.svg
:target: https://pypi.python.org/pypi/xlmhg
:alt: License
.. |travis-master| image:: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=master
:alt: Travis-CI build Status (master branch)
:scale: 100%
:target: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=master
.. |travis-develop| image:: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=develop
:alt: Travis-CI build Status (develop branch)
:scale: 100%
:target: https://travis-ci.org/flo-compbio/xlmhg.svg?branch=develop
.. |appveyor-master| image:: https://ci.appveyor.com/api/projects/status/wpon7qkwpxx3fe6q/branch/master?svg=true
:alt: Appveyor build Status (master branch)
:scale: 100%
:target: https://ci.appveyor.com/project/flo-compbio/xlmhg/branch/master
.. |appveyor-develop| image:: https://ci.appveyor.com/api/projects/status/wpon7qkwpxx3fe6q/branch/develop?svg=true
:alt: Appveyor build Status (develop branch)
:scale: 100%
:target: https://ci.appveyor.com/project/flo-compbio/xlmhg/branch/develop
.. |codecov-master| image:: https://codecov.io/gh/flo-compbio/xlmhg/branch/master/graph/badge.svg
:alt: Coverage (master branch)
:target: https://codecov.io/gh/flo-compbio/xlmhg/branch/master
.. |codecov-develop| image:: https://codecov.io/gh/flo-compbio/xlmhg/branch/develop/graph/badge.svg
:alt: Coverage (develop branch)
:target: https://codecov.io/gh/flo-compbio/xlmhg/branch/develop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xlmhg-2.2.11.tar.gz
(122.2 kB
view hashes)
Built Distributions
xlmhg-2.2.11-cp35-cp35m-win32.whl
(63.1 kB
view hashes)
xlmhg-2.2.11-cp27-cp27m-win32.whl
(67.2 kB
view hashes)
Close
Hashes for xlmhg-2.2.11-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 010bc0321b85e31cd36f6c13714d4b05715f1aecfaa0276782c921a6651ed204 |
|
MD5 | 3a260eb51d0457be18abc4606626e261 |
|
BLAKE2b-256 | 3d900e3e8f719844cd12802385961825381e9aa7a9fa2ce674de444f53bddcc9 |
Close
Hashes for xlmhg-2.2.11-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610b678156192ecdca45269273423c78ccd81099cd1d529c1a62fe54c5c47fac |
|
MD5 | ebe5363f5600950c708c2a6fda013596 |
|
BLAKE2b-256 | a8347901620ebc88ce914da16ff3d354c0e47f43a5a75e1fea8bc7270d9f2449 |
Close
Hashes for xlmhg-2.2.11-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5542a70c0334ecbe84699fe11c0f21aac037c07d11c9489571df562a26f697c |
|
MD5 | df28b5e28084976a62e320ccefafe3e4 |
|
BLAKE2b-256 | dc672f2440b0e65ec1098bac2480ca37420f4be20311e584081e47cea8637109 |
Close
Hashes for xlmhg-2.2.11-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f788749453b6dee313d201c9741d1a5a8e3c0415617852162e897a2ae99f8e4 |
|
MD5 | b1d45e9e06a52ece823dce18f4af0f0a |
|
BLAKE2b-256 | af286e52d63d7228e174936c2e07e892287ae41107330040a877bc256195c4cb |
Close
Hashes for xlmhg-2.2.11-cp35-cp35m-macosx_10_6_x86_64.macosx_10_9_x86_64.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 537afea6363a2f5b2853ddcfe6b0baa69fda69f713317f752510a9a757c5fd83 |
|
MD5 | 80f29878fd5a6e19be1882fe4e176b9f |
|
BLAKE2b-256 | b847d34b4697e9757447b771ab41535fbd5b2baa35a739f4d8ec7209a30ba742 |
Close
Hashes for xlmhg-2.2.11-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ecb2c9bb4299bc6a61708129a3fa4167ee4e6840c6074a590642cec8c089cf |
|
MD5 | d939f39bb6f2b9f805b66d43a991e691 |
|
BLAKE2b-256 | 107300ae17175bcbaec9365393355e058a0d062dc065426d082d876b35a2ebc7 |
Close
Hashes for xlmhg-2.2.11-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836779bb9783347e84bb80e3eb92e07f076ecfda889aabb7ff5149ab776f085a |
|
MD5 | a98b07b72717346d573f245bf62b8280 |
|
BLAKE2b-256 | 80ec5c60fcef21166ba9d693ebfa137ce4734ad3439e3cfe0bb1ef6beb8a1a03 |
Close
Hashes for xlmhg-2.2.11-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb99531d2be236a6f8adef820a19aca07f895fdec44937c002ee4ab58f4a18b |
|
MD5 | 893c8b4900b95de9373ddf5eba417905 |
|
BLAKE2b-256 | 7f1c5a2bf17908ee55a84c88c9e051c4d849a9326ef3310a562426a8f0f2afb6 |
Close
Hashes for xlmhg-2.2.11-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a273717512933a2fc047965d9cd53f721eaa7539f9b261f21802adf368b3a3 |
|
MD5 | 3600ae0ce3b192aa3207662c54958a90 |
|
BLAKE2b-256 | f783cd8ee435840763f1fb255bc24e8d56ea182264f1b7bab488cefcd8103ac7 |
Close
Hashes for xlmhg-2.2.11-cp27-cp27m-macosx_10_6_x86_64.macosx_10_9_x86_64.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82f78dca3d1bee6cb195e3423a1f4eee24287708d471a2ed97ee0b10500c277 |
|
MD5 | 903c26d46658ac4d1d4a78aa6ed75576 |
|
BLAKE2b-256 | 85a859566a03b155cc67d128dd8eac108b457c7126ac7653dbd125ad5126c9bb |