cm_conditions = {'membrane.Na_o': 140000, 'membrane.Na_i': 11200, 'membrane.T': 310} # Activation protocol (Sakakibara 1992) protocols.append( myokit.pacing.steptrain_linear(-100, 30, 10, -140, 9900, 100) ) sakakibara_conditions = {'membrane.Na_o': 5000, 'membrane.Na_i': 5000, 'membrane.T': 290.15} conditions.append(cm_conditions) # Inactivation protocol voltage-shifted +20mV (Sakakibara 1992) protocols.append( availability_linear(-120, -10, 10, -140, -20, 10000, 1000, 0, 30) ) conditions.append(cm_conditions) ''' # Inactivation protocols (Schneider 1994, pp 32ms) protocols.append( availability(vsteps_inact, -135, -20, 10000, 32, 0, 30) ) conditions.append(schneider_conditions) # Inactivation protocols (Schneider 1994, pp 64ms) protocols.append( availability(vsteps_inact, -135, -20, 10000, 64, 0, 30) ) conditions.append(schneider_conditions)
variances_inact_300 = [(sd_)**2 for sd_ in sd_inact_300] li_inact_300_dataset = np.asarray([vsteps_inact, inact_300, variances_inact_300]) vsteps_inact, inact_150, sd_inact_150 = data.inact_Li_all(150) variances_inact_150 = [(sd_)**2 for sd_ in sd_inact_150] li_inact_150_dataset = np.asarray([vsteps_inact, inact_150, variances_inact_150]) tpre = 10000 twait = 0 ttest = 300 vhold = -80 # mV vtest = 10 vlower = -80 dv = 10 vupper = 50+dv li_inact_1000_protocol = availability_linear( vlower, vupper, dv, vhold, vtest, tpre, 1000, twait, ttest) li_inact_300_protocol = availability_linear( vlower, vupper, dv, vhold, vtest, tpre, 300, twait, ttest) li_inact_150_protocol = availability_linear( vlower, vupper, dv, vhold, vtest, tpre, 150, twait, ttest) def li_inact_sum_stats(data, tstep): output = [] for d in data.split_periodic(10300+tstep, adjust=True, closed_intervals=False): d = d.trim_left(10000+tstep, adjust=True) inact_gate = d['ical.g'] output = output + [max(inact_gate, key=abs)] norm = output[0] # absence of prepulse for i in range(len(output)): output[i] /= norm # account for incomplete voltage-dependent inactivation
sakakibara_act = Experiment(dataset=[vsteps_act, act, variances_act], protocol=sakakibara_act_protocol, conditions=cm_conditions, sum_stats=sakakibara_act_sum_stats, description=sakakibara_act_desc) ### Inactivation Sakakibara 1992 (voltage shifted) sakakibara_inact_desc = """Inactivation curve from Sakakibara 1992. Voltage shifted +20mV as in Courtemanche 1998.""" vsteps_inact, inact, sd_inact = data.Inact_Sakakibara() vsteps_inact = [v_ + 20 for v_ in vsteps_inact] variances_inact = [sd**2 for sd in sd_inact] sakakibara_inact_protocol = availability_linear(-120, -10, 10, -140, -20, 10000, 1000, 0, 30) def sakakibara_inact_sum_stats(data): output = [] for d in data.split_periodic(11030, adjust=True): d = d.trim(11000, 11030, adjust=True).npview() gate = d['ina.g'] output = output + [max(gate)] for i in range(1, len(output)): output[i] = output[i] / output[0] output[0] = 1. return output sakakibara_inact = Experiment(dataset=[vsteps_inact, inact, variances_inact],
description=dias_iv_desc, Q10=Q10_cond, # TODO: fix to use different Q10 values? Q10_factor=[1, -1]) # # Steady-state inactivation [Rao2009] # rao_inact_desc = """Inactivation curve for iCaL in HL-1 from Rao 2009. Measurements taken at room temperature. """ vsteps_inact, inact, sd_inact = data.Inact_Rao() variances_inact = [sd**2 for sd in sd_inact] rao_inact_dataset = np.asarray([vsteps_inact, inact, variances_inact]) rao_inact_protocol = availability_linear(-100, 20, 10, -80, -20, 5000, 1000, 0, 400) rao_conditions = { 'extra.Ca_o': 5e3, 'calcium.Ca_i': 7.6e-3, # assume same as Dias2014 'phys.T': room_temp } def rao_inact_sum_stats(data): output = [] for d in data.split_periodic(6400, adjust=True): d = d.trim(6000, 6400, adjust=True) current = d['ical.i_CaL'] output = output + [max(current, key=abs)] for i in range(1, len(output)):
vsteps_inact, inact, sd_inact = data.Inact_Sakakibara() variances_inact = [(sd_)**2 for sd_ in sd_inact] sakakibara_inact_dataset = np.asarray([vsteps_inact, inact, variances_inact]) tpre = 10000 # ms tstep = 1000 twait = 0 ttest = 30 Vhold = -140 # mV Vtest = -20 Vlower = -140 dV = 10 Vupper = -30 sakakibara_inact_protocol = availability_linear( Vlower, Vupper, dV, Vhold, Vtest, tpre, tstep, twait, ttest) def sakakibara_inact_sum_stats(data): output = [] for d in data.split_periodic(11030, adjust=True): d = d.trim_left(11000, adjust = True) inact_gate = d['ina.g'] output = output+[max(inact_gate, key=abs)] norm = max(output) try: for i in range(len(output)): output[i] /= norm except: for i in range(len(output)): output[i] = float('inf') return output
vhold = -135 # mV vtest = -20 tpre = 10000 # ms tsteps_inact = prepulses twait = 0 ttest = 12 vstart = -135 vend = 5 dv = 5 vsteps_inact = np.arange(-135, 10, 5).tolist() tmp_protocols = [] for tstep in tsteps_inact: tmp_protocols.append( availability_linear(vstart, vend + dv, dv, vhold, vtest, tpre, tstep, twait, ttest)) tsplits_inact = [p.characteristic_time() for p in tmp_protocols] for i in range(len(tsplits_inact) - 1): tsplits_inact[i + 1] += tsplits_inact[i] schneider_inact_protocol = tmp_protocols[0] for p in tmp_protocols[1:]: for e in p.events(): schneider_inact_protocol.add_step(e.level(), e.duration()) def schneider_inact_sum_stats(data): def boltzmann_fn(V, Vh, k): return 1 / (1 + np.exp((V - Vh) / k)) output_Vh = []
nygren_inact_shift = 32.2 # mV vsteps_inact_shifted = [v+nygren_inact_shift for v in vsteps_inact] sakakibara_inact_shifted_dataset = np.asarray([vsteps_inact_shifted, inact, variances_inact]) tpre = 10000 # ms tstep = 1000 twait = 0 ttest = 30 Vhold = -140 # mV Vtest = -20 Vlower = -140 dV = 10 Vupper = -30 sakakibara_inact_protocol = availability_linear( Vlower, Vupper, dV, Vhold, Vtest, tpre, tstep, twait, ttest) sakakibara_inact_shifted_protocol = availability_linear( Vlower+nygren_inact_shift, Vupper+nygren_inact_shift, dV, Vhold+nygren_inact_shift, Vtest+nygren_inact_shift, tpre, tstep, twait, ttest) sakakibara_conditions = {'na_conc.Na_o': 5, # mM 'na_conc.Na_i': 5, # mM 'phys.T': 290.15} # K def sakakibara_inact_sum_stats(data): output = [] for d in data.split_periodic(11030, adjust=True): d = d.trim_left(11000, adjust = True) inact_gate = d['ina.g']
sum_stats=dias_iv_tau_sum_stats, description=dias_iv_desc, Q10=[Q10_cond, Q10_tau, Q10_tau], Q10_factor=[1, -1, -1]) # # Inactivation [Nakajima2010] # nakajima_desc = """Inactivation curve from Nakajima 2010. Measurements taken at room temperature. """ vsteps_inact, inact, sd_inact = data.Inact_Nakajima() variances_inact = [sd**2 for sd in sd_inact] nakajima_inact_dataset = np.asarray([vsteps_inact, inact, variances_inact]) nakajima_inact_protocol = availability_linear(-130, -20, 10, -120, -20, 5000, 500, 0, 100) nakajima_conditions = { 'extra.Na_o': 145e3, 'sodium.Na_i': 10e3, 'extra.K_o': 0., # Cs used to avoid contamination 'potassium.K_i': 0., 'phys.T': room_temp } def nakajima_inact_sum_stats(data): output = [] for d in data.split_periodic(5600, adjust=True): d = d.trim(5500, 5600, adjust=True) current = d['ina.i_Na'] output = output + [max(current, key=abs)]
description=nguyen_iv_desc, Q10=Q10_cond, Q10_factor=1) # # Steady-state inactivation [Nguyen2013] # nguyen_inact_desc = """Inactivation curve for icat from Nguyen 2013 Fig 5E. Recordings at room temperature. """ vsteps_inact, inact, sd_inact = data.Inact_Nguyen() variances_inact = [sd**2 for sd in sd_inact] nguyen_inact_dataset = np.asarray([vsteps_inact, inact, variances_inact]) nguyen_inact_protocol = availability_linear(-80, -20, 5, -90, -10, 5000, 1000, 0, 150) def nguyen_inact_sum_stats(data): output = [] for d in data.split_periodic(6150, adjust=True): d = d.trim(6000, 6150, adjust=True) current = d['icat.i_CaT'] output = output + [max(current, key=abs)] for i in range(1, len(output)): output[i] = output[i] / output[0] output[0] = 1. return output nguyen_inact = Experiment(dataset=nguyen_inact_dataset,
sakakibara_inact_cou_adjust_dataset = np.asarray( [vsteps_inact_cou_adjust, inact, variances_inact]) tpre = 10000 # ms tstep = 1000 twait = 0 ttest = 30 Vhold = -140 # mV Vtest = -20 Vlower = -140 dV = 10 Vupper = -30 sakakibara_inact_protocol = availability_linear(Vlower, Vupper, dV, Vhold, Vtest, tpre, tstep, twait, ttest) sakakibara_inact_nyg_adjust_protocol = availability_linear( Vlower + nyg_adjust_inact, Vupper + nyg_adjust_inact, dV, Vhold + nyg_adjust_inact, Vtest + nyg_adjust_inact, tpre, tstep, twait, ttest) sakakibara_inact_cou_adjust_protocol = availability_linear( Vlower + cou_adjust, Vupper + cou_adjust, dV, Vhold + cou_adjust, Vtest + cou_adjust, tpre, tstep, twait, ttest) def sakakibara_inact_sum_stats(data): output = [] for d in data.split_periodic(11030, adjust=True): d = d.trim_left(11000, adjust=True) inact_gate = d['ina.g']
Li_inact_1000_dataset = np.asarray([vsteps_inact, inact, variances_inact]) # PROTOCOL tperiod_inact_Li_1000 = 10000 # ms twait = 0 ttest = 300 tpre = tperiod_inact_Li_1000 - tstep - twait - ttest tpreMeasuring_inact_Li_1000 = tperiod_inact_Li_1000 - ttest # tperiod - ttest Vhold = -80 # mV Vtest = 10 Vlower = -80 dV = 10 Vupper = 50 + dV # check why the +dv is required Li_inact_1000_protocol = availability_linear(Vlower, Vupper, dV, Vhold, Vtest, tpre, tstep, twait, ttest) # CONDITIONS Li_conditions = {'membrane.T': room_temp} # SUMMARY STATISTICS def Li_inact_1000_sum_stats(data): output = [] for d in data.split_periodic(tperiod_inact_Li_1000, adjust=True): d = d.trim_left(tpreMeasuring_inact_Li_1000, adjust=True) inact_gate = d['i_caL.G_Na_norm'] index = np.argmax(np.abs(inact_gate)) output = output + [np.abs(inact_gate[index])] Norm = output[0] for i in range(len(output)):