QBI NEURON Tutorial

An introductory NEURON tutorial for neuroscientists

A complex model

As you may have imagined, it would be very time-consuming and difficult to build an actual neuron in CellBuilder. Fortunately, there is a way of loading data obtained from neuron tracing directly into NEURON. We will use a simplified thick-tufted layer 5 pyramidal neuron from the rat primary visual cortex which was filled with biocytin through a patch pipette and visualized with Streptavidin-Alexa 488. The filled cell was imaged using spinning disk confocal microscopy and reconstructed using Neurolucida software.

pyramidalneuron

Preliminary setup

  1. Launch a fresh version of NEURON via nrngui
  2. If you haven’t already done so, download the datafile to your working directory. (Save the link as a file with the suffix .asc: eg reconstruction.asc)

STEP 1: Importing the cell data

  1. To import a neuron’s morphology from a digital reconstruction, click Tools -> Miscellaneous -> Import 3D

  2. In the Import3d window, click on choose a file and select the downloaded datafile.

    If you get multiple windows pop up, you may have a neuron that is not fully connected.

  3. In the next window, the morphology of the neuron is displayed. Unselect show points to improve clarity.

importneuron1 importneuron2

  1. You can use Zoom, Translate, and Rotate, in combination with click and drag movements with the mouse in order to observe the morphology. Use this to inspect your cell to see if it is complete.

  2. By unselecting Show diam, only the skeleton of the neuron will be shown.

  3. When you have finished inspecting, select Export and Cellbuilder.

Here are some useful guidelines on tracing neurons in programs such as Neurolucida to ensure they are loaded correctly in NEURON

  1. All dendrites and axons from a particular neuron must start from within the soma
  2. All branches must be connected to their parent branch
  3. Delete any additional content, such as contours demarking layers, etc.
  4. NEURON will import all 3-dimensional data and the diameter of the processes therefore it is important to reconstruct these as accurately as possible.
  5. To ensure that NEURON will detect the volume of the soma correctly in 3D:
    1. Reconstruct the soma via a series of concentric contours demarking the boundary of the cell body
    2. Start at either the top or bottom (in the z-axis) of the soma
    3. Trace the boundary in the first z-plane
    4. Move one z plane down/up and repeat
    5. You MUST move only in one direction – the order in which you trace each contour is important for how NEURON reads the soma data. If it is out of order, NEURON will incorrectly create the somatic volume.
    6. You may manually move individual points to correct for errors, but you cannot delete parts and redraw them. If you have to redraw, you must delete all contours past that point.
    7. Once you reach the end of the cell body. Select all the contours and right click and select "Set as cell body". Alternatively, make sure the contour is called "Cell body" or "Soma"
  6. If you end up with multiple import3D windows with only a soma it may be because you have not maintained the order of the contour series. Unfortunately, the quickest way to remedy this is to retrace the soma in most instances.
  7. The file must be saved as an ascii file format (extension is .asc or .ASC)

STEP 2: Save with the Print & File Window Manager

So far we have been saving our entire session using File -> Save Session. However, it is very useful to specify which windows you want to save.

printfilemanager

  1. From the Main Menu, select Window -> Print & File Window Manager
  2. The display shows red and blue boxes. The left red square represents your screen, and the blue squares are individual NEURON windows.
  3. Click on those windows you want to save in your session - these will move to the right red square
  4. Identify which square is which by moving the actual window around
  5. Click Session -> Save selected or Session ->Save all

You can save this session to a file called pyramidal.ses.

printfilemanager1 printfilemanager2

STEP 3: Viewing the cell morphology

  1. Select Topology in CellBuilder to display your neuron.
  2. Use the right click menu or click on the small square in the top left corner of the canvas
  3. Select View = Plot, zoom in/out or translate to observe your neuron.

cellbuilder_topol

Be careful not to left click as you will create new sections! If you make changes you do not want you can always close and reload your model. This is why it is vital to keep saving!

STEP 4: Defining a complex neuron

4A: Grouping sections

  1. Select Subsets to group different sections into groups that may be meaningful to us.
  2. Fortunately, NEURON can read different categories of processes reconstructed in Neurolucida and so all our sections are already in grouped in useful subsets. Click each subset to see which branches are included.

4B: Morphology

  1. Select the Geometry tab.
  2. As in the previous lessons, we can set the geometrical parameters of every section or for a group of sections defined as a subset.
  3. We can set the length (L), diameter (diam) and the degree of compartmentalization of the model (spatial grid). Since our morphology is already imported, including the length and diameter of each segment, all we need to define is the spatial grid.
  4. Select all (all segments should be red) then select d_lambda. We will use the default value of 0.1.

spatialgrid

4C: Biophysical properties - General

Lastly, we need to specify the biophysical properties of our neuron.

We can start with an assumption that all regions of our neuron have the same values for the following:

Property Ref Value Units
axial resistivity Ra 100 ohm-cm
specific membrane capacitance cm 1 µF/cm2
passive conductance g_pas 1/20000 S/cm2
passive conductance reversal potential e_pas -65 mV
  1. Select the Biophysics tab.
  2. Select all and declare that we would like to set Ra, cm and pas for all sections.

biophys1

4D: Biophysical properties - Specific

