how to fit channel parameters

Using the Multiple Run Fitter, praxis, etc..
Post Reply
thitsa
Posts: 3
Joined: Wed Aug 14, 2019 5:09 am
Location: France

how to fit channel parameters

Post by thitsa » Tue May 19, 2020 5:37 pm

I am trying to fit my experimentaly measured somatic membrane potential with this model https://senselab.med.yale.edu/ModelDB/S ... del=144526. I would like to use as parameters the values na_ais, na_soma etc. from the file Cell parameters.hoc (bellow I put the interesting part of it)
Not sure how to do that with the MRF.

Code: Select all

//CAVE: check for parameter-settings in loaded sessions

na_ais		=	7000			
na_soma		=	500				
vShift_na		=	10 // affecting activation and inactivation
vShift_inact_na		=	10 

vShift_nax		=	10
vShift_inact_nax	=	10		
						
Kv_soma	 	=	100	
Kv1_ais		=	2000 		
Kv1_soma	=	100
vShift_Kv1		=	10
vShift_inact_Kv1	=	-15
Kv7_soma	=	1	
Kv7_ais		=	7


// ----------------------------------------------------------------------------
// Initialisation of passive and active properties, spine scaling, Rm and Cm
//-----------------------------------------------------------------------------

proc init_channels() {

//soma	
	soma  {nseg=9}
	soma  {
		insert na 	gbar_na = na_soma	
		insert Kv 	gbar_Kv = Kv_soma
		insert Kv7 	gbar_Kv7 = Kv7_soma
		insert Kv1 	gbar_Kv1 = Kv1_soma
	} 		
	
//AIS
	axon[0]  {
		nseg=21
		insert nax 	gbar_nax(0:0.4) = 0:na_ais
					gbar_nax(0.4:1) = na_ais:na_ais
		insert na 	gbar_na(0:0.2) = na_soma:5000
				 	gbar_na(0.2:0.4) = 5000:0

		insert Kv1 	axon.gbar_Kv1(0:1)= Kv1_soma:Kv1_ais	
		insert Kv7 	axon.gbar_Kv7(0:0.4) = Kv7_soma:Kv7_soma
					axon.gbar_Kv7(0.4:1) = Kv7_soma:Kv7_ais
	}


ted
Site Admin
Posts: 5724
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: how to fit channel parameters

Post by ted » Tue May 19, 2020 8:31 pm

Have you worked through the MRF tutorials? (see the link on the Documentation page at neuron.yale.edu)

thitsa
Posts: 3
Joined: Wed Aug 14, 2019 5:09 am
Location: France

Re: how to fit channel parameters

Post by thitsa » Wed May 20, 2020 6:42 am

I had a brief look in the tutorials but I could only see how to manualy call the MRF through the Tools button. I tried this with this specific model but nothing pops out when I push any button in the main menu. I was wondering if there is any hoc sample that calls MRF, reads the parameters and starts the fitting automatically when I run the model.

ted
Site Admin
Posts: 5724
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: how to fit channel parameters

Post by ted » Thu May 21, 2020 2:39 pm

So you didn't actually work through the MRF tutorials?

Instead you
downloaded the zip file for the model entry
unzipped it
cd'd into the directory HallermannEtAl2012
successfully compiled the mod files with mknrndll or nrnivmodl
used NEURON to execute mosinit.hoc
then clicked on NEURON Main Menu / Tools / Fitting / Multiple Run Fitter
and nothing happened?

What operating system are you using? What version of NEURON are you using? Did you install it by compiling source code, or did you use a binary installer? Does neurondemo work?

thitsa
Posts: 3
Joined: Wed Aug 14, 2019 5:09 am
Location: France

Re: how to fit channel parameters

Post by thitsa » Thu May 21, 2020 2:58 pm

It finally works.
Instead you... Multiple Run Fitter and nothing happened?
Exactly,the model worked fine but wouldnt pop neither the MRF nor graphs when selected from the menu buttons.
But then I removed a few things I was not interested in, such as half of the mosinit.hoc (the part I have bellow) and now I can call MRF and everything is good. Not sure which part of this code was preventing it.
I work on windows 10 with NEURON 7.7.

Code: Select all

objref zz
zz = new Impedance()
func rn() { local rn
  init()  // make sure all changes to g, c, ri etc. have taken effect
  soma zz.loc(0.5)  // sets origin for impedance calculations to middle of soma
  zz.compute(0)  // DC input R
  soma { rn = zz.input(0.5) }  // rn is input R at middle of the soma
  return rn
}


objref sl
sl = new SectionList()
sl.wholetree()

objref spbox
spbox = new VBox()
spbox.intercept(1)

objref sp
sp = new PlotShape(sl)
sp.show(0)

ncmap=13
vstep=0.0833
vlow=0
vhigh=vlow+(ncmap-1)*vstep
sp.colormap(ncmap,1)

i1=int(3*(ncmap-1)/8)
//print i1
for (i=0; i<=i1; i=i+1) {
	f=i/(3*(ncmap-1)/8)
	print i,f,0,255*f,255
	sp.colormap(i,0,255*f,255)
}
print " "
i2=int((ncmap-1)/2)
for (i=i1+1; i<=i2; i=i+1) {
	f=(i-3*(ncmap-1)/8)/((ncmap-1)/8)
	print i,f,0,255,255*(1-f)
	sp.colormap(i,0,255,255*(1-f))
}
print " "
i3=int(5*(ncmap-1)/8)
for (i=i2+1; i<=i3; i=i+1) {
	f=(i-(ncmap-1)/2)/((ncmap-1)/8)
	print i,f,255*f,255,0
	sp.colormap(i,255*f,255,0)
}
print " "
for (i=i3+1; i<=ncmap-1; i=i+1) {
	f=(i-5*(ncmap-1)/8)/(3*(ncmap-1)/8)
	print i,f,255,255*(1-f),0
	sp.colormap(i,255,255*(1-f),0)
} 


ted
Site Admin
Posts: 5724
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: how to fit channel parameters

Post by ted » Thu May 21, 2020 5:40 pm

That seems strange to me. I had no problems at all getting the MRF to appear and function after executing the unmodified mosinit.hoc. Well, none of the stuff you removed is essential to the model, so it looks like you should be able to procede.

Post Reply