-1

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.

neuromusic
  • 114
  • 5
R.G.
  • 19
  • 1
    Have you ever used Spyder? IPython? I suppose it's up to you what tools you want to use. This sounds like an open ended question, without too much specifics. Have you coded in python before? – Warren P Sep 21 '16 at 19:20
  • Next question please actually show real error messages, okay, not "it doesn't accept the code!". You might not think that's a big deal, but it is. – Warren P Sep 21 '16 at 19:25
  • 1
    You should edit your question and put code into the question, you should not put code in comments. Please read a bit about StackOverflow, you'll save everybody time. You should probably spend some time getting used to Python. For example, formatting (what is on what line, and how indented things are) is very important. The fact that you are pasting code without even formatting it into a comment tells me you might not be aware of much of the basics of Python. – Warren P Sep 21 '16 at 22:17
  • Dude this is a forum for professionals and serious amateurs. If you can't think about and read the instructions, maybe you might want to brush up on those. Being rude is not going to get you more people helping you. – Warren P Sep 21 '16 at 23:33

1 Answers1

2

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).

davidf
  • 313
  • 1
  • 6