{ "info": { "author": "Emmanuel Noutahi", "author_email": "fmr.noutahi@umontreal.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "[![PyPI version](https://badge.fury.io/py/FisherExact.svg)](https://badge.fury.io/py/FisherExact)\n\n# FisherExact\n\nFisher exact test for mxn contingency table\n\n## Installation \n\nFisherExact should be python2/3 compatible. You can install it with pip : `pip install FisherExact`\n\nIf you get an error about builtins module, install \"future\" with `pip install future`\n\nThis package use fortran sources, so you need to have a fortran compiler (`gfortran`) installed. See here ==> https://gcc.gnu.org/wiki/GFortranBinaries.\n\nThe source code was tested on Linux and Mac (thanks to [@fomightez](https://github.com/fomightez))\n\n## Binary Usage\n\nA binary is provided to use FisherExact from the terminal\n\n\tusage: fexact [-h] [--simulate [SIMULATE]] [--hybrid] [--midP]\n\t [--retry ATTEMPT] [--workspace WORKSPACE] [--version]\n\t table\n\n\tFisher's Exact test for mxn contingency table\n\n\tpositional arguments:\n\t table Contingency table in a file, without header\n\n\toptional arguments:\n\t -h, --help show this help message and exit\n\t --simulate [SIMULATE]\n\t Simulate p-values with n replicates\n\t --hybrid Use hybrid mode\n\t --midP Use midP correction\n\t --retry ATTEMPT Number of attempt to made if execution fail\n\t --workspace WORKSPACE\n\t Workspace size to use, Increase this if the program\n\t crash\n\t --version show program's version number and exit\n\n\n## Contingency table format if fexact is used as binary\n\nThe accepted format is space/tab or comma (or both) separated values with an optionnal first line starting with a \"#\" that specified the number of rows and column:\n\nFor example, the following format are accepted\n\n```\n# 2 3\n8 2 12\n1 5 2\n```\n\n```\n8 2 12\n1 5 2\n```\n\n```\n#2, 3\n8\t2\t12\n1\t5\t2\n```\n\n```\n8,2,12\n1,5,2\n```\n\n\n## Use as a module\n\n\tfisher_exact(table, alternative='two-sided', hybrid=False, midP=False, simulate_pval=False, replicate=2000, workspace=300, attempt=2, seed=None)\n Performs a Fisher exact test on a mxn contingency table.\n \n Parameters\n ----------\n table : array_like of ints\n A 2x2 contingency table. Elements should be non-negative integers.\n alternative : {'two-sided', 'less', 'greater'}, optional\n Which alternative hypothesis to the null hypothesis the test uses.\n Default is 'two-sided'. Only used in the 2 x 2 case (with the scipy function).\n In every other case, the two-sided pval is returned.\n mult : int \n Specify the size of the workspace used in the network algorithm. \n Only used for non-simulated p-values larger than 2 x 2 table. \n You might want to increase this if the p-value failed\n hybrid : bool\n Only used for larger than 2 x 2 tables, in which cases it indicates\n whether the exact probabilities (default) or a hybrid approximation \n thereof should be computed.\n midP : bool\n Use this to enable mid-P correction. Could lead to slow computation.\n This is not applicable for simulation p-values. `alternative` cannot \n be used if you enable midpoint correction.\n simulate_pval : bool \n Indicate whether to compute p-values by Monte Carlo simulation,\n in larger than 2 x 2 tables.\n replicate : int\n An integer specifying the number of replicates used in the Monte Carlo test.\n workspace : int\n An integer specifying the workspace size. Default value is 300. \n attempt : int\n Number of attempts to try, if the workspace size is not enough. \n On each attempt, the workspace size is doubled. \n seed : int\n Random number to use as seed. If a seed isn't provided. 4 bytes will be read \n from os.urandom. If this fail, getrandbits of the random module \n (with 32 random bits) will be used. In the particular case where both failed,\n the current time will be used\n \n Returns\n -------\n p_value : float\n The probability of a more extreme table, where 'extreme' is in a \n probabilistic sense.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/maclandrol/FisherExact/archive/1.4.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maclandrol/FisherExact", "keywords": "statistic fisher independence test", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "FisherExact", "package_url": "https://pypi.org/project/FisherExact/", "platform": "", "project_url": "https://pypi.org/project/FisherExact/", "project_urls": { "Download": "https://github.com/maclandrol/FisherExact/archive/1.4.2.tar.gz", "Homepage": "https://github.com/maclandrol/FisherExact" }, "release_url": "https://pypi.org/project/FisherExact/1.4.2/", "requires_dist": null, "requires_python": "", "summary": "Fishe's Exact test for mxn contingency table", "version": "1.4.2" }, "last_serial": 3627220, "releases": { "1.3": [ { "comment_text": "", "digests": { "md5": "1df352ed2d08bc0c6ec9aefbc2dfc8a5", "sha256": "343305807a789cde1b8fdd30ca1f3ac97c538c63117587632f1a04b097341b97" }, "downloads": -1, "filename": "FisherExact-1.3.tar.gz", "has_sig": false, "md5_digest": "1df352ed2d08bc0c6ec9aefbc2dfc8a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39295, "upload_time": "2017-02-23T00:24:50", "url": "https://files.pythonhosted.org/packages/59/7b/4e12efac0153de36000e483c43ba124154c4b4a39958eaf1c08e591c0af2/FisherExact-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "3e045acc9f75444990d31fa9a8e6c140", "sha256": "356388e5a7141521a8eaec03ece21d5f0b0230f54192308b222ccbfe84913046" }, "downloads": -1, "filename": "FisherExact-1.4.tar.gz", "has_sig": false, "md5_digest": "3e045acc9f75444990d31fa9a8e6c140", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39835, "upload_time": "2018-02-22T06:26:53", "url": "https://files.pythonhosted.org/packages/68/9b/ea1d5fed402e18abb189538a692dbfa98a24ebbe83226c633dceccd31522/FisherExact-1.4.tar.gz" } ], "1.4.2": [ { "comment_text": "", "digests": { "md5": "76cc38df2a2b527dd549a65b171ac451", "sha256": "5b77b5219bc4412ec9a91314bbf2dd686fe9be5502ebd481ef3f1aad9aab6971" }, "downloads": -1, "filename": "FisherExact-1.4.2.tar.gz", "has_sig": false, "md5_digest": "76cc38df2a2b527dd549a65b171ac451", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39853, "upload_time": "2018-03-01T01:41:58", "url": "https://files.pythonhosted.org/packages/6f/e9/a849764e3da0f166cd1e37c624fc74f918920c72feb72f351854cbfedd94/FisherExact-1.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "76cc38df2a2b527dd549a65b171ac451", "sha256": "5b77b5219bc4412ec9a91314bbf2dd686fe9be5502ebd481ef3f1aad9aab6971" }, "downloads": -1, "filename": "FisherExact-1.4.2.tar.gz", "has_sig": false, "md5_digest": "76cc38df2a2b527dd549a65b171ac451", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39853, "upload_time": "2018-03-01T01:41:58", "url": "https://files.pythonhosted.org/packages/6f/e9/a849764e3da0f166cd1e37c624fc74f918920c72feb72f351854cbfedd94/FisherExact-1.4.2.tar.gz" } ] }