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.12.tar.gz
(122.2 kB
view hashes)
Built Distributions
xlmhg-2.2.12-cp35-cp35m-win32.whl
(63.1 kB
view hashes)
xlmhg-2.2.12-cp27-cp27m-win32.whl
(67.2 kB
view hashes)
Close
Hashes for xlmhg-2.2.12-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aa7ee8502b96c583e9b250a8d0333cf7a776d483b10d8617d4110efe5dbabb2 |
|
MD5 | 30629ae9c85e9cb5424783037e07774f |
|
BLAKE2b-256 | 7cd0c3c4bb716fcc591094d9f399ccffefc2ab3caaae585e4acad7b5de0df26e |
Close
Hashes for xlmhg-2.2.12-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4116b02af785168b062bf445bf4b5f7b396fe75f97f120c0b491aa545713655d |
|
MD5 | 96b51679a7cdc55ad15b8d73a617990b |
|
BLAKE2b-256 | b9a2bf8cf563646f7000c32cdfb3e9404bb43a871606afe702bef4a922f330b0 |
Close
Hashes for xlmhg-2.2.12-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cd90c2fe612ddaa001f4574dca7daea08df115bbcaf224a188d81239630ce7b |
|
MD5 | 4ba992e5dbed956e61f03b49cf85bf97 |
|
BLAKE2b-256 | 0676ee583ffd0f2a83953ae3e1e4e205b0dc919b8116dcccaf41a87933292d5d |
Close
Hashes for xlmhg-2.2.12-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a70a6c057e0cca9c393784ac74da5545b33c76c7d58764f13513e6d19b95b04 |
|
MD5 | 273f28af8117c565b88c1753fb205b8c |
|
BLAKE2b-256 | 32ab88e600a38c6e56a848de3472752a69ea3f2f9396ae8f782719b2ca3524f4 |
Close
Hashes for xlmhg-2.2.12-cp35-cp35m-macosx_10_6_x86_64.macosx_10_9_x86_64.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd396bddf6453b6d7e4f7190de8e1a0c8b34bda88246304fdb20267fa71827e |
|
MD5 | 2ae10e7c470ce2de2bdcba80e3af3650 |
|
BLAKE2b-256 | aa2a7494c371d02548c03c3fb91a13a07a6e9133ab96f8d086b9dc1937dfc00a |
Close
Hashes for xlmhg-2.2.12-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 987cab18baed9f362678946b6591cdd6a85a4740cfe04ca5c7f1bb20fc2fc120 |
|
MD5 | 0f5f879ef1133ee7dc5c26f9439a7f76 |
|
BLAKE2b-256 | 9161179652b853962dbf20f5fefa82bc45d706b84667eb1cf3c79deaeb070cb0 |
Close
Hashes for xlmhg-2.2.12-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83adc9e792b4ac1ae060cb7896d668e3aa92ffb29d78198cb15160a6e8925818 |
|
MD5 | 546f385ca757ab394614368879221da8 |
|
BLAKE2b-256 | 2e2adc052ed0a3b20e5c45e4071620fe26a304ff8f54a8cfab61d16a55eafd07 |
Close
Hashes for xlmhg-2.2.12-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 728207789c42704b9f1018b26c5191bb8e09879138a2af53173abcfd8e524310 |
|
MD5 | bb77991a6776e03ceacb04955b6c7a74 |
|
BLAKE2b-256 | 54bf48717852915e016321e357c4067c5649965925ab0fb6bed5a58d28c87fda |
Close
Hashes for xlmhg-2.2.12-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f14b6627b9d0f84350174bfc61fe8139f2e997607b1ff1d6db4104226150ebbc |
|
MD5 | b17764d59acaa52fc84d9046894b7842 |
|
BLAKE2b-256 | 822fe9d1f6bee33550ed60f5e4ee6cd58aa5e62ddd3549860ba414c14b6bf9c2 |
Close
Hashes for xlmhg-2.2.12-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44277b785bbb39fe39240818824e61b7ed8034f81094816e911c4a1f231762ed |
|
MD5 | 81cb75dbfad06e56eeb3f9d1aa06535a |
|
BLAKE2b-256 | de2f34522525d01c30a58daadb9daa2563cbff33d26e6a2d9ae886429a54e4f2 |
Close
Hashes for xlmhg-2.2.12-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4692b4aaedb477c7c8beab66f8e68e77a56bf2718b5eacb2e870689cf3ba134 |
|
MD5 | 593c5bf6434b5d9525c3204901f8d9a2 |
|
BLAKE2b-256 | 4ddfde6927ce8aae452bd2599713133f12f63e9ee423680531e9e0d3ed772b39 |
Close
Hashes for xlmhg-2.2.12-cp27-cp27m-macosx_10_6_x86_64.macosx_10_9_x86_64.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51e0d4b64dadda32ba7c0b94abb4669b3ade11d9cccaa91fd9c9ffc74261d2f2 |
|
MD5 | b6798cf8af67cf8c6993293c54090c4a |
|
BLAKE2b-256 | 334ae01a0035cd8594183afc416c2bac4411474bf22b42b94d3c445c72b1f994 |