{ "info": { "author": "Oren Amsalem, Guy Eyal, Noa Rogozinski, Michael Gevaert, Idan Segev", "author_email": "oren.amsalem1@mail.huji.ac.il", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Introduction\n===========\n\nNeuron_Reduce provides an analytical method for reducing neuron model complexity. It enables the mapping of synapses and active ion channels to a computationally simpler model while accelerating simulation speed by up to 200-fold for inputs consisting of thousands of dendritic synapses. Full details are available in the accompanied paper - https://doi.org/10.1101/506485\n\nInstallation\n===========\n\n``` pip install --user neuron_reduce```\n\nQuick Start\n===========\nThe following code show the main function that is used to reduce a complex cell. \n```python\ncomplex_cell # The model cell\nsynapses_list # A list of all synapse on this cell\nnetcon_list # A list of all netcons for the synapses on the cell\n\nimport neuron_reduce\nreduced_cell, synapses_list, netcons_list = neuron_reduce.subtree_reductor(complex_cell, synapses_list, netcons_list)\n```\n\nDetailed example\n===========\n\nCopy example folder from github\n```bash\ngit clone https://github.com/orena1/neuron_reduce.git\n```\n\nGo to example folder\n```bash\ncd neuron_reduce\ncd example\nnrnivmodl mod #compile the mod files\n```\n\nOpen python and run the following code\n\n\n```python\nfrom __future__ import division\nfrom neuron import gui,h\nimport numpy as np\nimport neuron_reduce\nimport time\nimport matplotlib.pyplot as plt\n\n\n\n#Create a L5_PC model\nh.load_file('L5PCbiophys3.hoc')\nh.load_file(\"import3d.hoc\")\nh.load_file('L5PCtemplate.hoc')\ncomplex_cell = h.L5PCtemplate('cell1.asc')\nh.celsius = 37\nh.v_init = complex_cell.soma[0].e_pas\n\n\n#Add synapses to the model\nsynapses_list, netstims_list, netcons_list, randoms_list = [], [], [] ,[]\n\nall_segments = [i for j in map(list,list(complex_cell.apical)) for i in j] + [i for j in map(list,list(complex_cell.basal)) for i in j]\nlen_per_segment = np.array([seg.sec.L/seg.sec.nseg for seg in all_segments])\nrnd = np.random.RandomState(10)\nfor i in range(10000):\n seg_for_synapse = rnd.choice(all_segments, p=len_per_segment/sum(len_per_segment))\n synapses_list.append(h.Exp2Syn(seg_for_synapse))\n if rnd.uniform()<0.85:\n e_syn, tau1, tau2, spike_interval, syn_weight = 0, 0.3, 1.8, 1000/2.5, 0.0016\n else:\n e_syn, tau1, tau2, spike_interval, syn_weight = -86, 1, 8, 1000/15.0, 0.0008\n #set synaptic varibales\n synapses_list[i].e, synapses_list[i].tau1, synapses_list[i].tau2 = e_syn, tau1, tau2\n #set netstim variables\n netstims_list.append(h.NetStim())\n netstims_list[i].interval, netstims_list[i].number, netstims_list[i].start, netstims_list[i].noise = spike_interval, 9e9, 100, 1\n #set random\n randoms_list.append(h.Random())\n randoms_list[i].Random123(i)\n randoms_list[i].negexp(1)\n netstims_list[i].noiseFromRandom(randoms_list[i]) \n #set netcon varibales \n netcons_list.append(h.NetCon(netstims_list[i], synapses_list[i] ))\n netcons_list[i].delay, netcons_list[i].weight[0] = 0, syn_weight\n\n#Simulate the full neuron for 1 seconds\nsoma_v = h.Vector()\nsoma_v.record(complex_cell.soma[0](0.5)._ref_v)\n\ntime_v = h.Vector()\ntime_v.record(h._ref_t)\n\nh.tstop = 1000\nst = time.time()\nh.run()\nprint('complex cell simulation time {:.4f}'.format(time.time()-st))\ncomplex_cell_v = list(soma_v)\n\n\n\n#apply Neuron_Reduce to simplify the cell\nreduced_cell, synapses_list, netcons_list = neuron_reduce.subtree_reductor(complex_cell, synapses_list, netcons_list, reduction_frequency=0, total_segments_manual=-1)\nfor r in randoms_list:r.seq(1) #reset random\n\n\n#Running the simulation again but now on the reduced cell\nst = time.time()\nh.run()\nprint('reduced cell simulation time {:.4f}'.format(time.time()-st))\nreduced_celll_v = list(soma_v)\n\n#plotting the results\nplt.figure()\n\nplt.plot(time_v, complex_cell_v, label='complex cell')\nplt.plot(time_v, reduced_celll_v, label='redcued cell')\nplt.show()\n```\n\nCitation\n===========\nhttps://doi.org/10.1101/506485\n\n\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/orena1/neuron_reduce", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "neuron-reduce", "package_url": "https://pypi.org/project/neuron-reduce/", "platform": "", "project_url": "https://pypi.org/project/neuron-reduce/", "project_urls": { "Homepage": "https://github.com/orena1/neuron_reduce" }, "release_url": "https://pypi.org/project/neuron-reduce/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "Efficient analytical reduction of nonlinear detailed neuron models", "version": "0.0.6" }, "last_serial": 5767179, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "57887285f5619025ba4fc65b2a2dcd56", "sha256": "982d9ba3e0e93d3687ca01abdf95966c10bbe101a28e86d2ed490b3985dce982" }, "downloads": -1, "filename": "neuron_reduce-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "57887285f5619025ba4fc65b2a2dcd56", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 19978, "upload_time": "2018-12-14T13:55:51", "url": "https://files.pythonhosted.org/packages/d8/28/e701b4d41fb46ceb260fe0293f7443e7c139c91b6151b61952c2f7e3163a/neuron_reduce-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97884a6b61c35ced87fa64583892f9f2", "sha256": "61782cb3111c7c1ffbead6175116ab72ec75ece2a6cc35223fb87b80846fc1a7" }, "downloads": -1, "filename": "neuron_reduce-0.0.2.tar.gz", "has_sig": false, "md5_digest": "97884a6b61c35ced87fa64583892f9f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17958, "upload_time": "2018-12-14T13:55:54", "url": "https://files.pythonhosted.org/packages/d9/6a/dabd4baa9f2f9376d968ee55dca97e3d40aaa3520d0598fb4e8aa9f8f7c4/neuron_reduce-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a631e848b5c31c61c82c4cece04869f7", "sha256": "bd9e86276105873b16bd8011e48645a900f46625b6d83eabb1b090fccbacd2d2" }, "downloads": -1, "filename": "neuron_reduce-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "a631e848b5c31c61c82c4cece04869f7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 18648, "upload_time": "2019-01-16T15:09:32", "url": "https://files.pythonhosted.org/packages/10/29/0fe993615de502b4800265deec5106dd11739b05aab99c66d430dbb62698/neuron_reduce-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2fe371c2d252d759cbdce40e7bb867d6", "sha256": "438a2ee0718fe764a2c0f57ef79ae4fce806f9676e2008047e8b8df2c6535513" }, "downloads": -1, "filename": "neuron_reduce-0.0.3.tar.gz", "has_sig": false, "md5_digest": "2fe371c2d252d759cbdce40e7bb867d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17022, "upload_time": "2019-01-16T15:09:33", "url": "https://files.pythonhosted.org/packages/18/77/c33dc1e67df3d6ec2bf56a23b90c75efa3bcf57e12271af9d5a3030de319/neuron_reduce-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "b0a2879168c5fbe27b74824165753e60", "sha256": "7ce060f3f3815eda63c874c7a7e3a2d26c031cf8bf99e6fec31163dd4fc4298c" }, "downloads": -1, "filename": "neuron_reduce-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "b0a2879168c5fbe27b74824165753e60", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18713, "upload_time": "2019-03-21T13:55:13", "url": "https://files.pythonhosted.org/packages/16/c4/a61f9d838c4d3b1d644f74f35c33500ebda0cf52eb6e2afd70c5425b647c/neuron_reduce-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95556c7491f2f1ecdf16ff30f816c593", "sha256": "ef2cd032f01f36aff2f969fdabc4561b05b4b796d0581cd032b9a7dafc7159e8" }, "downloads": -1, "filename": "neuron_reduce-0.0.4.tar.gz", "has_sig": false, "md5_digest": "95556c7491f2f1ecdf16ff30f816c593", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18611, "upload_time": "2019-03-21T13:55:14", "url": "https://files.pythonhosted.org/packages/54/13/08d7a0b965120af9046285a64cb27d2669ff4167563d6e60b526f8eadb5f/neuron_reduce-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "470ebf38ab8dc9b44c4a1aa99466245a", "sha256": "300fa4a52f34abf9f661b79da6f7ca7d35a5073490d0081c3e5a8b53133bf53c" }, "downloads": -1, "filename": "neuron_reduce-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "470ebf38ab8dc9b44c4a1aa99466245a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 18667, "upload_time": "2019-06-02T11:30:51", "url": "https://files.pythonhosted.org/packages/82/ce/9765786b1d17b07d106b3cdd1a302cca2a7a938d2d4ff7393f85d4843eab/neuron_reduce-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e5ecff09d83b9ab86649d8f99eeccd5", "sha256": "fc0efd8b0070cf73d2993a3feb75e87f4b5e042fac21708bbe22101e67806064" }, "downloads": -1, "filename": "neuron_reduce-0.0.5.tar.gz", "has_sig": false, "md5_digest": "3e5ecff09d83b9ab86649d8f99eeccd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17031, "upload_time": "2019-06-02T11:30:53", "url": "https://files.pythonhosted.org/packages/81/5f/843f7f49f3baa5b77ceaf8b5044a958e53c96e3877066d2589ed8897a56d/neuron_reduce-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "cc0055dc9d65e565e934681c726e518d", "sha256": "60fa120f6c67fceef68728a17dc85e25863863f33f79fa4a93217551b74e183f" }, "downloads": -1, "filename": "neuron_reduce-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "cc0055dc9d65e565e934681c726e518d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 17965, "upload_time": "2019-09-01T14:33:32", "url": "https://files.pythonhosted.org/packages/4d/76/8fa556c0dc4ceb37ac5a5e004dfe5e925d92305680610c8ce70b4c4d20ca/neuron_reduce-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88ba6965ba43818765cb361b3823dd4e", "sha256": "e75ce138ae049f550d72ec86c5cae4afcada577a2805d9dc50cbe80eff1f2256" }, "downloads": -1, "filename": "neuron_reduce-0.0.6.tar.gz", "has_sig": false, "md5_digest": "88ba6965ba43818765cb361b3823dd4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16281, "upload_time": "2019-09-01T14:33:34", "url": "https://files.pythonhosted.org/packages/67/42/858a1c3be0960ab74f245723582f40066a0adac9703577b5f7dfda0b43e1/neuron_reduce-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc0055dc9d65e565e934681c726e518d", "sha256": "60fa120f6c67fceef68728a17dc85e25863863f33f79fa4a93217551b74e183f" }, "downloads": -1, "filename": "neuron_reduce-0.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "cc0055dc9d65e565e934681c726e518d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 17965, "upload_time": "2019-09-01T14:33:32", "url": "https://files.pythonhosted.org/packages/4d/76/8fa556c0dc4ceb37ac5a5e004dfe5e925d92305680610c8ce70b4c4d20ca/neuron_reduce-0.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88ba6965ba43818765cb361b3823dd4e", "sha256": "e75ce138ae049f550d72ec86c5cae4afcada577a2805d9dc50cbe80eff1f2256" }, "downloads": -1, "filename": "neuron_reduce-0.0.6.tar.gz", "has_sig": false, "md5_digest": "88ba6965ba43818765cb361b3823dd4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16281, "upload_time": "2019-09-01T14:33:34", "url": "https://files.pythonhosted.org/packages/67/42/858a1c3be0960ab74f245723582f40066a0adac9703577b5f7dfda0b43e1/neuron_reduce-0.0.6.tar.gz" } ] }