We would also like our neuron to be able to fire action potentials. Let’s add some basic HH conductances into our soma and axon.

Subset Ref Biophysics
Somatic somatic hh
Axonal axonal hh
Basal basal reduced hh
Apical apical reduced hh
  1. Select somatic and check hh and repeat for axonal, basal and apical.
  2. Uncheck Specify Strategy
  3. select basal then enter 10% reduced hh (gnabar_hh and gkbar_hh)
  4. select apical then enter 10% reduced hh (gnabar_hh and gkbar_hh)

biophys2

STEP 5: Creating a virtual patch clamp rig.

As in our previous lesson, we will inject a square-wave current step into the soma and measure the corresponding voltage change at the soma.

5A: Adding a stimulus

  1. In the CellBuilder window, select Continuous Create
  2. Next, we will create a current clamp electrode (a type of Point process).

  3. Open Tools > Point Processes > Managers > Point manager
  4. By default, the IClamp point process is positioned half-way along the soma. We will accept this default.
  5. Click SelectPointProcess and select IClamp.
  6. Create a step current of duration 600 ms, amplitude of 100 pA and a delay of 200 ms.

iclamp menu_iclamp iclamp_params

5B: Adding output graphs

Previously, we added a graph and accepted defaults. Now we will see how to customize what is displayed.

  1. Graph -> voltage axis to show the somatic membrane potential vs time
  2. The default voltage axis measures the voltage at the soma (0.5) which is fine
  3. If we wanted to change this: - right click on the graph (or click on the square) - Select Plot what? - Find soma in the first panel and double-click - Find v(0.5) in the second panel and double-click - Click Accept - Multiple traces can be added in the same window for comparison
  4. From the right-click menu, then select Color/Brush and pick a color to differentiate the traces

If you select Keep lines, you can run successive traces on top of each other (useful for IV)

vgraph

  1. Graph -> current axis to show the current vs time
  2. There is no default selected here so nothing will be displayed if it is run now
  3. Right click on the graph select Plot what?
  4. In the window, type IClamp[0].i. (This will display what your point process is doing in terms of current.)

igraph iclamp_axis

5C: Run the simulation

Now we have a whole rig:

  1. Open Tools -> RunControl
    1. Set Tstop to 1000 ms. This makes our recorded period 1000 ms long.
    2. Increase the IClamp amplitude to 2nA
    3. Hit Init & Run in the RunControl window. What do you see?

iclamp_rig

  1. If part of the trace is missing, right-click on the graph, select View… and View=plot to rescale

5D: Creating a Space Plot

A space plot allows you to view the changes in conductance along the neuron.

  1. To create a space plot, select Shape plot from the Graph menu in the NEURON Main Menu.
  2. From this window, you can select from the plot menu with the right mouse button.
  3. Select a Space Plot.
  4. You can rotate the axes by selecting 3D Rotate from the Graph Properties menu.
  5. The middle mouse button is used to move the whole representation.

space1

  1. To create the space plot graph, select a section of the neuron to include in the space plot by clicking the left mouse button at the beginning of the section, dragging the mouse across the section you want to plot (while holding the mouse button down), and releasing the mouse button when you have covered the sections you want to plot. (In our diagram, we have selected from top to bottom)
  2. When you release the mouse button, the sections you selected will be highlighted in colour.
  3. A new graph will appear representing voltage vs distance. (By default, voltage is the variable to plot, but you can change this with the Plot What? menu item)
  4. Press the Init & Run button in the RunControl window to see the space plot in action.
  5. You may have to zoom in with right-click menu, then View… -> View = plot

space2

  1. Now have a make another shape plot, and this time right click and select “shape plot”
  2. A space plot will colour map any variable of each section across your neuron(s) and will change as your simulation is running. The default variable is voltage.
  3. Try slowing down the simulation by change “dt” in run control to 0.0025. (you might also want to reduce the delay on your iclamp)
  4. Hit run.
  5. Try dt = 0.00025

space3

STEP 6: Save Me

  1. From the Print & File Manager window
  2. Select just the windows to save then select session -> save selected and
  3. Save as pyramidal_iclamprig.ses

STEP 7: Experiments

Now it’s time to do your own investigations:

  1. Perform an IV : Change parameters of your current clamp and see what happens.
  2. Measure voltage at different locations in the cell simultaneously: Compare how they differ.
    • (Hint: plot what?)
  3. Inject current into different regions of the cell
    • (Hint: right click on the shape plot of the point process and select section. Then left click on the neuron to move the blue circle.)
  4. Find the delay required to reach steady state
    • (Hint: alter the delay parameter in Run Control and zoom into the Voltage graph)
  5. Modify values of Ra, Cm and g_pas in CellBuilder: Investigate the changes in voltage responses and voltage transfer across the neuron.
  6. Investigate the origin of the action potential : Slow down the output to see what the voltage is doing in real time.
    • Try putting 50000 into the Points plotted/ms box in the Run Control.
    • Click Init & Run and have a look at the voltage axis and space plot.

Impedance tools

NEURON is very powerful and has a number of extra additions that can aid your analysis of results. For example we can observe voltage decay throughout the cell using the impedance tools. Discover for yourself how these work and how they may aid your analysis.

impedance


Resources

Back | Lesson 3 | Next