{ "info": { "author": "Jeremy McRae", "author_email": "jmcrae@illumina.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "## ld_estimator: A package to estimate linkage disequilibrium\nComputes linkage disequilibrium in python. This uses the maximum-likelihood of\n[Excoffier & Slatkin](https://doi.org/10.1093/oxfordjournals.molbev.a040269),\njust converted from [HaploView](https://github.com/jazzywhit/Haploview) to c++\n, with python bindings. It's not too slow, can calculate ~1000 pairs per\nsecond.\n\n### Installation\nThe simplest way to install ld_estimator is through pip:\n```sh\npip install ld_estimator\n```\n\n### Usage\nUse ld_estimator within a python environment\n```python\nfrom ld_estimator import pairwise_ld\n\nvar1 = [(0, 0), (0, 0), (0, 1), (1, 0), (1, 1), (0, 1), (0, 0), (0, 0), (1, 1)]\nvar2 = [(0, 0), (0, 0), (0, 1), (1, 0), (1, 1), (0, 1), (0, 0), (1, 1), (1, 1)]\nis_haploid = [False, False, False, False, False, False, False, True, True, True]\nld = pairwise_ld(var1, var2, is_haploid)\nprint(ld.dprime)\nprint(ld.r_squared)\n\n# or calculate LD for all pairs of variants in a region in a VCF:\nfrom ld_estimator import region_ld\nvcf_path = 'PATH_TO_VCF'\nld = region_ld(vcf_path, chrom, start, end)\n\n# or calculate LD to a site within a region in a VCF. This defaults to checking\n# variants within a 100 kb window of the specified site.\nfrom ld_estimator import site_ld\nvcf_path = 'PATH_TO_VCF'\nld = site_ld(vcf_path, chrom, pos, window=200000)\n\n# can pass in multiple positions in the same region at once\nld = site_ld(vcf_path, chrom, [pos2, pos2, pos3], window=200000)\n\n# both region_ld() and site_ld() can take a list of sample IDs to subset the\n# samples used for calculating LD. For example:\nld = site_ld(vcf_path, chrom, pos, subset=['sample1', 'sample2'])\n\n# if the variant is on a sex chromosome, you'll have to pass in a list of sample\n# sexes (matching order of the subset IDs if present, otherwise the VCF samples)\nld = site_ld(vcf_path, 'X', 20000000, sexes=['male', 'female'])\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jeremymcrae/ld_estimator", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ld-estimator", "package_url": "https://pypi.org/project/ld-estimator/", "platform": "", "project_url": "https://pypi.org/project/ld-estimator/", "project_urls": { "Homepage": "https://github.com/jeremymcrae/ld_estimator" }, "release_url": "https://pypi.org/project/ld-estimator/1.0.5/", "requires_dist": null, "requires_python": ">3.6.0", "summary": "Package for estimating linkage disequilibrium", "version": "1.0.5" }, "last_serial": 5333800, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "51c689c1378beb148f9130fade6eba32", "sha256": "4bccee9d0ee071c93251c9cf83f49c3fd694a54e614b324e579eaea623544b0f" }, "downloads": -1, "filename": "ld_estimator-1.0.0.tar.gz", "has_sig": false, "md5_digest": "51c689c1378beb148f9130fade6eba32", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 94867, "upload_time": "2019-05-03T23:04:48", "url": "https://files.pythonhosted.org/packages/ec/08/e7efe451732eb38f0df979b779d57b0f9f2d65ae3a5c54d91b8ef1f00155/ld_estimator-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ab6faa5cd45a4d9987aacc439ca5d5fd", "sha256": "3c4756f950490fe16082a1d6755fe4ff15db7d16e66a397304a51f18f639066c" }, "downloads": -1, "filename": "ld_estimator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ab6faa5cd45a4d9987aacc439ca5d5fd", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96538, "upload_time": "2019-05-09T18:16:28", "url": "https://files.pythonhosted.org/packages/68/de/dd32c64d0155b2adcad94aaea5e9a18a509be7bc0cb2e0b25e143b5b67f0/ld_estimator-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c27e031e977e115b45c63d1fa54f9cf6", "sha256": "a1847a727c7092a7932086a8b4d45cd7440160b4c506f27de3fcd89e4df98c7e" }, "downloads": -1, "filename": "ld_estimator-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c27e031e977e115b45c63d1fa54f9cf6", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96580, "upload_time": "2019-05-09T18:32:04", "url": "https://files.pythonhosted.org/packages/49/b9/a5da72cf83f50a32ae15e2356358d3e454b8095a9d252d9bda83a3e2eb2b/ld_estimator-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "36a61371f73d00b0f1039f8b8eb17e7e", "sha256": "4c7ff2b9f8cc628a08f377e72e65db8988db1b7a81f06a3423532046aca3b491" }, "downloads": -1, "filename": "ld_estimator-1.0.3.tar.gz", "has_sig": false, "md5_digest": "36a61371f73d00b0f1039f8b8eb17e7e", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96591, "upload_time": "2019-05-09T18:37:31", "url": "https://files.pythonhosted.org/packages/29/65/065f3eca02028744bcdd8446abeb88ab1287c738062d25b759259bc5502c/ld_estimator-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "b8cb0b8d0d93c06d1f5f7f1d87d37e46", "sha256": "de1543ca307e011819237e81ac2d41de49d28cd94ca2e1a896f87de62853cac7" }, "downloads": -1, "filename": "ld_estimator-1.0.4.tar.gz", "has_sig": false, "md5_digest": "b8cb0b8d0d93c06d1f5f7f1d87d37e46", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96706, "upload_time": "2019-05-13T18:34:54", "url": "https://files.pythonhosted.org/packages/8a/d1/564412c4454fa8127bea8b86a55200d6ba4d6b55839d85a78a8c55828b12/ld_estimator-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "1c9766d94ca16c0e1e0ca90f8094732c", "sha256": "8da7cd1c368ed7feb18acb6a41f748db0dd1cba4d126f3848e1bfd12301bd445" }, "downloads": -1, "filename": "ld_estimator-1.0.5.tar.gz", "has_sig": false, "md5_digest": "1c9766d94ca16c0e1e0ca90f8094732c", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96840, "upload_time": "2019-05-29T18:36:14", "url": "https://files.pythonhosted.org/packages/ec/e0/94c5050125b17473f953fe2c922e7fc6693ab3a12e3197ea6487e694f36a/ld_estimator-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c9766d94ca16c0e1e0ca90f8094732c", "sha256": "8da7cd1c368ed7feb18acb6a41f748db0dd1cba4d126f3848e1bfd12301bd445" }, "downloads": -1, "filename": "ld_estimator-1.0.5.tar.gz", "has_sig": false, "md5_digest": "1c9766d94ca16c0e1e0ca90f8094732c", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 96840, "upload_time": "2019-05-29T18:36:14", "url": "https://files.pythonhosted.org/packages/ec/e0/94c5050125b17473f953fe2c922e7fc6693ab3a12e3197ea6487e694f36a/ld_estimator-1.0.5.tar.gz" } ] }