LCNhm_class

This script shapes the class from which our neurons will be built.

Neurons will have the following attributes:

  • MorphoName: Morphology name, it must be one of the following: n128, sup1, n409 or n127
  • MorphoData: Dataset containing all the morphological data
  • SomaList: List of NEURON somatic Sections
  • AxonList: List of NEURON axonic Sections
  • DendList: List of NEURON Basal dendritic Sections
  • ApicList: List of NEURON apical dendritic Sections
  • SomApicList: List of somatoapical NEURON apical dendritic Sections
  • SectionsList: List of all NEURON Sections, the union of SomaList, AxonList, DendList, ApicList
  • TopolDict: Dictionary with all topological information in the form
  • CurrentObject: List of NEURON objects containing all current clamps information

Access to all these properties is possible by:

Eg.:

>>> Pyramidal = neuron_class(MorphoName = CELLPROP_MORPHOLOGY,
             IntrinsicFactors = IntrinsicFactors,
             SynapticFactors = SynapticFactors,
             CurrentFactors = CurrentFactors,
             DirLocation = DIR_LOCATION )

>>> print Pyramidal.MorphoName

sup1

The way the neuron is built is following these steps:

  1. Import and set morphological data from ./LCNhm-neurondata/CELLPROP_MORPHOLOGY.swc

    These .swcs cointain information about the 3D structure and width of the cell.

    You can obtain more morphologies on the public databas NeuroMorpho

    Classification into four main morphological categories (soma, axon, basal and apical dendrites).

    Every category will be compartimentalized in multiple sections, each of which will have different and specific ion channels, synaptic inputs, diameter, spines, etc… For instance, one apical dendrite that starts on the somatoapical trunk, will be compartimentalized in 10 sections, where the nearest section to the trunk will be thicker than the furthest.

  2. Set biophysics (ion channels, membrane capacitance, membrane resistivity, etc…)

    What ion channels to use can be chosen, as well as a factor to increase/decrease the conductance density.

    See LCNhm_configurationfile.CELLPROP_INTRINSIC_IONCHS and LCNhm_configurationfile.CELLPROP_INTRINSIC_EXPERIMENT: for further details.

  3. Set synapses (excitatory/inhibitory inputs, place of synaptic boutons, maximum conductance, etc…)

    Synaptic inputs can be chosen, as well as a factor to increase/decrease the maximum conductance.

    See LCNhm_configurationfile.CELLPROP_SYNAPTIC_INPUTS and LCNhm_configurationfile.CELLPROP_SYNAPTIC_EXPERIMENT: for further details.

  4. Set current clamp (place, duration, intensity, etc…)

    A square-pulse clamp is set according to parameters written in LCNhm_configurationfile.

    See LCNhm_configurationfile.CURRENT_DURATION, LCNhm_configurationfile.CURRENT_DELAY, LCNhm_configurationfile.CURRENT_AMPLITUDES, LCNhm_configurationfile.CURRENT_SECTION, LCNhm_configurationfile.CURRENT_LOCATION, for further details.

class LCNhm_class.neuron_class(MorphoName, IntrinsicFactors, SynapticFactors, CurrentFactors, DirLocation)

Neurons will be built as neuron_class objects.

Parameters:
Returns:

``neuron_class`` object

Return type:

Class object

MorphoName

String – Morphology name, it must be one of the following: n128, sup1, n409 or n127

Defined in LCNhm_configurationfile.CELLPROP_MORPHOLOGY

It is one of the neuron_class inputs

MorphoData

csv – Dataset containing all the morphological data

It describes each morphological point with six parameters:
  • Type: soma (1), axon (2), Basal (3) or apical (4) dendrite
  • x , y , z: Spatial coordinates (in micrometers)
  • d: diameter (in micrometers)
  • IDFather: Line number of the morphological point to which is connected

See make_geometry_dictionary() to see how it is used

Source file in ../LCNhm-neurondata/ <MorphoName> .swc

SomaList

List – List of NEURON somatic Sections

The number of Sections is derived from MorphoData

AxonList

List – List of NEURON axonic Sections

The number of Sections is derived from MorphoData

DendList

List – List of NEURON Basal dendritic Sections

The number of Sections is derived from MorphoData

ApicList

List – List of NEURON apical dendritic Sections

The number of Sections is derived from MorphoData

SomApicList

List – List of somatoapical NEURON apical dendritic Sections

List can be found in ./LCNhm-neurondata/somatoapical_sections.txt

SectionsList

List – List of all NEURON Sections, the union of SomaList, AxonList, DendList, ApicList

TopolDict

Dictionary

Dictionary with all topological information in the form

[ [ SecListName[SecNumber] , Who is connected to (IDFather) , x , y , z ] ] , […], … ]

Eg.:

