{ "info": { "author": "Brendan Hosking", "author_email": "brendan.hosking@csiro.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: Other/Proprietary License", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "### bitepi\n\nbitepi is a python wrapper around the BitEpi project found at [https://github.com/aehrc/BitEpi](https://github.com/aehrc/BitEpi). It provides a pandas\ninterface for identification of epistasis interactions.\nIt exposes a single **Epistasis** class, through which the analysis can be\nperformed by calling **compute_epistasis**.\n\nInput is two arrays, which can be lists, numpy arrays or pandas dataframes.\n\nsample_array contains mappings of sample names to case (1) or control (0).\nNote that the header is ignored for numpy arrays and pandas dataframes, and\nshould not be present in python lists.\n\nsample | case/control\n--- | ---\nS1 | 0\nS2 | 1\nS3 | 1\nS4 | 0\nS5 | 0\n\ngenotype_array contains the genotypes of each sample at each SNP, with a 0, 1\nand 2 representing 0|0, 0|1 and 1|1 respectively. Headers are used to match\nsamples to the sample_array, but the first column's header is ignored.\n\nSNP | S1 | S2 | S3 | S4 | S5\n---|---|---|---|---|---\nsnpA | 0 | 0 | 2 | 1 | 0\nsnpB | 2 | 1 | 2 | 1 | 2\nsnpC | 0 | 1 | 1 | 2 | 1\nsnpD | 0 | 2 | 2 | 2 | 1\nsnpE | 1 | 1 | 1 | 0 | 1\n\nThe sets of samples do not need to match exactly, unless **Epistasis** is\ncalled with *strict_intersect=True*. If the sample sets do not match, analysis is done on the intersect.\n\nThe output will be a dictionary, with metric codes e.g. \"IG.1\" as the keys and\npandas dataframes as the values.\n\n```python\nimport bitepi\nsample_array = [\n ['S1', 0],\n ['S2', 1],\n ['S3', 1],\n ['S4', 0],\n ['S5', 0],\n]\ngenotype_array = [\n ['SNP', 'S1', 'S2', 'S3', 'S4', 'S5'],\n ['snpA', 0, 0, 2, 1, 2],\n ['snpB', 2, 1, 2, 1, 2],\n ['snpC', 0, 0, 1, 1, 1],\n ['snpD', 2, 2, 1, 2, 1],\n ['snpE', 0, 1, 1, 1, 2],\n]\nepistasis = bitepi.Epistasis(\n genotype_array=genotype_array,\n sample_array=sample_array,\n)\ninteractions = epistasis.compute_epistasis(\n sort=True,\n best_ig=True,\n)['best_ig']\n\nprint(interactions)\n```\n\nThis should return:\n\n```\n SNP SNP_P PAIR_P TRIPLET_P QUADLET_P SNP_IG PAIR_IG TRIPLET_IG QUADLET_IG PAIR TRIPLET_1 TRIPLET_2 QUADLET_1 QUADLET_2 QUADLET_3\n0 snpA 1.707692 2.000000 2.109091 0.0 1.187692 0.266667 0.109091 0.0 snpE snpB snpE snpA snpA snpA\n1 snpB 1.642424 1.909091 2.109091 0.0 1.122424 0.266667 0.200000 0.0 snpC snpC snpE snpA snpA snpA\n2 snpC 1.641026 1.909091 2.109091 0.0 1.121026 0.266667 0.200000 0.0 snpB snpD snpE snpA snpA snpA\n3 snpD 1.642424 1.909091 2.109091 0.0 1.122424 0.175758 0.200000 0.0 snpE snpC snpE snpA snpA snpA\n4 snpE 1.733333 2.000000 2.109091 0.0 1.213333 0.266667 0.200000 0.0 snpA snpC snpD snpA snpA snpA\n\n```\n\nFor higher order interactions (p3, ig3, p4 and ig4) Epistasis may take several\nminutes to run, depending on the number of SNPs. If more information is\nrequired when running, the logging level can be increased to `logging.INFO`\nor `logging.DEBUG`. `logging.DEBUG` will provide the greatest detail, including\nlogging from within the binary.\n\n```python\nimport logging\nlogging.root.setLevel(logging.DEBUG)\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/bhosking/bitepi-python/archive/v0.1.9.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bhosking/bitepi-python", "keywords": "BIONINFORMATICS,EPISTASIS", "license": "", "maintainer": "", "maintainer_email": "", "name": "bitepi", "package_url": "https://pypi.org/project/bitepi/", "platform": "", "project_url": "https://pypi.org/project/bitepi/", "project_urls": { "Download": "https://github.com/bhosking/bitepi-python/archive/v0.1.9.tar.gz", "Homepage": "https://github.com/bhosking/bitepi-python" }, "release_url": "https://pypi.org/project/bitepi/0.1.9/", "requires_dist": null, "requires_python": ">=3", "summary": "Python wrapper for the BitEpi program, for finding epistasisinteractions", "version": "0.1.9" }, "last_serial": 5993346, "releases": { "0.1.8": [ { "comment_text": "", "digests": { "md5": "16bc87b1d4d0769e9b7137e46792de23", "sha256": "687271fe8b33d3a57b290fb7b7bc2227b8f5d52816dec58f9149655ca596bcd6" }, "downloads": -1, "filename": "bitepi-0.1.8-cp37-cp37m-macosx_10_11_x86_64.whl", "has_sig": false, "md5_digest": "16bc87b1d4d0769e9b7137e46792de23", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">=3", "size": 28719, "upload_time": "2019-10-10T02:18:39", "url": "https://files.pythonhosted.org/packages/c6/8a/47ed3ef0067d78dc3908f9d16740b2d973cac5cc52dff58ee64a0e7a7a9e/bitepi-0.1.8-cp37-cp37m-macosx_10_11_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "01eaa7d4d22e64c2b7f331a22c215525", "sha256": "5ecfe15fe6823cb0fa2b1b521a2372974d321b21efd5facfc5f04ca5dea89b12" }, "downloads": -1, "filename": "bitepi-0.1.8.tar.gz", "has_sig": false, "md5_digest": "01eaa7d4d22e64c2b7f331a22c215525", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 19876, "upload_time": "2019-10-10T02:16:40", "url": "https://files.pythonhosted.org/packages/d6/a9/a9a44cabc564a2827a958e1e92a4ee90f0a9e1aa5a4561f9ba252b68b123/bitepi-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "4bad963365c131c33c1455c5e0714120", "sha256": "02821245d6a45deced7a89dbec77d643fa856265d27fe5608a9de2c7a414dc9b" }, "downloads": -1, "filename": "bitepi-0.1.9.tar.gz", "has_sig": false, "md5_digest": "4bad963365c131c33c1455c5e0714120", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 19954, "upload_time": "2019-10-18T02:17:33", "url": "https://files.pythonhosted.org/packages/d7/ff/b9b51cdec448fff3b05de2563e0e0e802a7283bf279e3ff6c11087f4ce6f/bitepi-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4bad963365c131c33c1455c5e0714120", "sha256": "02821245d6a45deced7a89dbec77d643fa856265d27fe5608a9de2c7a414dc9b" }, "downloads": -1, "filename": "bitepi-0.1.9.tar.gz", "has_sig": false, "md5_digest": "4bad963365c131c33c1455c5e0714120", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 19954, "upload_time": "2019-10-18T02:17:33", "url": "https://files.pythonhosted.org/packages/d7/ff/b9b51cdec448fff3b05de2563e0e0e802a7283bf279e3ff6c11087f4ce6f/bitepi-0.1.9.tar.gz" } ] }