{ "info": { "author": "Kevin Hartmann", "author_email": "Kevin.Hartmann@oicr.on.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": ".. icgc documentation master file, created by\n sphinx-quickstart on Fri Nov 3 16:04:44 2017.\n\nThe ICGC Python REST Client\n============================\n\nThe ICGC REST client is a simple python module that allows you to access the **International Consortium for Cancer and Genomics** web portal () directly through Python, with a minimum of coding effort.\n\nIt lets you write queries in our Portal Query Language ( `PQL `_ ) that fetch data from the ICGC web portal as JSON objects. From there, you can use the power of Python to process and analyze the data within those objects however you see fit. \n\nHere's an example that shows you how easy it is to get started!\n::\n\n \"\"\"\n query.py\n\n This script demonstrates running a simple PQL query against the ICGC data\n portal with the icgc module.\n \"\"\"\n from __future__ import absolute_import, print_function\n\n import icgc\n\n\n def run():\n \"\"\"\n Demonstrate PQL by displaying 1 of each request type as JSON output\n \"\"\"\n for request_type in icgc.request_types():\n response = icgc.query(request_type=request_type,\n pql='select(*),limit(1)')\n print(request_type, \"===\\n\\n\", response)\n\n\n if __name__ == '__main__':\n run()\n\nHere's an a simple program that demonstrates how Python can be used with the\nicgc Python module to automate decision making: in this case, which files we want to download from the ICGC web portal. \n\n::\n\n from __future__ import absolute_import, print_function\n import icgc\n\n KB = 1024\n MB = 1024 * KB\n\n\n def run():\n \"\"\"\n Show an example of a PQL download with automated decision making.\n\n We download up to a maximum of 10 MB of data from the portal, of any type\n that will fit within our download limit, and save our the results as a\n tarfile named 'test.tar'.\n \"\"\"\n pql = 'eq(donor.primarySite,\"Brain\")'\n\n # Find which items are available that match our pql query, and how big\n # each of the result file are.\n\n sizes = icgc.download_size(pql)\n print(\"Sizes are: {}\".format(sizes))\n\n # We'll only include a file in our tarfile if the total is below our\n # 10 MB limit. Our tarfile size calculation is approximate; the\n # files inside the tarfile get compressed; so the total size of the tarfile\n # that we download might be smaller than we calculate.\n\n max_size = 10 * MB\n current_size = 0\n\n includes = []\n for k in sizes:\n item_size = sizes[k]\n if current_size + item_size < max_size:\n includes.append(k)\n current_size += item_size\n\n print(\"Including items {}\".format(includes))\n print(\"Approximate download size={:.2f} MB\".format(current_size / MB))\n\n # Download the information, and save the results in the file \"test.tar\"\n icgc.download(pql, includes, \"test\")\n\n\n if __name__ == \"__main__\":\n run()\n\nInstallation\n------------\nYou can install icgc using *pip* by running:\n **pip install icgc**\n\nIf you prefer, you can also download the source code from the url below.\n\nContribute\n----------\nIf you'd like to contribute to this project, it's hosted on github.\n\nSee https://github.com/icgc-dcc/icgc-python\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/icgc-dcc/icgc-python", "keywords": "icgc rest-client web-portal", "license": "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "maintainer": "", "maintainer_email": "", "name": "icgc", "package_url": "https://pypi.org/project/icgc/", "platform": "", "project_url": "https://pypi.org/project/icgc/", "project_urls": { "Homepage": "https://github.com/icgc-dcc/icgc-python" }, "release_url": "https://pypi.org/project/icgc/0.1.3/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A Python library interface to the International Cancer Genome Consortium's Web Portal", "version": "0.1.3" }, "last_serial": 3356065, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3b6910c57e38556cf9c91fb2999e5d8a", "sha256": "2a8023cf4e499f045c4321b0bd034fca22b2cfff962f97faab49cef44c3280f2" }, "downloads": -1, "filename": "icgc-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3b6910c57e38556cf9c91fb2999e5d8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7654, "upload_time": "2017-11-15T16:51:38", "url": "https://files.pythonhosted.org/packages/83/ef/9a1d0a96b9f5745331ea78544aff54551fa8f26c35885e1751aa61754047/icgc-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "33a0a95b7892622850d0cd6df2ec3e41", "sha256": "a16a1fc87e627c189ac1aa273e9c60d2cab882560b9de84d278899b7efd4ccec" }, "downloads": -1, "filename": "icgc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "33a0a95b7892622850d0cd6df2ec3e41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6323, "upload_time": "2017-11-15T16:51:39", "url": "https://files.pythonhosted.org/packages/a5/b1/aaf387249ae12aff71a3185a6412bbe417355820c4a214d3b80677c4a1c5/icgc-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e47354b3696b82145d81b481da3bfce2", "sha256": "7c28cf7c0298c2a420ebb803eef5a4401f0757c6993ec67fe493ceb8f510b844" }, "downloads": -1, "filename": "icgc-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e47354b3696b82145d81b481da3bfce2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7715, "upload_time": "2017-11-22T17:03:34", "url": "https://files.pythonhosted.org/packages/34/fe/76577910763889a6b7e364e7585915a7eb091bbf3890746eb52533426af8/icgc-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97fb3d66d12e62fa0a0cd1936be85ca1", "sha256": "667e5fd8cf671417cb1eaabd805584d31845624fbf11ce806f04e18a73e45e2e" }, "downloads": -1, "filename": "icgc-0.1.2.tar.gz", "has_sig": false, "md5_digest": "97fb3d66d12e62fa0a0cd1936be85ca1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6382, "upload_time": "2017-11-22T17:03:36", "url": "https://files.pythonhosted.org/packages/b6/15/e8a0b7b30646a1470c47cbb29140d7ee66661d00a01783d45fa652a08b28/icgc-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ea4b7a65d326f1c2b9a6f9bb54f25658", "sha256": "014371acb2165deb92e6a4b4ebd9cb77eaf00711a33b783ddb9384897b863020" }, "downloads": -1, "filename": "icgc-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea4b7a65d326f1c2b9a6f9bb54f25658", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7763, "upload_time": "2017-11-22T18:38:28", "url": "https://files.pythonhosted.org/packages/17/05/26e025827c7bb6ca56513adedb6eeff5facd7f570c5443c49a72fb4295eb/icgc-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7bb5725d5deed5eb08bbad26725f8058", "sha256": "e6ef9f0815126f6c388ce144937015f1f8f2572d12099695c22963010c53506f" }, "downloads": -1, "filename": "icgc-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7bb5725d5deed5eb08bbad26725f8058", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6422, "upload_time": "2017-11-22T18:38:31", "url": "https://files.pythonhosted.org/packages/a1/35/fc95fed0e78e981f8a184b2f809af0397a9d1ccb6b946e8b547b77c71a88/icgc-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ea4b7a65d326f1c2b9a6f9bb54f25658", "sha256": "014371acb2165deb92e6a4b4ebd9cb77eaf00711a33b783ddb9384897b863020" }, "downloads": -1, "filename": "icgc-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea4b7a65d326f1c2b9a6f9bb54f25658", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7763, "upload_time": "2017-11-22T18:38:28", "url": "https://files.pythonhosted.org/packages/17/05/26e025827c7bb6ca56513adedb6eeff5facd7f570c5443c49a72fb4295eb/icgc-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7bb5725d5deed5eb08bbad26725f8058", "sha256": "e6ef9f0815126f6c388ce144937015f1f8f2572d12099695c22963010c53506f" }, "downloads": -1, "filename": "icgc-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7bb5725d5deed5eb08bbad26725f8058", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6422, "upload_time": "2017-11-22T18:38:31", "url": "https://files.pythonhosted.org/packages/a1/35/fc95fed0e78e981f8a184b2f809af0397a9d1ccb6b946e8b547b77c71a88/icgc-0.1.3.tar.gz" } ] }