Issues with ion valence?

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Issues with ion valence?

Post by Annik »

Hi, I have built a multicompartment model to observe how Cl is regulated following GABAergic input. I have written the code such that the user may specify where GABAergic synapses are inserted into the cell (at the soma, in proximal dendrites or distal dendrites) using a prompt window which then calls the appropriate hoc files to generate the cell. When GABAergic synapses are generated in the soma, we see Cl influx and hyperpolarization. For some reason, when synapses are inserted into any other region, we see Cl influx but depolarization. I have written a hoc file to make the ions used in this model:

Code: Select all

//-----------------------------------------------------------------------------
// setIonParameters()
//-----------------------------------------------------------------------------
// sets the ion parameters for each segment inserting mechanisms given in mod files

proc setIonParameters() {

  // set the soma parameters
  forsec somatic {

    // insert the ion mechanisms
    insert k_ion
    insert na_ion
    insert hco3_ion
    insert cl_ion
    insert ca_ion

    insert pas
    	e_pas = el_soma
    	g_pas = gl_soma
  }

  // set the proximal apical dendrite parameters
  forsec proximal {

    // insert the ion mechanisms
    insert k_ion
    insert na_ion
    insert hco3_ion
    insert cl_ion
    insert ca_ion

    insert pas
    	e_pas = el_prox
    	g_pas = gl_prox
  }

  // set the middle apical dendrite parameters
  forsec middle {

    // insert the ion mechanisms
    insert k_ion
    insert na_ion
    insert hco3_ion
    insert cl_ion
    insert ca_ion

    insert pas
    	e_pas = el_mid
    	g_pas = gl_mid
  }

  // set the distal apical dendrite parameters
  forsec distal {

    // insert the ion mechanisms
    insert k_ion
    insert na_ion
    insert hco3_ion
    insert cl_ion
    insert ca_ion     

    insert pas
    	e_pas = el_dist
    	g_pas = gl_dist
  }
}

//////////////////// procedure calls /////////////////////////////////////
// register the new ions with NEURON
forall{
  cltype      = ion_register("cl",-1)
  hco3type    = ion_register("hco3",-1)
  catype      = ion_register("ca",2)
}

// set the ion parameters throughout the cell
setIonParameters()

// tell neuron how to treat them during the simulation
                            //ion_style("name", c_style, e_style, einit, eadvance, cinit)
                             // c_style-concentration: [0, 1, 2, 3] (UNUSED, PARAMETER, ASSIGNED, STATE)
                              // e_style - reversal pot: [0, 1, 2, 3] (UNUSED, PARAMETER, ASSIGNED, STATE)
                              // einit: [0, 1] (If 1 then reversal potential computed by Nernst equation on call to finitialize() using values of concentrations.)
                              // eadvance: [0, 1] (If 1 then reversal potential computed every call to fadvance() using the values of the concentrations)
                              //cinit: [0, 1] (If 1 then a call to finitialize() sets the concentrations to the values of the global initial concentrations. eg. nai set to nai0_na_ion and nao set to nao0_na_ion.)
forall {

	kstyle      = ion_style("k_ion",1,2,1,0,1)            // k, na, hco3 all parameters; set and forget
	nastyle     = ion_style("na_ion",1,2,1,0,1)           // cl is a state variable
	clstyle     = ion_style("cl_ion",3,2,1,1,1)
	hco3style   = ion_style("hco3_ion",1,2,1,0,1)
	castyle     = ion_style("ca_ion",3,2,1,0,1)
}

forall {
	ki = ki0_k_ion        
	ko = ko0_k_ion        
	nai = nai0_na_ion      
	nao = nao0_na_ion           
	hco3i = hco3i0_hco3_ion  
	hco3o = hco3o0_hco3_ion     
}
Is it possible that there is an issue with how Cl is being registered in different sections? It seems like it is managed in the same way but has opposite valence in compartments outside of the soma.
Cl current is managed by a GABA.mod file:

Code: Select all

NEURON {
    POINT_PROCESS GABAa
    RANGE trans_pres, nevents, g, gmax
    USEION cl READ ecl WRITE icl VALENCE -1
    USEION hco3 READ ehco3 WRITE ihco3 VALENCE -1
    GLOBAL clprm, C, D, alpha, beta
}

:------------------------------------------------------------------------------
UNITS {
    (nA) = (nanoamp)
    (mV) = (millivolt)
    (uS) = (microsiemens)
    (M)  = (1/liter)
    (mM) = (milliM)
}

:------------------------------------------------------------------------------
PARAMETER {
    clprm   = 0.8               : chloride permeability (hco3prm is 1-clprm)
    C       = 1       (mM)      : max transmitter concentration (From Mainen & Sejnowski 1998)
    D       = 1       (ms)      : transmitter duration (rising phase) (From Mainen & Sejnowski 1998)
    alpha   = 5       (/ms mM)  : forward (binding) rate (From Mainen & Sejnowski 1998)
    beta    = 0.18    (/ms)     : backward (unbinding) rate (From Mainen & Sejnowski 1998)
    gmax    = 0.003   (uS)      : maximum synaptic conductance
}

