Anaconda allensdk NEURON model

347 Views Asked by At

I've download Allen neuron model: Nr5a1-Cre VISp layer 2/3 473862496

Installed Anaconda with all the required packages, have the NEURON: https://alleninstitute.github.io/AllenSDK/install.html

now how do I use allensdk package to run their model through the NEURON,

they have a sort of explanation: http://alleninstitute.github.io/AllenSDK/biophysical_models.html

but where exactly do I write this code? Python? Anaconda promt? Spider?

Not python not Anaconda accept the code as is, so I guess I need to access the allensdk package first, how do I do that?

Thank you.

1

There are 1 best solutions below

0
On

Thanks for the question. The first example in your documentation link shows how to download a model, as you've probably done. I do this by writing a python script and running it from the command prompt.

The script looks like this:

from allensdk.api.queries.biophysical_api import BiophysicalApi

bp = BiophysicalApi() 
bp.cache_stimulus = True # change to False to not download the large stimulus NWB file
neuronal_model_id = 473862496    # here's your model
bp.cache_data(neuronal_model_id, working_directory='neuronal_model')

You can run this from the command prompt (Anaconda command prompt is fine) as follows:

$ python <your_script_name.py>

Moving down the documentation, the next step to running the model is to run the following on the command prompt:

$ cd neuronal_model
$ nrnivmodl ./modfiles   # compile the model (only needs to be done once)
$ python -m allensdk.model.biophysical.runner manifest.json

First you step into the working directory you specified in the first script.

Next you run a NEURON binary (nrnivmodl), which compiles your modfiles. You'll need to have NEURON with python bindings installed and on your PATH to run this. I'm not sure about this, but I think compiling modfiles in Windows requires a different command/workflow. If that's your operating system, I'll have to refer you here since I'm not too familiar with NEURON on Windows:

https://www.neuron.yale.edu/neuron/static/docs/nmodl/mswin.html

Next you are calling an script packaged with the allensdk for running models based on one of the files we downloaded in the first script (manifest.json).