Cell where each node has two children or less

Anything that doesn't fit elsewhere.
Post Reply
roybens
Posts: 54
Joined: Fri Mar 14, 2008 7:57 am

Cell where each node has two children or less

Post by roybens »

Hello,
I am trying to manipulate my cell so each node would not have more than two children. The only section who has more than two children is the soma - (called a_soma in the code). My thought was to make a section array with the size of the number of children that the soma has, connect between them, calculate their correct length using parent_connection() and then connect each child to one of the soma array sections. here is the procedure:

Code: Select all

proc reduceSections(){localobj sl,conVec
	comps = 0
	forall{
		comps = 0
		sl=new SectionList()
		sl.children()
		somaref= new SectionRef()
		forsec sl{
			comps+=1
			}
			if (comps>2){
			print diam
				create somaext[comps+1]
				index=0
				somaL=somaref.sec.L
				printf("%s l is %f diams is %f \n",secname(),somaref.sec.L, somaref.sec.diam)
				conVec = new Vector()
				cumL=0
				conVec.append(0)
				forsec sl{
					conVec.append(parent_connection())
				}
				conVec=conVec.sort()
				for(i=1;i<conVec.size();i+=1){
				printf("i is %d diams is %f\n",i, somaref.sec.diam)
					currPart = conVec.x(i)-conVec.x(i-1)
					somaext[i-1]{
						L=somaL*currPart
						diam = somaref.sec.diam
						parentCm = somaref.sec.cm
						parentRa = somaref.sec.Ra
						cumL+=L
					}
					connect somaext[i](0), somaext[i-1](1)
				}
				somaext[comps]{
					L=somaL-cumL
					diam = somaref.sec.diam
					parentCm = somaref.sec.cm
					parentRa = somaref.sec.Ra
				}
				forsec sl{
				printf("index is %d i is %d\n",index,i)
					disconnect()
					secref= new SectionRef()
					connect secref.sec(0),somaext[index](1)
					index+=1
				}
			}
	}	
}
the problem is that when i am running a simulation the results between the one section soma and the soma array are different.
I can not understand what can causing the difference between the simulation, does anyone have an idea?
Thanks
Roy
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Cell where each node has two children or less

Post by ted »

Have you compared your two model specifications to verify that they are identical, i.e. have exactly the same number of sections, with exactly the same anatomical and biophysical properties, assembled into exactly the same topology?
roybens
Posts: 54
Joined: Fri Mar 14, 2008 7:57 am

Re: Cell where each node has two children or less

Post by roybens »

Hi Ted,
Thanks for your reply.
I did check they are the same, actually i copied the same code which loaded the same cell, and in one file i applied the function described in the previous post, i can send the hoc files if necessary.
Though they dont have the same number of sections since in the original soma there is one section and the compartmentalized one has extra sections as the number of the soma's children. Anyhow both somas have the same total length diam etc. and all other sections are the same
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Cell where each node has two children or less

Post by ted »

Suggest you use Model View's File/Write text with each model, and compare the results.
Post Reply