:------------------------------------------------------------------------------
ASSIGNED {
    v       (mV)    : postsynaptic voltage
    g       (uS)    : synaptic conductance
    rinf            : steady state channels open
    rtau    (ms)    : time constant of channel binding
    rdelta          : decay term for release vars
    trans_pres      : indicates whether transmitter is present (1 = yes, 0 = no)
    nevents         : counts the number of transmitter events
    icl     (nA)    : chloride current
    ecl     (mV)    : chloride reversal
    ihco3   (nA)    : bicarbonate current
    ehco3   (mV)    : bicarbonate reversal
}

:------------------------------------------------------------------------------
STATE { ron roff }

:------------------------------------------------------------------------------
INITIAL {
    ron = 0
    roff = 0
    rinf = C*alpha / (C*alpha + beta)
    rtau = 1 / ((alpha * C) + beta)
    rdelta = rinf*(1 - exp(-D/rtau))
    trans_pres = 0
    nevents = 0
}

:------------------------------------------------------------------------------
BREAKPOINT {
    SOLVE release METHOD cnexp
    g     = gmax * (ron + roff)
    icl   = g * clprm * (v - ecl)
    ihco3 = g * (1 - clprm) * (v - ehco3) 
}

:------------------------------------------------------------------------------
DERIVATIVE release {
    ron'  = (trans_pres*rinf - ron)/rtau
    roff' = -beta*roff
}

:------------------------------------------------------------------------------
NET_RECEIVE (w) { : the NetCon weight is ignored in this model
    if(flag == 0) { : spike event, increment events counter
        nevents = nevents + 1
        if (trans_pres == 0) {                              : this is a new event, turn conductance to on mode
            ron = roff
            roff = 0
        }
        trans_pres = 1
        net_send(D, 1)                                      : send a signal D later to turn to off mode
    } 
    else {                                                  : received an off signal, decrement the events counter
        nevents = nevents - 1
        if (nevents == 0) {                                 : no remaining events, turn conductance to off mode
            trans_pres = 0
            ron = 0
            roff = rdelta
        }
    }
}
If it helps, here is what I am seeing in the GUI for these simulation runs.
GABA inputs activated at 5ms. First image: 1 synapse in soma
http://imgur.com/N2Oetep
Second image: synapses distributed with 0.1/um^2 in sections of distal dendrite. Dend[135] is an example distal dendrite (i_cl plot, top right).
http://imgur.com/rrM8elu

Any ideas about what might be going wrong here?
Thanks,
Annik
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Issues with ion valence?

Post by ted »

Annik wrote:When GABAergic synapses are generated in the soma, we see Cl influx and hyperpolarization. For some reason, when synapses are inserted into any other region, we see Cl influx but depolarization.
Interesting bug.
I have written a hoc file to make the ions used in this model. . . . Is it possible that there is an issue with how Cl is being registered in different sections?
The problem is likely to arise from a lot of ion management statements that aren't doing what you want, and probably aren't needed anyway.

"Are you saying that these ion management statements have bugs?"

No, I'm saying that they can be difficult to use properly because a great deal of understanding and conscious effort is required of the user. Almost inevitably user-written code that employs these statements will contain self-inflicted bugs because of misuse. Besides, they are almost never needed--consider this important sentence from the documentation of ion_style:
You will not often need this function since the style chosen automatically on a per section basis should be appropriate to the set of mechanisms inserted in each section.
The same is true for "insert x_ion" and "ion_register".

"Oh, but my mechanism uses cl and hco3 and I have to tell NEURON about these ions."

No you don't. Your NMODL-specified mechanism's USEION statements tell neuron everything it needs to know. If a mod file for some mechanism foo contains a "USEION bar" statement, when you insert foo into a section, that section automatically gets a "bar_ion" mechanism if it didn't already have one, and bar's valence will be 1 unless the "USEION bar" statement specifies some other value. No "insert bar_ion" or "ion_register" statement needed at all.

"Oh, but my mechanism also needs to know the concentrations nai and ko."

So just make sure that its mod file also contains
USEION na READ nai
USEION k READ ko

"But surely I have to tell NEURON how to treat the ion concentrations and equilibrium potentials during a simulation."

No you don't. No concentration is going to change unless your model includes a mechanism that WRITEs the intra- and/or extracellular concentration of that ion. And if a USEION statement WRITEs some ionic concentration, that ion's equilibrium potential will be computed at step in the course of a simulation. I should mention that this presumes that the mod file contains a differential equation or kinetic scheme that relates the concentration to ion fluxes and compartment volume; there are examples of both approaches in the NEURON Book, NEURON's source code, and ModelDB.

"Is there no other way to change an ionic concentration in the middle of a simulation?"

There is, but if you really need to do that, please defer opening that topic until the current issue is resolved.
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Re: Issues with ion valence?

Post by Annik »

Thanks for your quick reply. I have removed the ion management statements and the problem persists. In mod files using Cl I have appropriate statements i.e.

Code: Select all

  USEION cl READ icl, ecl, clo WRITE cli VALENCE -1
(and as you mentioned this mod file contains a kinetic block to solve for cli in terms of ion flux/compartment volume).

Any other ideas for what might be causing this problem if the ion management statements are not to blame?
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Issues with ion valence?

Post by ted »

It's not about blame, it's about diagnosing and fixing a bug. That generally requires being able to reproduce the problem, which requires using the code that generates it. If you zip up the necessary code and email it to me, I'll let you know what I discover.
Post Reply