#            NEURON object    name           ID of father     x  y  z
TopolDict = { SomaList[0]: ['SomaList[0]',       -1,          0, 0, 0],
              SomaList[1]: ['SomaList[1]', ID of SomaList[0], 0, 0, -2],
              ...
              ApicList[9]: ['ApicList[9]', ID of ApicList[2], 0, 0, -1000]}
CurrentObject

List

List of NEURON objects containing all current clamps information

[[ Clamp object 1, Duration 1, Delay 1, Amplitude 1 ], [ Clamp object 2, Duration 2, Delay 2, Amplitude 2 ], […], …… ]

Eg.:

#                   Object                 dur   del  amp
CurrentObject = [ [ NEURON object at soma, 100,    0,   0],
                  [ NEURON object at soma, 200,  300,   0],
                  ...
                  [ NEURON object at soma, 200, 1200,   0]]
init_sections(MorphoData)

Initialization and group in lists of the four main class of sections: soma, axon, Basal (dend) and apical (apic) dendrites

Parameters:MorphoData (csv) –

neuron_class’s MorphoData attribute: Dataset containing all the morphological data

It describes each morphological point with six parameters:
  • Type: soma (1), axon (2), Basal (3) or apical (4) dendrite
  • x , y , z: Spatial coordinates (in micrometers)
  • d: diameter (in micrometers)
  • IDFather: Line number of the morphological point to which is connected

See make_geometry_dictionary() to see how it is used

Source file in ../LCNhm-neurondata/ <MorphoName> .swc

Returns:
  • SomaList (List) – class:neuron_class’s SomaList attribute: List of NEURON somatic Sections

    The number of Sections is derived from MorphoData

  • AxonList (List) – class:neuron_class’s AxonList attribute: List of NEURON axonic Sections

    The number of Sections is derived from MorphoData

  • DendList (List) – class:neuron_class’s DendList attribute: List of NEURON Basal dendritic Sections

    The number of Sections is derived from MorphoData

  • ApicList (List) – class:neuron_class’s ApicList attribute: List of NEURON apical dendritic Sections

    The number of Sections is derived from MorphoData

  • SomApicList (List) – class:neuron_class’s SomApicList attribute: List of somatoapical NEURON apical dendritic Sections.

    List can be found in ./LCNhm-neurondata/somatoapical_sections.txt.

make_geometry_dictionary(CellPosition, MorphoData)

Make a legible dictionary from the swc MorphoData database

Parameters:
  • CellPosition (List of Floats) –

    List of four elements

    • x-, y-, z-: spatial position of the soma (in micrometers)
    • angle: self-rotation around its main axis (in degrees)
  • MorphoData (csv) –

    neuron_class’s MorphoData attribute: Dataset containing all the morphological data

    It describes each morphological point with six parameters:
    • Type: soma (1), axon (2), Basal (3) or apical (4) dendrite
    • x , y , z: Spatial coordinates (in micrometers)
    • d: diameter (in micrometers)
    • IDFather: Line number of the morphological point to which is connected

    See make_geometry_dictionary() to see how it is used

    Source file in ../LCNhm-neurondata/ <MorphoName> .swc

Returns:

TopolDict

neuron_class’s TopolDict attribute: Dictionary with all topological information in the form

[ [ SecListName[SecNumber] , Who is connected to (IDFather) , x , y , z ] ] , […], … ]

Eg.:

#            NEURON object    name           ID of father     x  y  z
TopolDict = { SomaList[0]: ['SomaList[0]',       -1,          0, 0, 0]
              SomaList[1]: ['SomaList[1]', ID of SomaList[0], 0, 0, -2],
              ...
              ApicList[9]: ['ApicList[9]', ID of ApicList[2], 0, 0, -1000]}

Return type:

Dictionary

set_current_clamp(CurrentFactors)

Set current clamp

Parameters:CurrentFactors (List) –
neuron_class’s LCNhm_main.IntrinsicFactors input: List of properties for all desired current pulses

List of durations of each current pulse in milliseconds

List of delays of each current pulse in milliseconds

List of amplitudes of each current pulse in nanoampers (nA)

List of sections of each current pulse

List of location along the defined LCNhm_configurationfile.CURRENT_SECTION of each current pulse

Their length must be the same, the number of different current clamps

Click any of the links for further information

Returns:CurrentObject

neuron_class’s CurrentObject attribute: List of NEURON objects containing all current clamps information

[[ Clamp object 1, Duration 1, Delay 1, Amplitude 1 ], [ Clamp object 2, Duration 2, Delay 2, Amplitude 2 ], […], …… ]

Eg.:

#                   Object                 dur   del  amp
CurrentObject = [ [ NEURON object at soma, 100,    0,   0],
                  [ NEURON object at soma, 200,  300,   0],
                  ...
                  [ NEURON object at soma, 200, 1200,   0]]
Return type:List
set_geometry(TopolDict)

Set the topology and geometry from the TopolDict dictionary.

  • First, the beginning of each Section is connected to the end of its “father” Section, defined in the MorphoData csv
  • Second, it sets each compartment position and diameter
