def __init__(self,figname): load_channels() MML = MorphML({'temperature':CELSIUS}) ## Figure 2G,H has 2013 (LTS) first, then 2010 (plateauing) ## 50pA injected if PG2010, else 100pA injected -- see in run() below if '2010' in figname: MML.readMorphMLFromFile('PG_aditya2010unified_neuroML_L1_L2_L3.xml',{}) self.figname = 'PG2010' elif '2013' in figname: MML.readMorphMLFromFile('PG_aditya2013unified_neuroML_L1_L2_L3.xml',{}) self.figname = 'PG2013' else: print "Give PG2010 or PG2013 as argument" sys.exit(1) self.libname = 'PG' #MML.readMorphMLFromFile('PG_aditya2013_neuroML_L1_L2_L3.xml',{}) #self.libname = 'PG_LTS' self.context = moose.PyMooseBase.getContext() self.PGcell = self.context.deepCopy(self.context.pathToId('/library/'+self.libname),self.context.pathToId('/'),"PG") self.PGsoma = moose.Compartment('/PG/soma_0') self.soma_vm = self.setupTable('soma_vm', self.PGsoma,'Vm') self.caconc_conc = self.setupChannelTable('Ca_mit_conc_Ca', moose.CaConc(self.PGsoma.path+'/Ca_mit_conc'),'Ca') self.tca_Ik = self.setupChannelTable('TCa_Ik', moose.HHChannel(self.PGsoma.path+'/TCa_d'),'Ik') self.na_rat_ms_X = self.setupChannelTable('Na_rat_ms_X',moose.HHChannel(self.PGsoma.path+"/Na_rat_ms"),"X") self.na_rat_ms_Y = self.setupChannelTable('Na_rat_ms_Y',moose.HHChannel(self.PGsoma.path+"/Na_rat_ms"),"Y") self.kdr_ms_X = self.setupChannelTable('KDR_ms_X',moose.HHChannel(self.PGsoma.path+"/KDR_ms"),"X") self.ka_ms_X = self.setupChannelTable('KA_ms_X',moose.HHChannel(self.PGsoma.path+"/KA_ms"),"X") self.tca_d_X = self.setupChannelTable('TCa_d_X',moose.HHChannel(self.PGsoma.path+"/TCa_d"),"X") self.tca_d_Y = self.setupChannelTable('TCa_d_Y',moose.HHChannel(self.PGsoma.path+"/TCa_d"),"Y") self.ih_cb_X = self.setupChannelTable('Ih_cb_X',moose.HHChannel(self.PGsoma.path+"/Ih_cb"),"X")
def __init__(self, figname): load_channels() MML = MorphML({'temperature': CELSIUS}) ## Figure 2G,H has 2013 (LTS) first, then 2010 (plateauing) ## 50pA injected if PG2010, else 100pA injected -- see in run() below if '2010' in figname: MML.readMorphMLFromFile( 'PG_aditya2010unified_neuroML_L1_L2_L3.xml', {}) self.figname = 'PG2010' elif '2013' in figname: MML.readMorphMLFromFile( 'PG_aditya2013unified_neuroML_L1_L2_L3.xml', {}) self.figname = 'PG2013' else: print "Give PG2010 or PG2013 as argument" sys.exit(1) self.libname = 'PG' #MML.readMorphMLFromFile('PG_aditya2013_neuroML_L1_L2_L3.xml',{}) #self.libname = 'PG_LTS' self.context = moose.PyMooseBase.getContext() self.PGcell = self.context.deepCopy( self.context.pathToId('/library/' + self.libname), self.context.pathToId('/'), "PG") self.PGsoma = moose.Compartment('/PG/soma_0') self.soma_vm = self.setupTable('soma_vm', self.PGsoma, 'Vm') self.caconc_conc = self.setupChannelTable( 'Ca_mit_conc_Ca', moose.CaConc(self.PGsoma.path + '/Ca_mit_conc'), 'Ca') self.tca_Ik = self.setupChannelTable( 'TCa_Ik', moose.HHChannel(self.PGsoma.path + '/TCa_d'), 'Ik') self.na_rat_ms_X = self.setupChannelTable( 'Na_rat_ms_X', moose.HHChannel(self.PGsoma.path + "/Na_rat_ms"), "X") self.na_rat_ms_Y = self.setupChannelTable( 'Na_rat_ms_Y', moose.HHChannel(self.PGsoma.path + "/Na_rat_ms"), "Y") self.kdr_ms_X = self.setupChannelTable( 'KDR_ms_X', moose.HHChannel(self.PGsoma.path + "/KDR_ms"), "X") self.ka_ms_X = self.setupChannelTable( 'KA_ms_X', moose.HHChannel(self.PGsoma.path + "/KA_ms"), "X") self.tca_d_X = self.setupChannelTable( 'TCa_d_X', moose.HHChannel(self.PGsoma.path + "/TCa_d"), "X") self.tca_d_Y = self.setupChannelTable( 'TCa_d_Y', moose.HHChannel(self.PGsoma.path + "/TCa_d"), "Y") self.ih_cb_X = self.setupChannelTable( 'Ih_cb_X', moose.HHChannel(self.PGsoma.path + "/Ih_cb"), "X")
def __init__(self, cellname, pseudosynname, libsynname, synfactor, Vclamp, numsyns, syntime, stagger, comp_name=None): load_channels() ## synchan_activation_correction is for graded synapses -- not useful for this script load_synapses(synchan_activation_correction) MML = MorphML({'temperature': CELSIUS}) if cellname == 'PG': #filename = 'PG_aditya2010_neuroML_L1_L2_L3.xml' #filename = 'PG_aditya2012_neuroML_L1_L2_L3.xml' #filename = 'PG_aditya2013_neuroML_L1_L2_L3.xml' #cellname = 'PG_LTS' ## Choose one the two below ## set the ORN->PG and mitral->PG to 0.45 vs 1.25 nS for plateauing vs LTS #filename = 'PG_aditya2010unified_neuroML_L1_L2_L3.xml' # plateauing i.e. non-LTS filename = 'PG_aditya2013unified_neuroML_L1_L2_L3.xml' # LTS self.somaName = 'soma_0' elif cellname == 'mitral': #filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3_mod.xml' #filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3.xml' filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3_mod_withspikeinit.xml' #filename = 'mitral_bbmit1993davison_neuroML_TEST_L1_L2_L3.xml' #filename = 'mitral_bbmit1993davisonMS_neuroML_L1_L2_L3.xml' #filename = 'mitral_migliore_etal_2007.xml' self.somaName = 'Seg0_soma_0' elif cellname == 'granule': filename = 'granule_granadityaMS2007_neuroML_L1_L2_L3.xml' self.somaName = 'soma_0' self.cellName = cellname self.synName = libsynname self.pseudoSynName = pseudosynname self.synFactor = synfactor self.Vclamp = Vclamp self.numSyns = numsyns self.synTime = syntime self.stagger = stagger self.compName = comp_name if self.stagger: self.synRUNTIME = self.synTime * (self.numSyns) + 2 * SETTLETIME else: self.synRUNTIME = self.synTime + 2 * SETTLETIME self.cellsDict = MML.readMorphMLFromFile(filename, {}) self.context = moose.PyMooseBase.getContext() self.cell = moose.Cell( self.context.deepCopy(\ self.context.pathToId('/library/'+cellname),self.context.pathToId('/'),cellname) ) self.soma = moose.Compartment('/' + self.cellName + '/' + self.somaName) self.somaVm = setupTable('soma_vm', self.soma, 'Vm') if cellname == 'mitral': ## inject a current into tuft of mitral tuftcomp = moose.Compartment('/' + self.cellName + '/Seg0_glom_81_102') tuftcomp.inject = injtuft ## inject a current into soma of mitral self.soma.inject = injsoma ## if nerve shock, inject a sharp current into tuft compartments if nerve_shock: ## We want a single sharp current injection at SETTLETIME, so cannot use soma.inject ## segment info - see MorphML_reader.py ## Only connect to 25 tuft compartments for seginfo in (self.cellsDict[self.cellName].values() )[0:num_tuft_comps_shock]: ## seginfo[5] is a list of potential synapses at this segment if 'ORN_mitral' in seginfo[5]: ## wrap this segment, seginfo[0] is segment name tuftcomp = moose.Compartment('/' + self.cellName + '/' + seginfo[0]) ## compartment, name_extn, start_time, duration, current (all SI) setup_iclamp(tuftcomp, '_nerveshock',\ SETTLETIME, 1e-3, tuft_shock_inject) self.spikeTableList = [] self.attachSpikeTables() #printCellTree(self.cell) if cellname == 'mitral': ## monitor Vm at the base of the tuft tuftbase_seg = moose.Compartment('/'+self.cellName+\ #'/Seg0_tuftden_19_23') # for migliore and shepherd 2007 cell '/Seg0_prim_dend_5_20') # tuft base self.tuftBaseTable = setupTable('mitdendTable', tuftbase_seg, 'Vm') ## monitor Vm at secondary dendrite dend_seg = moose.Compartment('/'+self.cellName+\ #'/Seg0_sec_dendp4_0_254') # at 43.86 microns from soma #'/Seg0_sec_dendd3_0_204') # at 190.56 microns from soma '/Seg0_sec_dendd4_2_269') # at 1004.47 microns from soma self.secDendTable = setupTable('mitdendTable', dend_seg, 'Vm') ## monitor Vm in the tuft compartment ## same as current injection above self.tuftTable = setupTable('mitTuftTable', tuftcomp, 'Vm')
def __init__(self, cellname, pseudosynname, libsynname, synfactor, Vclamp, numsyns, syntime, stagger, comp_name=None): load_channels() ## synchan_activation_correction is for graded synapses -- not useful for this script load_synapses(synchan_activation_correction) MML = MorphML({'temperature':CELSIUS}) if cellname == 'PG': #filename = 'PG_aditya2010_neuroML_L1_L2_L3.xml' #filename = 'PG_aditya2012_neuroML_L1_L2_L3.xml' #filename = 'PG_aditya2013_neuroML_L1_L2_L3.xml' #cellname = 'PG_LTS' ## Choose one the two below ## set the ORN->PG and mitral->PG to 0.45 vs 1.25 nS for plateauing vs LTS #filename = 'PG_aditya2010unified_neuroML_L1_L2_L3.xml' # plateauing i.e. non-LTS filename = 'PG_aditya2013unified_neuroML_L1_L2_L3.xml' # LTS self.somaName = 'soma_0' elif cellname == 'mitral': #filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3_mod.xml' #filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3.xml' filename = 'mitral_bbmit1993davison_neuroML_L1_L2_L3_mod_withspikeinit.xml' #filename = 'mitral_bbmit1993davison_neuroML_TEST_L1_L2_L3.xml' #filename = 'mitral_bbmit1993davisonMS_neuroML_L1_L2_L3.xml' #filename = 'mitral_migliore_etal_2007.xml' self.somaName = 'Seg0_soma_0' elif cellname == 'granule': filename = 'granule_granadityaMS2007_neuroML_L1_L2_L3.xml' self.somaName = 'soma_0' self.cellName = cellname self.synName = libsynname self.pseudoSynName = pseudosynname self.synFactor = synfactor self.Vclamp = Vclamp self.numSyns = numsyns self.synTime = syntime self.stagger = stagger self.compName = comp_name if self.stagger: self.synRUNTIME = self.synTime*(self.numSyns)+2*SETTLETIME else: self.synRUNTIME = self.synTime+2*SETTLETIME self.cellsDict = MML.readMorphMLFromFile(filename,{}) self.context = moose.PyMooseBase.getContext() self.cell = moose.Cell( self.context.deepCopy(\ self.context.pathToId('/library/'+cellname),self.context.pathToId('/'),cellname) ) self.soma = moose.Compartment('/'+self.cellName+'/'+self.somaName) self.somaVm = setupTable('soma_vm', self.soma,'Vm') if cellname=='mitral': ## inject a current into tuft of mitral tuftcomp = moose.Compartment('/'+self.cellName+'/Seg0_glom_81_102') tuftcomp.inject = injtuft ## inject a current into soma of mitral self.soma.inject = injsoma ## if nerve shock, inject a sharp current into tuft compartments if nerve_shock: ## We want a single sharp current injection at SETTLETIME, so cannot use soma.inject ## segment info - see MorphML_reader.py ## Only connect to 25 tuft compartments for seginfo in (self.cellsDict[self.cellName].values())[0:num_tuft_comps_shock]: ## seginfo[5] is a list of potential synapses at this segment if 'ORN_mitral' in seginfo[5]: ## wrap this segment, seginfo[0] is segment name tuftcomp = moose.Compartment('/'+self.cellName+'/'+seginfo[0]) ## compartment, name_extn, start_time, duration, current (all SI) setup_iclamp(tuftcomp, '_nerveshock',\ SETTLETIME, 1e-3, tuft_shock_inject) self.spikeTableList = [] self.attachSpikeTables() #printCellTree(self.cell) if cellname=='mitral': ## monitor Vm at the base of the tuft tuftbase_seg = moose.Compartment('/'+self.cellName+\ #'/Seg0_tuftden_19_23') # for migliore and shepherd 2007 cell '/Seg0_prim_dend_5_20') # tuft base self.tuftBaseTable = setupTable('mitdendTable',tuftbase_seg,'Vm') ## monitor Vm at secondary dendrite dend_seg = moose.Compartment('/'+self.cellName+\ #'/Seg0_sec_dendp4_0_254') # at 43.86 microns from soma #'/Seg0_sec_dendd3_0_204') # at 190.56 microns from soma '/Seg0_sec_dendd4_2_269') # at 1004.47 microns from soma self.secDendTable = setupTable('mitdendTable',dend_seg,'Vm') ## monitor Vm in the tuft compartment ## same as current injection above self.tuftTable = setupTable('mitTuftTable',tuftcomp,'Vm')