{ "info": { "author": "Zulko", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "IceBreaker\n----------\n\n.. image:: https://travis-ci.org/Edinburgh-Genome-Foundry/icebreaker.svg?branch=master\n :target: https://travis-ci.org/Edinburgh-Genome-Foundry/icebreaker\n\n.. image:: https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/icebreaker/badge.svg?branch=master\n :target: https://coveralls.io/github/Edinburgh-Genome-Foundry/icebreaker?branch=master\n\n\nIcebreaker provides Python interface for the `JBEI ICE sample manager `_.\n\nSee the full API documentation `here `_\n\nInstallation\n-------------\n\nIcebreaker is written for Python 3+. You can install icebreaker via PIP:\n\n.. code::\n\n sudo pip install icebreaker\n\nAlternatively, you can unzip the sources in a folder and type\n\n.. code::\n\n sudo python setup.py install\n\nExample of use\n---------------\n\nIn this example we assume that we are a lab who wants to find primers from its\ndatabase to sequence a given construct. We will (1) pull all our primers from\nICE, (2) find which primers are adapted to our sequence, using the\n`Primavera package `_, and\n(3) we will ask ICE for the location of the selected primers.\n\nConnexion to an ICE instance\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can connecct to your ICE instance using either an API token (see below\nfor how to create a token), or an email/password authentication.\n\n.. code:: python\n\n import icebreaker\n\n # CONNECT TO ICE\n configuration = dict(\n root=\"https://my.ice.instance.org\",\n api_token=\"WMnlYlWHz+BC+7eFV=...\",\n api_token_client = \"icebot\"\n )\n ice = icebreaker.IceClient(configuration)\n\nOr:\n\n.. code:: python\n\n # CONNECT TO ICE\n configuration = dict(\n root=\"https://my.ice.instance.org\",\n email=\"michael.swann@genomefoundry.org\",\n password = \"ic3ic3baby\"\n )\n ice = icebreaker.IceClient(configuration)\n\nThe configuration can also be written in a yaml file so you can write\n``IceClient('config.yml')`` where ``config.yml`` reads as follows:\n\n.. code:: yaml\n\n root: https://my.ice.instance.org\n email: michael.swann@genomefoundry.org\n password: ic3ic3baby\n\nExtracting all records from a folder\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNext we pull all primers in the database:\n\n.. code:: python\n\n # FIND THE ID OF THE FOLDER WITH ALL PRIMERS\n primers_folder = ice.get_folder_id(\"PRIMERS\", collection=\"SHARED\")\n\n # GET INFOS ON ALL ENTRIES IN THE FOLDER (PRIMER NAME, ID, CREATOR...)\n primers_entries = ice.get_folder_entries(primers_folder)\n\n # GET A BIOPYTHON RECORD FOR EACH PRIMER\n primers_records = {primer[\"id\"]: ice.get_record(primer[\"id\"])\n for primer in primers_entries}\n\n\nPrimer selection with Primavera\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNext provide this information to Primavera and select some primers (see the\n`Primavera docs `_):\n\n.. code:: python\n\n from primavera import PrimerSelector, Primer, load_record\n\n available_primers = [\n Primer(sequence=primers_records[entry['id']].seq.tostring(),\n name=entry['name'],\n metadata=dict(ice_id=entry['id']))\n for entry in primers_entries\n ]\n constructs = [load_record(\"RTM3_39.gb\", linear=False)]\n selector = PrimerSelector(read_range=(150, 1000), tm_range=(55, 70),\n size_range=(16, 25), coverage_resolution=10,\n primer_reuse_bonus=200)\n selected_primers = selector.select_primers(constructs, available_primers)\n\n\nFinding available samples\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFinally we look for available samples for each primer:\n\n.. code:: python\n\n selected_primers = set(sum(selected_primers, []))\n for primer in selected_primers:\n ice_id = primer.metadata.get(\"ice_id\", None)\n if ice_id is not None:\n samples = ice.get_samples(ice_id)\n if len(samples) > 0:\n location = icebreaker.sample_location_string(samples[0])\n print(\"Primer %s is in %s.\" % (primer.name, location))\n\nResult:\n\n.. code ::\n\n Primer PRV_EMMA_IN00042 is in PRIMER_PLATE_1/E06.\n Primer PRV_EMMA_IN00043 is in PRIMER_PLATE_1/F06.\n Primer PRV_EMMA_IN00028 is in PRIMER_PLATE_1/G04.\n Primer PRV_EMMA_IN00060 is in PRIMER_PLATE_1/G08.\n Primer PRV_EMMA_IN00064 is in PRIMER_PLATE_1/C09.\n Primer PRV_EMMA_IN00038 is in PRIMER_PLATE_1/A06.\n Primer PRV_EMMA_IN00068 is in PRIMER_PLATE_1/G09.\n\nGetting an ICE token\n--------------------\n\nThere are several ways to get ICE tokens. We suggest you create one throug\nthe web interface as follows (see screenshot for indications):\n\n0. Create an account with administrator rights\n1. Go to the administrator panel\n2. Click on \"API keys\"\n3. Click on \"create new\". Note everything down !\n\n.. image:: https://github.com/Edinburgh-Genome-Foundry/icebreaker/raw/master/docs/_static/api_key_screenshot.png\n :alt: screenshot\n :align: center\n\nLicense = MIT\n--------------\n\nIcebreaker is an open-source software originally written at the Edinburgh\nGenome Foundry by `Zulko `_ and `released on\nGithub `_ under\nthe MIT licence (\u00a2 Edinburg Genome Foundry). Everyone is welcome to\ncontribute !\n\n\nMore biology software\n-----------------------\n\n.. image:: https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/Edinburgh-Genome-Foundry.github.io/master/static/imgs/logos/egf-codon-horizontal.png\n :target: https://edinburgh-genome-foundry.github.io/\n\nIcebreaker is part of the `EGF Codons `_ synthetic biology software suite for DNA design, manufacturing and validation.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "synthetic biology sample manager", "license": "see LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "icebreaker", "package_url": "https://pypi.org/project/icebreaker/", "platform": "", "project_url": "https://pypi.org/project/icebreaker/", "project_urls": null, "release_url": "https://pypi.org/project/icebreaker/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Python API for the JBEI ICE sample manager.", "version": "0.2.0" }, "last_serial": 4338222, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e85a7c32bd09c037bb4be30e4ed5d1dc", "sha256": "5fee8286e826c21114dcfbcec30b3f98fa738bca58f090ae452eefa9b3e8b6ec" }, "downloads": -1, "filename": "icebreaker-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e85a7c32bd09c037bb4be30e4ed5d1dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18168, "upload_time": "2018-10-03T21:36:11", "url": "https://files.pythonhosted.org/packages/25/08/7314036da8dc8df7f497756bb515bac4b635d37dcb66e71396cbc6240663/icebreaker-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e85a7c32bd09c037bb4be30e4ed5d1dc", "sha256": "5fee8286e826c21114dcfbcec30b3f98fa738bca58f090ae452eefa9b3e8b6ec" }, "downloads": -1, "filename": "icebreaker-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e85a7c32bd09c037bb4be30e4ed5d1dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18168, "upload_time": "2018-10-03T21:36:11", "url": "https://files.pythonhosted.org/packages/25/08/7314036da8dc8df7f497756bb515bac4b635d37dcb66e71396cbc6240663/icebreaker-0.2.0.tar.gz" } ] }