Parameters:TopolDict (Dictionary) –

neuron_class’s TopolDict attribute: Dictionary with all topological information in the form

[ [ SecListName[SecNumber] , Who is connected to (IDFather) , x , y , z ] ] , […], … ]

Eg.:

#            NEURON object    name           ID of father     x  y  z
TopolDict = { SomaList[0]: ['SomaList[0]',       -1,          0, 0, 0]
              SomaList[1]: ['SomaList[1]', ID of SomaList[0], 0, 0, -2],
              ...
              ApicList[9]: ['ApicList[9]', ID of ApicList[2], 0, 0, -1000]}
set_intrinsic_properties(IntrinsicFactors)

Set intrinsic properties: set axial resistance, fill the neuron’s surface with ion channels, and set their dynamical parameters

Final factors are defined as the multiplication of the individual factor by the experiment factor, so that

FinalFactors = FactorsIndividual * FactorsExperiment
fNa, fA, fAHPs, fC, fKDR, fM, fCaL, fCaT, fHCN, fL, Ra = FinalFactors

It is crucial to set the individual and experiment factors in the required order

Parameters:IntrinsicFactors (List) –

neuron_class’s LCNhm_main.IntrinsicFactors input: List of all intrinsic properties

set_synaptic_properties(SynapticFactors)

Set synaptic properties written in ../LCHhm-neurondata/synaptic_properties.txt (Bezaire2016)

Each line of the file has a list of all the necessary properties to configure synapses. Let’s take a line as an example:

Eg.: (1) CA3 (2) 6209 (3) 4 (4) 50 (5) 300 (6) 1.5 (7) 0 (8) 0.5 (9) 3 (10) 0.0002 (11) 0.5 (12) 276 (13) 5 (14) 3

These parameters are, in order:

  1. Name of input.
    Eg.: CA3
  2. Number of NumBoutons.
    Eg.: 6209
  3. Type of Sections where to place NumBoutons.
    Eg.: 4, that is apical dendrites
  4. Minimum distance to soma (positive to apical, negative to Basal).
    Eg.: 50 um from soma, that would be proximal SR
  5. Maximum distance to soma (positive to apical, negative to Basal).
    Eg.: 300 um from soma, that would be distal SR
  6. Firing frequency (Hz).
    Eg.: 1.5 Hz
  7. Reversal potential (mV). Near 0mV would correspond to a glutamatergic input, while a -70mV to a GABAergic one.
    Eg.: 0 mV, that is excitatory
  8. Raising time constant (ms).
    Eg.: 0.5 ms
  9. Decaying time constant (ms).
    Eg.: 3.0 ms
  10. Maximum conductance (microsiemens, uS). This is later multiplied by the FinalFactors defined from the FactorsIndividual and the Experimental.
    Eg.: 0.0002 uS
  11. Basal firing of the synaptic time probability distribution.
    Eg.: 0.5
  12. Theta Phase of maximum spiking probability.
    Eg.: 276 deg
  13. Left-shifting factor of the synaptic time probability distribution (A in the picture).
    Eg.: 5
  14. Right-shifting factor of the synaptic time probability distribution (B in the picture).
    Eg.: 3

The last four parameters define the synaptic time probability distribution through the LCNhm_functions.synaptic_time_probability_distribution(), an asymmetric gaussian function. An example of the synaptic time probability distribution alon 10 theta cycles, and a visual definition of the Basal, A and B parameters are shown in the image:

_images/SynapseDistribution.png

In the case that LCNhm_configurationfile.SIMPROP_THETA_MODE() is False, the distribution will be homogeneous along time, being (6), the firing frequency, the only parameter that will be taken into account.

So for each excitatory/inhibitory input:

  1. An amount of (2) boutons are placed randomly along the neuron surface from (5) to (6)
  2. Synapse internal dynamics are set given (7), (8), (9), (10) and (11)
  3. Synapses are activated randomly with the probability distribution given by LCNhm_functions.synaptic_time_probability_distribution()

Final factors are defined as the multiplication of the individual factor by the experiment factor, so that

FinalFactors = FactorsIndividual * FactorsExperiment
fNa, fA, fAHPs, fC, fKDR, fM, fCaL, fCaT, fHCN, fL, Ra = FinalFactors

It is crucial to set the individual and experiment factors in the required order

Parameters:SynapticFactors (List) –
Returns:
  • SynDict (Dictionary) – Dictionary with information of all synapses. For each input in LCNhm_configurationfile.CELLPROP_SYNAPTIC_INPUTS,
    • SynSection: NEURON Section and Location for each bouton
    • SynPlaces: Three spatial coordinates for each bouton
    • SynTimes: Time releases for each bouton

    is stored

  • SynObjects (List) – NEURON synaptic Exp2Syn objects (go to Exp2Syn for more information)
  • NetConObjects (List) – NEURON synaptic NetCon objects (go to NetCon for more information)