moose icon indicating copy to clipboard operation
moose copied to clipboard

Insert channels into CNG.swc cell photos

Open ishanseth18 opened this issue 3 years ago • 0 comments

I would like to insert channels into the dendrites of a cell model (in this case barrionuevo_cell1zr.CNG.swc), but don't have a good way of doing so yet.

Using moose.le(), I can see dendrite compartments are named in the following way: dend_146_15, with "dend" as a prefix and 2 numbers following.

My first question is what do the first number and second number represent? What do they tell me about the location of that compartment?

Secondly, how do you suggest I insert channels into these compartments? Currently, I am using the following code, but Moose.wildcardFind does not return me a list of compartments as I expected. I am looking through documentation and cannot find a function that returns me the list I expect. Ideally, I would like a function that returns me a list like moose.le, but it seems moose.le is not working here either.

def chan_distrib_list( obj_path, gbar_dend, rootword ): chanlist = [] for element in moose.wildcardFind(obj_path): print(element) if re.match(rootword, str(element)): compartment = re.sub('/model0[0]/elec[0]/', '', str(element)) chanlist.append(['K', compartment, 'Gbar', str(gbar_dend)]) return chanlist

Thanks so much!

ishanseth18 avatar Jan 28 '21 16:01 ishanseth18