{"_id":"56eb399b95a53a32007e464e","__v":4,"parentDoc":null,"project":"5476bf0f817e8d080031f988","user":"568ed50cbeb2700d00471802","category":{"_id":"5477c48ff3736008009e9eb8","pages":["54d070b1f530ca0d000539c4","54d070d894f7980d0081b8af","54d070e38d51780d004ca662","54d3724787ea950d00f1bcc4","54d372a9d0b2871900cda711","54d372c969578e0d0027311d","54d5074749e4600d000f595a","54d50c9297de990d00f7958d","54e90556eb27f50d00db558c","54eed0c3a7306e19003f1ec7","54f01256fb47ae0d00ba9a7d","54fa117fec0ee817000efbba","550a7f01b6fd572500a57a27","5540578e23c53c0d00cccfaf","55d693d860fc730d00fc264a","56a0278341766e0d00b28c67","56eb399b95a53a32007e464e"],"project":"5476bf0f817e8d080031f988","__v":17,"version":"5476bf10817e8d080031f98b","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2014-11-28T00:40:47.372Z","from_sync":false,"order":2,"slug":"inventory","title":"Inventory"},"version":{"_id":"5476bf10817e8d080031f98b","__v":17,"project":"5476bf0f817e8d080031f988","createdAt":"2014-11-27T06:05:04.263Z","releaseDate":"2014-11-27T06:05:04.263Z","categories":["5476bf10817e8d080031f98c","5477c46cf3736008009e9eb5","5477c474f3736008009e9eb6","5477c47ef3736008009e9eb7","5477c48ff3736008009e9eb8","5477c4948deb230800808bf0","54e68328154f8e0d0007b55c","54e90194c8e0c00d007ac061","54eed2275bf74a0d00ef4076","54f7a7be0a3cbb0d00d666fb","559b0ebf7ae7f80d0096d871","55d697f9ae529e0d00d34f03","562d4dcc8c6e5a0d00d6ed1d","562e591c4376430d006f17e0","568f0e73bdb9260d00149d8c","5719542aac1e2e0e001834c6","57a14a8ed778850e0047e230"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-17T23:11:23.861Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":6,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Note that this is only relevant if you are writing your own protocols with Autoprotocol\"\n}\n[/block]\nIf you are writing your own protocols you may need to use LB-agar plates. You can use these in your project by using the functions here implemented in Autoprotocol-python. Agar plates can be reserved from the Transcriptic common reagent library. Copy the below code and save it to a file in your experiment project. You can then import the functions to use in your main protocol.\n\nBelow is an implementation in Python.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"from autoprotocol.container import Container\\nfrom autoprotocol.protocol import Ref\\n\\ndef ref_kit_container(protocol, name, container, kit_id, discard=True, store=None):\\n    kit_item = Container(None, protocol.container_type(container))\\n    if store:\\n        protocol.refs[name] = Ref(name, {\\\"reserve\\\": kit_id, \\\"store\\\": {\\\"where\\\": store}}, kit_item)\\n    else:\\n        protocol.refs[name] = Ref(name, {\\\"reserve\\\": kit_id, \\\"discard\\\": discard}, kit_item)\\n    return(kit_item)\\n\\n\\ndef return_agar_plates(wells):\\n    '''\\n        Dicts of all plates available that can be purchased.\\n    '''\\n    if wells == 6:\\n        plates = {\\\"lb-broth-50ug-ml-kan\\\": \\\"ki17rs7j799zc2\\\",\\n                  \\\"lb-broth-100ug-ml-amp\\\": \\\"ki17sbb845ssx9\\\",\\n                  \\\"lb-broth-100ug-ml-specto\\\": \\\"ki17sbb9r7jf98\\\",\\n                  \\\"lb-broth-100ug-ml-cm\\\": \\\"ki17urn3gg8tmj\\\",\\n                  \\\"noAB\\\": \\\"ki17reefwqq3sq\\\"}\\n    elif wells == 1:\\n        plates = {\\\"lb-broth-50ug-ml-kan\\\": \\\"ki17t8j7kkzc4g\\\",\\n                  \\\"lb-broth-100ug-ml-amp\\\": \\\"ki17t8jcebshtr\\\",\\n                  \\\"lb-broth-100ug-ml-specto\\\": \\\"ki17t8jaa96pw3\\\",\\n                  \\\"lb-broth-100ug-ml-cm\\\": \\\"ki17urn592xejq\\\",\\n                  \\\"noAB\\\": \\\"ki17t8jejbea4z\\\"}\\n    else:\\n        raise ValueError(\\\"Wells has to be an integer, either 1 or 6\\\")\\n    return(plates)\",\n      \"language\": \"python\",\n      \"name\": \"reserve_plates.py\"\n    }\n  ]\n}\n[/block]\n## Example usage\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import json\\nfrom autoprotocol.protocol import Protocol\\n# assuming you've pasted the above helper code into a file called reserve_plates.py:\\nfrom reserve_plates import *\\n\\nprotocol = Protocol()\\n\\nz10b = protocol.ref(\\\"Zymo10B\\\", None, \\\"micro-1.5\\\", discard=True)\\n# provision bacteria\\nprotocol.provision(\\\"rs16pbjc4r7vvz\\\", z10b.well(0), \\\"50:microliter\\\")\\n# dilute with LB\\nprotocol.provision(\\\"rs17bafcbmyrmh\\\", z10b.well(0), \\\"350:microliter\\\")\\nprotocol.mix(z10b.well(0), \\\"150:microliter\\\")\\nmyplate = ref_kit_container(protocol,\\n                            'my_agar_plate',\\n                            '6-flat',\\n                            return_agar_plates(6)['noAB'],\\n                            store='cold_4')\\nfor i in range(0,6):\\n    protocol.spread(z10b.well(0), myplate.well(i), \\\"60:microliter\\\")\\nprotocol.cover(myplate)\\nprotocol.incubate(myplate, \\\"warm_37\\\", \\\"16:hour\\\")\\n\\nprint json.dumps(protocol.as_dict(), indent=2)\",\n      \"language\": \"python\",\n      \"name\": \"experiment1.py\"\n    }\n  ]\n}\n[/block]","excerpt":"Use Agar plates in your own custom developed protocols","slug":"reserving-agar-plates","type":"fn","title":"Reserving Agar Plates"}

Reserving Agar Plates

Use Agar plates in your own custom developed protocols

[block:callout] { "type": "warning", "title": "Note that this is only relevant if you are writing your own protocols with Autoprotocol" } [/block] If you are writing your own protocols you may need to use LB-agar plates. You can use these in your project by using the functions here implemented in Autoprotocol-python. Agar plates can be reserved from the Transcriptic common reagent library. Copy the below code and save it to a file in your experiment project. You can then import the functions to use in your main protocol. Below is an implementation in Python. [block:code] { "codes": [ { "code": "from autoprotocol.container import Container\nfrom autoprotocol.protocol import Ref\n\ndef ref_kit_container(protocol, name, container, kit_id, discard=True, store=None):\n kit_item = Container(None, protocol.container_type(container))\n if store:\n protocol.refs[name] = Ref(name, {\"reserve\": kit_id, \"store\": {\"where\": store}}, kit_item)\n else:\n protocol.refs[name] = Ref(name, {\"reserve\": kit_id, \"discard\": discard}, kit_item)\n return(kit_item)\n\n\ndef return_agar_plates(wells):\n '''\n Dicts of all plates available that can be purchased.\n '''\n if wells == 6:\n plates = {\"lb-broth-50ug-ml-kan\": \"ki17rs7j799zc2\",\n \"lb-broth-100ug-ml-amp\": \"ki17sbb845ssx9\",\n \"lb-broth-100ug-ml-specto\": \"ki17sbb9r7jf98\",\n \"lb-broth-100ug-ml-cm\": \"ki17urn3gg8tmj\",\n \"noAB\": \"ki17reefwqq3sq\"}\n elif wells == 1:\n plates = {\"lb-broth-50ug-ml-kan\": \"ki17t8j7kkzc4g\",\n \"lb-broth-100ug-ml-amp\": \"ki17t8jcebshtr\",\n \"lb-broth-100ug-ml-specto\": \"ki17t8jaa96pw3\",\n \"lb-broth-100ug-ml-cm\": \"ki17urn592xejq\",\n \"noAB\": \"ki17t8jejbea4z\"}\n else:\n raise ValueError(\"Wells has to be an integer, either 1 or 6\")\n return(plates)", "language": "python", "name": "reserve_plates.py" } ] } [/block] ## Example usage [block:code] { "codes": [ { "code": "import json\nfrom autoprotocol.protocol import Protocol\n# assuming you've pasted the above helper code into a file called reserve_plates.py:\nfrom reserve_plates import *\n\nprotocol = Protocol()\n\nz10b = protocol.ref(\"Zymo10B\", None, \"micro-1.5\", discard=True)\n# provision bacteria\nprotocol.provision(\"rs16pbjc4r7vvz\", z10b.well(0), \"50:microliter\")\n# dilute with LB\nprotocol.provision(\"rs17bafcbmyrmh\", z10b.well(0), \"350:microliter\")\nprotocol.mix(z10b.well(0), \"150:microliter\")\nmyplate = ref_kit_container(protocol,\n 'my_agar_plate',\n '6-flat',\n return_agar_plates(6)['noAB'],\n store='cold_4')\nfor i in range(0,6):\n protocol.spread(z10b.well(0), myplate.well(i), \"60:microliter\")\nprotocol.cover(myplate)\nprotocol.incubate(myplate, \"warm_37\", \"16:hour\")\n\nprint json.dumps(protocol.as_dict(), indent=2)", "language": "python", "name": "experiment1.py" } ] } [/block]