diff --git a/Code/Functions/__pycache__/Pospischil_fxns.cpython-39.pyc b/Code/Functions/__pycache__/Pospischil_fxns.cpython-39.pyc index f26f2c7..3d4c82b 100644 Binary files a/Code/Functions/__pycache__/Pospischil_fxns.cpython-39.pyc and b/Code/Functions/__pycache__/Pospischil_fxns.cpython-39.pyc differ diff --git a/Code/KCNA1_mutations/mut_Cb_stellate.py b/Code/KCNA1_mutations/mut_Cb_stellate.py index cf85352..058f815 100644 --- a/Code/KCNA1_mutations/mut_Cb_stellate.py +++ b/Code/KCNA1_mutations/mut_Cb_stellate.py @@ -99,7 +99,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) # %% diff --git a/Code/KCNA1_mutations/mut_Cb_stellate_Delta_Kv.py b/Code/KCNA1_mutations/mut_Cb_stellate_Delta_Kv.py index 29b8fc8..a0a6fd8 100644 --- a/Code/KCNA1_mutations/mut_Cb_stellate_Delta_Kv.py +++ b/Code/KCNA1_mutations/mut_Cb_stellate_Delta_Kv.py @@ -110,7 +110,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) # %% prominence = 50 diff --git a/Code/KCNA1_mutations/mut_Cb_stellate_Kv.py b/Code/KCNA1_mutations/mut_Cb_stellate_Kv.py index 5e37f8e..1768912 100644 --- a/Code/KCNA1_mutations/mut_Cb_stellate_Kv.py +++ b/Code/KCNA1_mutations/mut_Cb_stellate_Kv.py @@ -11,7 +11,7 @@ import json import os from numba import types from numba.typed import Dict -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns_Kv import Cb_stellate_Kv_mut @@ -107,7 +107,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) # %% diff --git a/Code/KCNA1_mutations/mut_FS_Kv.py b/Code/KCNA1_mutations/mut_FS_Kv.py index 4b2569d..7108b5d 100644 --- a/Code/KCNA1_mutations/mut_FS_Kv.py +++ b/Code/KCNA1_mutations/mut_FS_Kv.py @@ -11,7 +11,7 @@ import json from numba import types from numba.typed import Dict from joblib import Parallel, delayed -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import Pospischil_mut # model parameters @@ -106,7 +106,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) prominence = 50 diff --git a/Code/KCNA1_mutations/mut_RS_inhib_Kv.py b/Code/KCNA1_mutations/mut_RS_inhib_Kv.py index 5aba913..ed42589 100644 --- a/Code/KCNA1_mutations/mut_RS_inhib_Kv.py +++ b/Code/KCNA1_mutations/mut_RS_inhib_Kv.py @@ -13,7 +13,7 @@ import json from numba import types from numba.typed import Dict from joblib import Parallel, delayed -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut @@ -112,7 +112,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) prominence = 50 diff --git a/Code/KCNA1_mutations/mut_RS_pyramidal_Kv.py b/Code/KCNA1_mutations/mut_RS_pyramidal_Kv.py index 76e9a37..de7ee22 100644 --- a/Code/KCNA1_mutations/mut_RS_pyramidal_Kv.py +++ b/Code/KCNA1_mutations/mut_RS_pyramidal_Kv.py @@ -11,7 +11,7 @@ import json from numba import types from numba.typed import Dict from joblib import Parallel, delayed -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut @@ -107,7 +107,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) # # %% diff --git a/Code/KCNA1_mutations/mut_STN.py b/Code/KCNA1_mutations/mut_STN.py index c275e0d..90e9f4c 100644 --- a/Code/KCNA1_mutations/mut_STN.py +++ b/Code/KCNA1_mutations/mut_STN.py @@ -10,7 +10,7 @@ import json import os from numba import types from numba.typed import Dict -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns import STN_mut @@ -96,7 +96,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) prominence = 50 desired_AUC_width = high/5 diff --git a/Code/KCNA1_mutations/mut_STN_Delta_Kv.py b/Code/KCNA1_mutations/mut_STN_Delta_Kv.py index 01c57e6..049b932 100644 --- a/Code/KCNA1_mutations/mut_STN_Delta_Kv.py +++ b/Code/KCNA1_mutations/mut_STN_Delta_Kv.py @@ -10,7 +10,7 @@ import json import os from numba import types from numba.typed import Dict -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import STN_Kv_mut # model parameters @@ -117,7 +117,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) prominence = 50 desired_AUC_width = high/5 diff --git a/Code/KCNA1_mutations/mut_STN_Kv.py b/Code/KCNA1_mutations/mut_STN_Kv.py index 03e0135..eb3e65c 100644 --- a/Code/KCNA1_mutations/mut_STN_Kv.py +++ b/Code/KCNA1_mutations/mut_STN_Kv.py @@ -10,7 +10,7 @@ import json import os from numba import types from numba.typed import Dict -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import STN_Kv_mut # model parameters @@ -118,7 +118,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("./KCNA1_mutations/mutations_effects_dict.json")) prominence = 50 desired_AUC_width = high/5 diff --git a/Code/mutations_effects_dict.json b/Code/KCNA1_mutations/mutations_effects_dict.json similarity index 100% rename from Code/mutations_effects_dict.json rename to Code/KCNA1_mutations/mutations_effects_dict.json diff --git a/Code/Neuron_models/Cb_stellate_Delta_Kv_model.py b/Code/Neuron_models/Cb_stellate_Delta_Kv_model.py index 5ecbc36..dda92c8 100644 --- a/Code/Neuron_models/Cb_stellate_Delta_Kv_model.py +++ b/Code/Neuron_models/Cb_stellate_Delta_Kv_model.py @@ -8,7 +8,7 @@ Created on Fri Jun 18 10:47:40 2021 import numpy as np import os -from Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns_Kv import Cb_stellate_Kv_mut # model parameters diff --git a/Code/Neuron_models/Cb_stellate_Kv_model.py b/Code/Neuron_models/Cb_stellate_Kv_model.py index 62f04e1..9f258a3 100644 --- a/Code/Neuron_models/Cb_stellate_Kv_model.py +++ b/Code/Neuron_models/Cb_stellate_Kv_model.py @@ -7,7 +7,7 @@ Created on Sat May 8 16:20:11 2021 import numpy as np import os -from Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns_Kv import Cb_stellate_Kv_mut # model parameters diff --git a/Code/Neuron_models/Cb_stellate_model.py b/Code/Neuron_models/Cb_stellate_model.py index 3df8139..6449554 100644 --- a/Code/Neuron_models/Cb_stellate_model.py +++ b/Code/Neuron_models/Cb_stellate_model.py @@ -1,6 +1,6 @@ import numpy as np import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns import Cb_stellate_mut # model parameters diff --git a/Code/Neuron_models/FS_Kv_model.py b/Code/Neuron_models/FS_Kv_model.py index 5d88289..2cc59ac 100644 --- a/Code/Neuron_models/FS_Kv_model.py +++ b/Code/Neuron_models/FS_Kv_model.py @@ -9,7 +9,7 @@ import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut # model parameters diff --git a/Code/Neuron_models/FS_model.py b/Code/Neuron_models/FS_model.py index 10ed164..16375b8 100644 --- a/Code/Neuron_models/FS_model.py +++ b/Code/Neuron_models/FS_model.py @@ -7,12 +7,11 @@ Created on Fri May 7 23:37:22 2021 Original Pospischil FS (no Kv1.1) """ -# Todo: error when run import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut diff --git a/Code/Neuron_models/RS_inhib_Kv_model.py b/Code/Neuron_models/RS_inhib_Kv_model.py index a88f4a0..72a4537 100644 --- a/Code/Neuron_models/RS_inhib_Kv_model.py +++ b/Code/Neuron_models/RS_inhib_Kv_model.py @@ -9,7 +9,7 @@ import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut # model parameters diff --git a/Code/Neuron_models/RS_inhib_model.py b/Code/Neuron_models/RS_inhib_model.py index bede8f1..459be81 100644 --- a/Code/Neuron_models/RS_inhib_model.py +++ b/Code/Neuron_models/RS_inhib_model.py @@ -11,7 +11,7 @@ import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut diff --git a/Code/Neuron_models/RS_pyramidal_Kv_model.py b/Code/Neuron_models/RS_pyramidal_Kv_model.py index 2838885..127152e 100644 --- a/Code/Neuron_models/RS_pyramidal_Kv_model.py +++ b/Code/Neuron_models/RS_pyramidal_Kv_model.py @@ -10,7 +10,7 @@ import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut # model parameters diff --git a/Code/Neuron_models/RS_pyramidal_model.py b/Code/Neuron_models/RS_pyramidal_model.py index 42d1f3e..a78838e 100644 --- a/Code/Neuron_models/RS_pyramidal_model.py +++ b/Code/Neuron_models/RS_pyramidal_model.py @@ -9,7 +9,7 @@ import numpy as np from numba import types from numba.typed import Dict import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Pospischil_fxns import Pospischil_mut # model parameters diff --git a/Code/Neuron_models/STN_Delta_Kv_model.py b/Code/Neuron_models/STN_Delta_Kv_model.py index cb53740..fa37eaf 100644 --- a/Code/Neuron_models/STN_Delta_Kv_model.py +++ b/Code/Neuron_models/STN_Delta_Kv_model.py @@ -6,7 +6,7 @@ Created on Fri Jun 18 10:53:45 2021 """ import numpy as np import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import STN_Kv_mut diff --git a/Code/Neuron_models/STN_Kv_model.py b/Code/Neuron_models/STN_Kv_model.py index bd67e86..4117c23 100644 --- a/Code/Neuron_models/STN_Kv_model.py +++ b/Code/Neuron_models/STN_Kv_model.py @@ -1,6 +1,6 @@ import numpy as np import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import STN_Kv_mut diff --git a/Code/Neuron_models/STN_model.py b/Code/Neuron_models/STN_model.py index 796f3c9..0611955 100644 --- a/Code/Neuron_models/STN_model.py +++ b/Code/Neuron_models/STN_model.py @@ -1,6 +1,6 @@ import numpy as np import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns import STN_mut diff --git a/Code/Old/FS_mut_pd.py b/Code/Old/FS_mut_pd.py index 1f6b8ab..3fbdf19 100644 --- a/Code/Old/FS_mut_pd.py +++ b/Code/Old/FS_mut_pd.py @@ -92,7 +92,7 @@ if not os.path.isdir(folder): os.makedirs(folder) # mutation properties -mutations = json.load(open("mutations_effects_dict.json")) +mutations = json.load(open("../KCNA1_mutations/mutations_effects_dict.json")) # prominence = 50 diff --git a/Code/Sensitivity_Analysis/SA_Cb_stellate.py b/Code/Sensitivity_Analysis/SA_Cb_stellate.py index 662775d..a69a37d 100644 --- a/Code/Sensitivity_Analysis/SA_Cb_stellate.py +++ b/Code/Sensitivity_Analysis/SA_Cb_stellate.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns import SA_Cb_stellate # model parameters @@ -80,7 +80,7 @@ g["Leak"] = 0.07407 * surf_area # save folder -folder = '../Sensitivity_Analysis/Cb_stellate' +folder = '../Sensitivity_Analysis/Data/Cb_stellate' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_Cb_stellate_Delta_Kv.py b/Code/Sensitivity_Analysis/SA_Cb_stellate_Delta_Kv.py index 17a9023..258b59b 100644 --- a/Code/Sensitivity_Analysis/SA_Cb_stellate_Delta_Kv.py +++ b/Code/Sensitivity_Analysis/SA_Cb_stellate_Delta_Kv.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns_Kv import SA_Cb_stellate_Kv # model parameters @@ -88,7 +88,7 @@ g["T"] = 0.45045 * surf_area g["Leak"] = 0.07407 * surf_area # save folder -folder = './Sensitivity_Analysis/Cb_stellate_Delta_Kv' +folder = './Sensitivity_Analysis/Data/Cb_stellate_Delta_Kv' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_Cb_stellate_Kv.py b/Code/Sensitivity_Analysis/SA_Cb_stellate_Kv.py index 7065750..b64219f 100644 --- a/Code/Sensitivity_Analysis/SA_Cb_stellate_Kv.py +++ b/Code/Sensitivity_Analysis/SA_Cb_stellate_Kv.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.Cb_stellate_fxns_Kv import SA_Cb_stellate_Kv # model parameters @@ -87,7 +87,7 @@ g["Leak"] = 0.07407 * surf_area # save folder -folder = './Sensitivity_Analysis/Cb_stellate_Kv' +folder = './Sensitivity_Analysis/Data/Cb_stellate_Kv' if not os.path.isdir(folder): os.makedirs(folder) @@ -112,28 +112,3 @@ Parallel(n_jobs=8, verbose=9)( slope_shift,gating, current, prominence, desired_AUC_width, folder, high, low, number_steps, initial_period, sec, lin_array, log_array, alt_types, alt_ind, alt) for alt_ind in range(alt_types.shape[0]) for alt in range(21)) - - -# #%% Get pd Dataframes for certain variables -# import pandas as pd -# AUC = pd.DataFrame(columns=mutations.keys()) -# AUC_rel = pd.DataFrame(columns=mutations.keys()) -# rheobase = pd.DataFrame(columns=mutations.keys()) -# rheobase_fit = pd.DataFrame(columns=mutations.keys()) -# rheobase_null_fit = pd.DataFrame(columns=mutations.keys()) - -# for mut in list(mutations.keys()): -# fname = os.path.join(folder, "{}.hdf5".format(mut)) -# f = h5py.File(fname, "r") -# AUC['{}'.format(mut)] = f['analysis']['AUC'] -# AUC_rel['{}'.format(mut)] = f['analysis']['AUC_rel'] -# rheobase['{}'.format(mut)] = f['analysis']['rheobase'] -# rheobase_fit['{}'.format(mut)] = f['analysis']['rheobase_fit'] -# rheobase_null_fit['{}'.format(mut)] = f['analysis']['rheobase_null_fit'] - -# AUC.to_json(os.path.join(folder, 'AUC.json')) -# AUC_rel.to_json(os.path.join(folder, 'AUC_rel.json')) -# rheobase.to_json(os.path.join(folder, 'rheobase.json')) -# rheobase_fit.to_json(os.path.join(folder, 'rheobase_fit.json')) -# rheobase_null_fit.to_json(os.path.join(folder, 'rheobase_null_fit.json')) - diff --git a/Code/Sensitivity_Analysis/SA_FS.py b/Code/Sensitivity_Analysis/SA_FS.py index 6caa10c..b55972e 100644 --- a/Code/Sensitivity_Analysis/SA_FS.py +++ b/Code/Sensitivity_Analysis/SA_FS.py @@ -12,7 +12,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil @@ -89,7 +89,7 @@ g["Leak"] = 0.038 * surf_area # folder to save to -folder = '../Sensitivity_Analysis/FS' +folder = '../Sensitivity_Analysis/Data/FS' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_FS_Kv.py b/Code/Sensitivity_Analysis/SA_FS_Kv.py index 81d02c2..6f91d9b 100644 --- a/Code/Sensitivity_Analysis/SA_FS_Kv.py +++ b/Code/Sensitivity_Analysis/SA_FS_Kv.py @@ -11,7 +11,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil @@ -62,19 +62,6 @@ b_param['s_mut'][:] = np.array([-14.16, -10.15, 1.]) b_param['u_mut'] = np.zeros(4) b_param['u_mut'][:] = np.array([-31., 5.256, 1., 0.245]) -# mut_act_Vhalf_wt = -30.01851851851851 -# mut_act_k_wt = -7.7333333333333325 -# s_diff_Vhalf = mut_act_Vhalf_wt - b_param['s'][0] -# s_diff_k = mut_act_k_wt - b_param['s'][1] -# b_param['s'][1] = b_param['s'][1] + s_diff_k -# b_param['u'][1] = b_param['u'][1] + s_diff_k -# b_param['s'][0] = b_param['s'][0] + s_diff_Vhalf -# b_param['u'][0] = b_param['u'][0] + s_diff_Vhalf -# b_param['s_mut'][1] = b_param['s_mut'][1] + s_diff_k -# b_param['u_mut'][1] = b_param['u_mut'][1] + s_diff_k -# b_param['s_mut'][0] = b_param['s_mut'][0] + s_diff_Vhalf -# b_param['u_mut'][0] = b_param['u_mut'][0] + s_diff_Vhalf - # reversal potentials E["Na"] = 50. E["K"] = -90. @@ -101,7 +88,7 @@ g["L"] = 0. * surf_area g["Leak"] = 0.038 * surf_area # save folder -folder = '../Sensitivity_Analysis/FS_Kv' +folder = '../Sensitivity_Analysis/Data/FS_Kv' if not os.path.isdir(folder): os.makedirs(folder) @@ -127,27 +114,3 @@ Parallel(n_jobs=8, verbose=9)( scale, b_param, slope_shift, gating, current, prominence, desired_AUC_width, folder, high, low, number_steps, initial_period, sec, lin_array, log_array, alt_types, alt_ind, alt) for alt_ind in range(alt_types.shape[0]) for alt in range(21)) - - -# #%% Get pd Dataframes for certain variables -# import pandas as pd -# AUC = pd.DataFrame(columns=mutations.keys()) -# AUC_rel = pd.DataFrame(columns=mutations.keys()) -# rheobase = pd.DataFrame(columns=mutations.keys()) -# rheobase_fit = pd.DataFrame(columns=mutations.keys()) -# rheobase_null_fit = pd.DataFrame(columns=mutations.keys()) - -# for mut in list(mutations.keys()): -# fname = os.path.join(folder, "{}.hdf5".format(mut)) -# f = h5py.File(fname, "r") -# AUC['{}'.format(mut)] = f['analysis']['AUC'] -# AUC_rel['{}'.format(mut)] = f['analysis']['AUC_rel'] -# rheobase['{}'.format(mut)] = f['analysis']['rheobase'] -# rheobase_fit['{}'.format(mut)] = f['analysis']['rheobase_fit'] -# rheobase_null_fit['{}'.format(mut)] = f['analysis']['rheobase_null_fit'] - -# AUC.to_json(os.path.join(folder, 'AUC.json')) -# AUC_rel.to_json(os.path.join(folder, 'AUC_rel.json')) -# rheobase.to_json(os.path.join(folder, 'rheobase.json')) -# rheobase_fit.to_json(os.path.join(folder, 'rheobase_fit.json')) -# rheobase_null_fit.to_json(os.path.join(folder, 'rheobase_null_fit.json')) diff --git a/Code/Sensitivity_Analysis/SA_RS_inhib.py b/Code/Sensitivity_Analysis/SA_RS_inhib.py index 3c5ee30..910b4cb 100644 --- a/Code/Sensitivity_Analysis/SA_RS_inhib.py +++ b/Code/Sensitivity_Analysis/SA_RS_inhib.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil # model parameters @@ -86,7 +86,7 @@ g["L"] = 0. g["Leak"] = 0.0205 * surf_area # save folder -folder = '../Sensitivity_Analysis/RS_inhib' +folder = '../Sensitivity_Analysis/Data/RS_inhib' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_RS_inhib_Kv.py b/Code/Sensitivity_Analysis/SA_RS_inhib_Kv.py index ecc208f..7a91cff 100644 --- a/Code/Sensitivity_Analysis/SA_RS_inhib_Kv.py +++ b/Code/Sensitivity_Analysis/SA_RS_inhib_Kv.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil @@ -87,7 +87,7 @@ g["L"] = 0. * surf_area g["Leak"] = 0.0205 * surf_area # save folder -folder = '../Sensitivity_Analysis/RS_inhib_Kv' +folder = '../Sensitivity_Analysis/Data/RS_inhib_Kv' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_RS_pyramidal.py b/Code/Sensitivity_Analysis/SA_RS_pyramidal.py index 3e18fe8..351881e 100644 --- a/Code/Sensitivity_Analysis/SA_RS_pyramidal.py +++ b/Code/Sensitivity_Analysis/SA_RS_pyramidal.py @@ -8,7 +8,7 @@ Created on Fri Jun 4 08:24:33 2021 import numpy as np from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil @@ -71,7 +71,7 @@ g["Kv_mut"] = 0. g["L"] = 0. g["Leak"] = 0.0205 * surf_area -folder = '../Sensitivity_Analysis/RS_pyramidal' +folder = '../Sensitivity_Analysis/Data/RS_pyramidal' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_RS_pyramidal_Kv.py b/Code/Sensitivity_Analysis/SA_RS_pyramidal_Kv.py index 22016be..65150f9 100644 --- a/Code/Sensitivity_Analysis/SA_RS_pyramidal_Kv.py +++ b/Code/Sensitivity_Analysis/SA_RS_pyramidal_Kv.py @@ -10,7 +10,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict, NumpyEncoder +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict, NumpyEncoder from Code.Functions.Pospischil_fxns import SA_Pospischil @@ -86,7 +86,7 @@ g["L"] = 0. * surf_area g["Leak"] = 0.0205 * surf_area # save folder -folder = '../Sensitivity_Analysis/RS_pyramidal_Kv' +folder = '../Sensitivity_Analysis/Data/RS_pyramidal_Kv' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_STN.py b/Code/Sensitivity_Analysis/SA_STN.py index 687f377..add8041 100644 --- a/Code/Sensitivity_Analysis/SA_STN.py +++ b/Code/Sensitivity_Analysis/SA_STN.py @@ -13,7 +13,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns import SA_STN # model parameters @@ -90,7 +90,7 @@ g["Ca_K"] = 1 * surf_area g["Leak"] = 0.035 * surf_area # save folder -folder = '../Sensitivity_Analysis/STN' +folder = '../Sensitivity_Analysis/Data/STN' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_STN_Delta_Kv.py b/Code/Sensitivity_Analysis/SA_STN_Delta_Kv.py index 7856299..e50a422 100644 --- a/Code/Sensitivity_Analysis/SA_STN_Delta_Kv.py +++ b/Code/Sensitivity_Analysis/SA_STN_Delta_Kv.py @@ -11,7 +11,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import SA_Kv_STN @@ -99,7 +99,7 @@ g["Leak"] = 0.035 * surf_area V_init = -70 # save folder -folder = '../Sensitivity_Analysis/STN_Delta_Kv' +folder = '../Sensitivity_Analysis/Data/STN_Delta_Kv' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/Sensitivity_Analysis/SA_STN_Kv.py b/Code/Sensitivity_Analysis/SA_STN_Kv.py index 58b6095..b8bc1fe 100644 --- a/Code/Sensitivity_Analysis/SA_STN_Kv.py +++ b/Code/Sensitivity_Analysis/SA_STN_Kv.py @@ -11,7 +11,7 @@ from numba import types from numba.typed import Dict from joblib import Parallel, delayed import os -from Code.Functions.Utility import capacitance, stimulus_init, init_dict +from Code.Functions.Utility_fxns import capacitance, stimulus_init, init_dict from Code.Functions.STN_fxns_Kv import SA_Kv_STN # model parameters @@ -96,7 +96,7 @@ g["Ca_K"] = 1 * surf_area g["Leak"] = 0.035 * surf_area # save folder -folder = '../Sensitivity_Analysis/STN_Kv' +folder = '../Sensitivity_Analysis/Data/STN_Kv' if not os.path.isdir(folder): os.makedirs(folder) diff --git a/Code/csv_generation/Plotting_data_collection.py b/Code/csv_generation/Plotting_data_collection.py index acb6397..c592959 100644 --- a/Code/csv_generation/Plotting_data_collection.py +++ b/Code/csv_generation/Plotting_data_collection.py @@ -4,45 +4,236 @@ import json import os import numpy as np from ast import literal_eval +import string +import matplotlib.cm as cm +# import Code.csv_generation.SA_collection # todo: run some and test -# todo: Model fI, rheo_{}_corr, AUC_{}_corr +# %% rheo_{}_ex.csv, AUC_{}_ex.csv + +## AUC ################### +AUC_shift = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'IB', + 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$','Cb stellate', + 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$']) + +AUC_slope = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'IB', + 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$','Cb stellate', + 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$']) + +AUC_g = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'IB', + 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$','Cb stellate', + 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$']) + +script_dir = os.path.dirname(os.path.realpath("__file__")) +fname = os.path.join(script_dir, ) +# f = h5py.File(fname, "r") + +models = ['RS_pyramidal', 'RS_inhib', 'FS','RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate','Cb_stellate_Kv', + 'Cb_stellate_Kv_only','STN','STN_Kv', 'STN_Kv_only'] +model_labels = ['RS Pyramidal','RS Inhibitory', 'FS','RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', + 'FS +$K_V1.1$','Cb stellate','Cb stellate +$K_V1.1$', + 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + + + +shift_interest = 'n' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_shift_AUC.json'.format(models[i])) as json_file: + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['0', :])/ data.loc['0', :] # normalize AUC + data.sort_index(inplace=True) + AUC_shift[model_labels[i]] =data[shift_interest] +AUC_shift['alteration'] = AUC_shift.index + + + +slope_interest = 's' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_slope_AUC.json'.format(models[i])) as json_file: + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['1.0', :])/ data.loc['1.0', :] # normalize AUC + data.sort_index(inplace=True) + try: + AUC_slope[model_labels[i]] = data[slope_interest] + except: + pass +AUC_slope['alteration'] = AUC_slope.index + +g_interest = 'Kd' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_g_AUC.json'.format(models[i])) as json_file: + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['1.0', :])/ data.loc['1.0', :] # normalize AUC + data.sort_index(inplace=True) + AUC_g[model_labels[i]] =data[g_interest] +AUC_g['alteration'] = AUC_g.index + +AUC_shift.to_csv('AUC_shift_ex.csv') +AUC_slope.to_csv('AUC_slope_ex.csv') +AUC_g.to_csv('AUC_g_ex.csv') + + +## rheobase ################### + +rheo_shift = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'IB', + 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$','Cb stellate', + 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$']) + +rheo_slope = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'RS Pyramidal +$K_V1.1$', + 'RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', 'Cb stellate', 'Cb stellate +$K_V1.1$', + 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$','STN $\Delta$$K_V1.1$']) + +rheo_g = pd.DataFrame(columns=['alteration', 'RS Pyramidal', 'RS Inhibitory', 'FS', 'IB', + 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$','Cb stellate', + 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$']) + +script_dir = os.path.dirname(os.path.realpath("__file__")) +fname = os.path.join(script_dir, ) + +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', 'Cb_stellate_Kv_only', 'STN', + 'STN_Kv', + 'STN_Kv_only'] +model_labels = ['RS Pyramidal','RS Inhibitory', 'FS','RS Pyramidal +$K_V1.1$', 'RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate', 'Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$', 'STN', 'STN +$K_V1.1$', + 'STN $\Delta$$K_V1.1$'] + +shift_interest = 's' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_shift_rheo.json'.format(models[i])) as json_file: + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['0', :]) #/ data.loc['0', :] # normalize AUC + data.sort_index(inplace=True) + try: + rheo_shift[model_labels[i]] = data[shift_interest] + except: + pass +rheo_shift['alteration'] = rheo_shift.index + +slope_interest = 'u' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_slope_rheo.json'.format(models[i])) as json_file: + + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['1.0', :]) #/ data.loc['1.0', :] # normalize AUC + data.sort_index(inplace=True) + try: + rheo_slope[model_labels[i]] = data[slope_interest] + except: + pass +rheo_slope['alteration'] = rheo_slope.index + +g_interest = 'Leak' +for i in range(len(models)): + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_g_rheo.json'.format(models[i])) as json_file: + data = pd.read_json(json_file, convert_dates=False, convert_axes=False) + data.replace(0., np.NaN, inplace=True) + data = (data - data.loc['1.0', :]) #/ data.loc['1.0', :] # normalize AUC + data.sort_index(inplace=True) + rheo_g[model_labels[i]] = data[g_interest] +rheo_g['alteration'] = rheo_g.index + + +rheo_shift.to_csv('rheo_shift_ex.csv') +rheo_slope.to_csv('rheo_slope_ex.csv') +rheo_g.to_csv('rheo_g_ex.csv') + + # %% todo: Model fI # for each model # | (index) | mag | alt | type | F | I | # | 0 | -10 | m | shift | array | array | -models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', - 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'RS pyramidal +Kv1.1', 'RS inhibitory +Kv1.1', 'FS +Kv1.1', - 'Cb stellate', 'Cb stellate +Kv1.1', 'Cb stellate $\Delta$Kv1.1', 'STN', 'STN +Kv1.1', - 'STN $\Delta$Kv1.1'] -# for each model get csv file with all shifts, scale and g -for model_name in models: - df = pd.DataFrame(columns=['mag', 'alt', 'type', 'F', 'I']) - folder = '../Neuron_models/{}'.format(model_name) - fname = os.path.join(folder, "{}.hdf5".format(model_name)) - # for each alt in model - # with h5py.File(fname, "r+") as f: - # df.loc[model_name, 'alt'] = f['data'].attrs['alteration'] - # test = f['data'].attrs['alteration_info'].replace(' ', ',') - # alt_info = literal_eval(test) - # var = alt_info[0] - # alt_type = alt_info[1] - # df.loc[model_name, 'mag'] = var - # df.loc[model_name, 'type'] = alt_type - # df.loc[model_name, 'F'] = f['analysis']['F_inf'][:] - # I_mag = np.arange(f['data'].attrs['I_low'], f['data'].attrs['I_high'], - # (f['data'].attrs['I_high'] - f['data'].attrs['I_low']) / f['data'].attrs['stim_num']) * 1000 - # df.loc[model_name, 'I'] = I - # df.to_csv('./Model_fI/{}.csv'.format(model_name)) -# %% todo: rheo/AUC_{}_corr -# | (index) | model | corr | p_value | g | color -rheo_corr = pd.DataFrame(columns=['model', 'corr', 'p_value', 'g', 'color']) -rheo_corr.to_csv('rheo_corr.csv') - -AUC_corr = pd.DataFrame(columns=['model', 'corr', 'p_value', 'g', 'color']) -AUC_corr.to_csv('AUC_corr.csv') - -# %% firing_values.csv,model_spiking.csv, model_F_inf.csv # DONE #################################################### + +models = ['RS Pyramidal', 'RS Inhibitory', 'FS', 'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', + 'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', + 'Cb stellate', 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', + 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN', + 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'] + +model_save_name = {'RS Pyramidal': 'RS_pyr_posp', 'RS Inhibitory': 'RS_inhib_posp', 'FS': 'FS_posp', + 'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':'RS_pyr_Kv', + 'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':'RS_inhib_Kv', + 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':'FS_Kv', + 'Cb stellate': 'Cb_stellate', + 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':'Cb_stellate_Kv', + 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':'Cb_stellate_Kv_only', + 'STN': 'STN', + 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'STN_Kv', + 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'STN_Kv_only'} +top_file_dir = '../Sensitivity_Analysis/Data' +data_dir = {'RS Pyramidal': os.path.join(top_file_dir, 'RS_pyramidal_{}_fI.json'), + 'RS Inhibitory': os.path.join(top_file_dir, 'RS_inhib_{}_fI.json'), + 'FS': os.path.join(top_file_dir, 'FS_{}_fI.json'), + 'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'RS_pyramidal_{}_fI.json'), + 'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'RS_inhib_{}_fI.json'), + 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'FS_{}_fI.json'), + 'Cb stellate': os.path.join(top_file_dir, 'Cb_stellate_{}_fI.json'), + 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'Cb_stellate_Kv_{}_fI.json'), + 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'Cb_stellate_Kv_only_{}_fI.json'), + 'STN': os.path.join(top_file_dir, 'STN_{}_fI.json'), + 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'STN_Kv_{}_fI.json'), + 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'STN_Kv_only_{}_fI.json')} + +I_dir = {'RS Pyramidal': os.path.join(top_file_dir, 'RS_pyramidal_{}_I_mag.json'), + 'RS Inhibitory': os.path.join(top_file_dir, 'RS_pyramidal_{}_I_mag.json'), + 'FS': os.path.join(top_file_dir, 'RS_pyramidal_{}_I_mag.json'), + 'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'RS_pyramidal_{}_I_mag.json'), + 'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'RS_inhib_{}_I_mag.json'), + 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'FS_{}_I_mag.json'), + 'Cb stellate': os.path.join(top_file_dir, 'Cb_stellate_{}_I_mag.json'), + 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'Cb_stellate_Kv_{}_I_mag.json'), + 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'Cb_stellate_Kv_only_{}_I_mag.json'), + 'STN': os.path.join(top_file_dir, 'STN_{}_I_mag.json'), + 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'STN_Kv_{}_I_mag.json'), + 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': os.path.join(top_file_dir, 'STN_Kv_only_{}_I_mag.json')} + + +def concat_dfs(df, data_dir, I_dir, type='shift'): + with open(data_dir.format(type)) as json_file: + data = pd.read_json(json_file, convert_axes=False) + with open(I_dir.format(type)) as json_file: + I = pd.read_json(json_file, convert_axes=False) + for c in data.columns: + # print(c) + df = df.append(pd.DataFrame(data=(np.array([data.index,['{}'.format(c) for i in range(0, len(data[c]))], + [type for i in range(0, len(data[c]))], data[c], I[c]]).T), + columns=['mag','alt', 'type', 'F', 'I'])) + return df + + +summary_df = pd.DataFrame(columns=['mag','alt', 'type', 'F', 'I']) +for m in models: + print(m) + df = pd.DataFrame(columns=['mag','alt', 'type', 'F', 'I']) + df = concat_dfs(df, data_dir[m], I_dir[m], type='shift') + df = concat_dfs(df, data_dir[m], I_dir[m], type='slope') + df = concat_dfs(df, data_dir[m], I_dir[m], type='g') + folder = os.path.join(os.path.dirname(os.path.realpath("__file__")), 'Model_fI') + if not os.path.isdir(folder): + os.makedirs(folder) + df.to_csv(os.path.join(folder, '{}_fI.csv'.format(model_save_name[m]))) + +# #%% todo: rheo/AUC_{}_corr - done in SA_collection.py +# # | (index) | model | corr | p_value | g | color +# +# # in rheo_[]_corr.csv and AUC_[]_corr.csv +# # columns=['model', 'corr', 'p_value', 'local corr', 'local p_value', 'ratio', '$\Delta V_{1/2}$', 'color'] +# +# rheo_corr = pd.DataFrame(columns=['model', 'corr', 'p_value', 'g', 'color']) +# rheo_corr.to_csv('rheo_corr.csv') +# +# AUC_corr = pd.DataFrame(columns=['model', 'corr', 'p_value', 'g', 'color']) +# AUC_corr.to_csv('AUC_corr.csv') + +# %% firing_values.csv,model_spiking.csv, model_F_inf.csv import numpy as np import pandas as pd @@ -52,9 +243,6 @@ model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'RS pyramidal +Kv1.1', 'RS 'Cb stellate', 'Cb stellate +Kv1.1', 'Cb stellate $\Delta$Kv1.1', 'STN', 'STN +Kv1.1', 'STN $\Delta$Kv1.1'] firing_values = pd.DataFrame(columns=models, index=['spike_ind', 'ramp_up', 'ramp_down']) -# firing_values.loc['spike_ind', :] = np.array( -# [0.3, 0.04375, 0.25, 0.3, 0.0875, 0.25, 0.3, 0.65, 0.375, 0.125, 0.475, 0.4]) - models = ['RS_pyr', 'RS_pyr_Kv', 'RS_inhib', 'RS_inhib_Kv', 'FS', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', 'Cb_stellate_Delta_Kv', 'STN', 'STN_Kv', 'STN_Delta_Kv'] @@ -65,7 +253,6 @@ col_names = ['t'] for mod in models: col_names.append(mod) spiking = pd.DataFrame(columns=col_names) - # index for example trace spike_ind = {'RS_pyramidal': 60, 'RS_inhib':25, 'FS':50, 'RS_pyramidal_Kv':60, 'RS_inhib_Kv':50, 'FS_Kv':50, 'Cb_stellate':60, 'Cb_stellate_Kv':130, @@ -88,7 +275,7 @@ for model_name in models: firing_values.to_csv('firing_values.csv') spiking.to_csv('model_spiking.csv') model_F_inf.to_csv('model_F_inf.csv') -# %% model_ramp.csv # DONE ######################################################################### +# %% model_ramp.csv # | (index) | t | models .... import numpy as np import pandas as pd @@ -114,9 +301,9 @@ for model_name in models: model_ramp.to_csv('model_ramp.csv') -#%% sim_mut_AUC.csv, sim_mut_rheo.csv # DONE ######################################################################### +#%% sim_mut_AUC.csv, sim_mut_rheo.csv # # generate mutation plot data -mutations = json.load(open("../mutations_effects_dict.json")) +mutations = json.load(open("../KCNA1_mutations/mutations_effects_dict.json")) keys_to_remove = ['V408L', 'T226R', 'R239S', 'R324T'] for key in keys_to_remove: del mutations[key] @@ -148,6 +335,3 @@ rheobase = (rheobase - rheobase.loc['WT', :]) /rheobase.loc['WT', :] AUC = (AUC - AUC.loc['WT', :]) /AUC.loc['WT', :] AUC.to_csv(os.path.join(save_folder, 'sim_mut_AUC.csv')) rheobase.to_csv(os.path.join(save_folder, 'sim_mut_rheobase.csv')) - - -######################################################################################################################### diff --git a/Code/csv_generation/SA_collection.py b/Code/csv_generation/SA_collection.py index 0aa2c4c..5c1a088 100644 --- a/Code/csv_generation/SA_collection.py +++ b/Code/csv_generation/SA_collection.py @@ -7,12 +7,12 @@ import json import scipy.stats as stats # folder -top_dir = '../Sensitivity_Analysis' -#%% create JSON files for each alt type -for dir_name in next(os.walk(top_dir))[1]: +top_dir = '../Sensitivity_Analysis/Data' + +#%% create JSON files for each alt type for each model in '../Sensitivity_Analysis/Data/SA_summary_df/file.json' +for dir_name in next(os.walk(top_dir))[1]: # for each folder in top_file_dir (each model) folder = os.path.join(top_dir, dir_name) print(folder) - # for each alt_type create pd df shift_AUC = pd.DataFrame() shift_rheo = pd.DataFrame() @@ -122,12 +122,16 @@ alt_dict['Kv'] = '$K_V1.1$' alt_dict['A'] = 'A' alt_dict['Leak'] = 'Leak' +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] shift_df = pd.DataFrame(columns=['model', 'corr', 'p_value', 'local corr', 'local p_value', 'ratio', '$\Delta V_{1/2}$', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_shift_AUC.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df/{}_shift_AUC.json'.format(models[mod])) as json_file: df = pd.read_json(json_file) df.sort_index(inplace=True) df.replace(0., np.NaN, inplace=True) @@ -142,11 +146,16 @@ for mod in range(len(models)): shift_df = shift_df.append(pd.Series([model_names[mod], tau, p,tau_l, p_l, ratio_tau, alt_dict[c],clr_dict[models[mod]]], index=shift_df.columns), ignore_index=True) -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + slope_df = pd.DataFrame(columns=['model', 'corr', 'p_value','local corr', 'local p_value', 'ratio', 'Slope (k)', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_slope_AUC.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df//{}_slope_AUC.json'.format(models[mod])) as json_file: df = pd.read_json(json_file, convert_dates=False, convert_axes=False) df.index = df.index.map(float) df.sort_index(inplace=True) @@ -161,11 +170,16 @@ for mod in range(len(models)): ratio_tau = tau_l/tau slope_df = slope_df.append(pd.Series([model_names[mod], tau, p, tau_l, p_l, ratio_tau, alt_dict[c],clr_dict[models[mod]]], index=slope_df.columns), ignore_index=True) -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + g_df = pd.DataFrame(columns=['model', 'corr', 'p_value', 'local corr', 'local p_value', 'ratio', 'g', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_g_AUC.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df//{}_g_AUC.json'.format(models[mod])) as json_file: df = pd.read_json(json_file, convert_dates=False, convert_axes=False) df.index = df.index.map(float) df.sort_index(inplace=True) @@ -182,16 +196,21 @@ for mod in range(len(models)): shift_df.to_json('./Sensitivity_analysis/shift_box_kendall_corr.json') slope_df.to_json('./Sensitivity_analysis/slope_box_kendall_corr.json') -g_df.to_json('./Sensitivity_analysis/g_box_kendall_corr.json') +g_df.to_json('./Sensitivity_analysis/g_kendall_corr.json') #%% rheobase correlation analysis -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + shift_df = pd.DataFrame(columns=['model', 'corr', 'p_value', 'local corr', 'local p_value', 'ratio', '$\Delta V_{1/2}$', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_shift_rheo.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df//{}_shift_rheo.json'.format(models[mod])) as json_file: df = pd.read_json(json_file) df.sort_index(inplace=True) df.replace(0., np.NaN, inplace=True) @@ -206,11 +225,16 @@ for mod in range(len(models)): shift_df = shift_df.append(pd.Series([model_names[mod], tau, p,tau_l, p_l, ratio_tau, alt_dict[c],clr_dict[models[mod]]], index=shift_df.columns), ignore_index=True) -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + slope_df = pd.DataFrame(columns=['model', 'corr', 'p_value','local corr', 'local p_value', 'ratio', 'Slope (k)', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_slope_rheo.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df//{}_slope_rheo.json'.format(models[mod])) as json_file: df = pd.read_json(json_file, convert_dates=False, convert_axes=False) df.index = df.index.map(float) df.sort_index(inplace=True) @@ -225,11 +249,16 @@ for mod in range(len(models)): ratio_tau = tau_l/tau slope_df = slope_df.append(pd.Series([model_names[mod], tau, p, tau_l, p_l, ratio_tau, alt_dict[c],clr_dict[models[mod]]], index=slope_df.columns), ignore_index=True) -models =['RS_pyramidal', 'RS_inhib', 'FS', 'IB','Cb_stellate','Cb_stellate_Kv','Cb_stellate_Kv_only','STN','STN_Kv','STN_Kv_only'] -model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'IB','Cb stellate','Cb stellate +$K_V1.1$','Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$','STN $\Delta$$K_V1.1$'] +# models = directory names in top_file_dir and what json files are named +models = ['RS_pyramidal', 'RS_inhib', 'FS', 'RS_pyramidal_Kv', 'RS_inhib_Kv', 'FS_Kv', 'Cb_stellate', 'Cb_stellate_Kv', + 'Cb_stellate_Kv_only', 'STN', 'STN_Kv', 'STN_Kv_only'] +# model_names = names of models for json files and ultimately csv files for plotting +model_names = ['RS Pyramidal','RS Inhibitory','FS', 'RS Pyramidal +$K_V1.1$','RS Inhibitory +$K_V1.1$', 'FS +$K_V1.1$', + 'Cb stellate','Cb stellate +$K_V1.1$', 'Cb stellate $\Delta$$K_V1.1$','STN','STN +$K_V1.1$', 'STN $\Delta$$K_V1.1$'] + g_df = pd.DataFrame(columns=['model', 'corr', 'p_value', 'local corr', 'local p_value', 'ratio', 'g', 'color']) # for boxplots for mod in range(len(models)): - with open('./SA_summary_df/{}_g_rheo.json'.format(models[mod])) as json_file: + with open('../Sensitivity_Analysis/Data/SA_summary_df//{}_g_rheo.json'.format(models[mod])) as json_file: df = pd.read_json(json_file, convert_dates=False, convert_axes=False) df.index = df.index.map(float) df.sort_index(inplace=True) @@ -246,52 +275,29 @@ for mod in range(len(models)): shift_df.to_json('./Sensitivity_analysis/rheo_shift_box_kendall_corr.json') slope_df.to_json('./Sensitivity_analysis/rheo_slope_box_kendall_corr.json') -g_df.to_json('./Sensitivity_analysis/rheo_g_box_kendall_corr.json') +g_df.to_json('./Sensitivity_analysis/rheo_g_kendall_corr.json') #%% todo: CREATE CSV FILES ################################################################################################### -# from ./Code/From_Neuronal_models/tau_analysis/AUC_corr_df_gen.py -AUC_shift_df = pd.read_json('./Sensitivity_analysis/shift_box_kendall_corr_rel.json', orient='records') -AUC_slope_df = pd.read_json('./Sensitivity_analysis/slope_box_kendall_corr_rel.json', orient='records') #, lines=True) -AUC_g_df = pd.read_json('./Sensitivity_analysis/g_box_kendall_corr_rel.json', orient='records') -# for i in np.array(['FS', 'IB', 'RS inhibitory', 'RS pyramidal']): -# AUC_shift_df.loc[AUC_shift_df['model'] == i, 'model'] = i + ' +$K_V1.1$' # ''+$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' -# AUC_slope_df.loc[AUC_slope_df['model'] == i, 'model'] = i + ' +$K_V1.1$' #' +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' -# AUC_g_df.loc[AUC_g_df['model'] == i, 'model'] = i + ' +$K_V1.1$' #' +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' - -AUC_shift_df_posp = pd.read_json('./Sensitivity_analysis/shift_box_kendall_corr_rel_pospischil.json', orient='records') -AUC_slope_df_posp = pd.read_json('./Sensitivity_analysis/slope_box_kendall_corr_rel_pospischil.json', orient='records') #, lines=True) -AUC_g_df_posp = pd.read_json('./Sensitivity_analysis/g_box_kendall_corr_rel_pospischil.json', orient='records') - -AUC_shift_df = AUC_shift_df.append(AUC_shift_df_posp) -AUC_slope_df = AUC_slope_df.append(AUC_slope_df_posp) -AUC_g_df = AUC_g_df.append(AUC_g_df_posp) - +#% AUC +AUC_shift_json = pd.read_json('./Sensitivity_analysis/shift_kendall_corr_rel.json', orient='records') +AUC_slope_json = pd.read_json('./Sensitivity_analysis/slope_kendall_corr_rel.json', orient='records') #, lines=True) +AUC_g_json = pd.read_json('./Sensitivity_analysis/g_kendall_corr_rel.json', orient='records') +AUC_shift_df = AUC_shift_json[['model', 'corr', 'p_value', 'g', 'color']] +AUC_slope_df = AUC_slope_json[['model', 'corr', 'p_value', 'g', 'color']] +AUC_g_df = AUC_g_json[['model', 'corr', 'p_value', 'g', 'color']] AUC_shift_df.to_csv('AUC_shift_corr.csv') AUC_slope_df.to_csv('AUC_scale_corr.csv') AUC_g_df.to_csv('AUC_g_corr.csv') - - #% rheo -rheo_shift_df = pd.read_json('./Sensitivity_analysis/rheo_shift_box_kendall_corr.json', orient='records') -rheo_slope_df = pd.read_json('./Sensitivity_analysis/rheo_slope_box_kendall_corr.json', orient='records') #, lines=True) -rheo_g_df = pd.read_json('./Sensitivity_analysis/rheo_g_box_kendall_corr.json', orient='records') -for i in np.array(['FS', 'IB', 'RS inhibitory', 'RS pyramidal']): - rheo_shift_df.loc[rheo_shift_df['model'] == i, 'model'] = i + ' +$K_V1.1$' #' +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' - rheo_slope_df.loc[rheo_slope_df['model'] == i, 'model'] = i + ' +$K_V1.1$' #' +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' - rheo_g_df.loc[rheo_g_df['model'] == i, 'model'] = i + ' +$K_V1.1$' #' +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$' - -rheo_shift_df_posp = pd.read_json('./Sensitivity_analysis/rheo_shift_box_kendall_corr_pospischil.json', orient='records') -rheo_slope_df_posp = pd.read_json('./Sensitivity_analysis/rheo_slope_box_kendall_corr_pospischil.json', orient='records') #, lines=True) -rheo_g_df_posp = pd.read_json('./Sensitivity_analysis/rheo_g_box_kendall_corr_pospischil.json', orient='records') - - -rheo_shift_df = rheo_shift_df.append(rheo_shift_df_posp) -rheo_slope_df = rheo_slope_df.append(rheo_slope_df_posp) -rheo_g_df = rheo_g_df.append(rheo_g_df_posp) - +rheo_shift_json = pd.read_json('./Sensitivity_analysis/rheo_shift_kendall_corr.json', orient='records') +rheo_slope_json = pd.read_json('./Sensitivity_analysis/rheo_slope_kendall_corr.json', orient='records') #, lines=True) +rheo_g_json = pd.read_json('./Sensitivity_analysis/rheo_g_kendall_corr.json', orient='records') +rheo_shift_df = rheo_shift_json[['model', 'corr', 'p_value', 'g', 'color']] +rheo_slope_df = rheo_slope_json[['model', 'corr', 'p_value', 'g', 'color']] +rheo_g_df = rheo_g_json[['model', 'corr', 'p_value', 'g', 'color']] rheo_shift_df.to_csv('rheo_shift_corr.csv') rheo_slope_df.to_csv('rheo_scale_corr.csv') -rheo_g_df.to_csv('rheo_g_corr.csv') \ No newline at end of file +rheo_g_df.to_csv('rheo_g_corr.csv') diff --git a/Code/run_simulations.sh b/Code/run_simulations.sh new file mode 100644 index 0000000..2878e6d --- /dev/null +++ b/Code/run_simulations.sh @@ -0,0 +1,46 @@ + +# Individual Neuronal models +python ./Neuron_models/RS_pyramidal_model.py +python ./Neuron_models/RS_pyramidal_Kv_model.py +python ./Neuron_models/RS_inhib_model.py +python ./Neuron_models/RS_inhib_Kv_model.py +python ./Neuron_models/FS_model.py +python ./Neuron_models/FS_Kv_model.py +python ./Neuron_models/STN_model.py +python ./Neuron_models/STN_Kv_model.py +python ./Neuron_models/STN_Delta_Kv_model.py +python ./Neuron_models/Cb_stellate_model.py +python ./Neuron_models/Cb_stellate_Kv_model.py +python ./Neuron_models/Cb_stellate_Delta_Kv_model.py + + +# Sensitivity Analysis +python ./Sensitivity_Analysis/SA_RS_pyramidal.py +python ./Sensitivity_Analysis/SA_RS_pyramidal_Kv.py +python ./Sensitivity_Analysis/SA_RS_inhib.py +python ./Sensitivity_Analysis/SA_RS_inhib_Kv.py +python ./Sensitivity_Analysis/SA_FS.py +python ./Sensitivity_Analysis/SA_FS_Kv.py +python ./Sensitivity_Analysis/SA_STN.py +python ./Sensitivity_Analysis/SA_STN_Kv.py +python ./Sensitivity_Analysis/SA_STN_Delta_Kv.py +python ./Sensitivity_Analysis/SA_Cb_stellate.py +python ./Sensitivity_Analysis/SA_Cb_stellate_Kv.py +python ./Sensitivity_Analysis/SA_Cb_stellate_Delta_Kv.py + + +# KCNA1 mutations in models +python ./KCNA1_mutatoins/mut_RS_pyramidal_Kv.py +python ./KCNA1_mutatoins/mut_RS_inhib_Kv.py +python ./KCNA1_mutatoins/mut_FS_Kv.py +python ./KCNA1_mutatoins/mut_STN.py +python ./KCNA1_mutatoins/mut_STN_Kv.py +python ./KCNA1_mutatoins/mut_STN_Delta_Kv.py +python ./KCNA1_mutatoins/mut_Cb_stellate.py +python ./KCNA1_mutatoins/mut_Cb_stellate_Kv.py +python ./KCNA1_mutatoins/mut_Cb_stellate_Delta_Kv.py + + +# Data collection and csv generation +python SA_collection.py +python Plotting_data_collection.py \ No newline at end of file diff --git a/manuscript.tex b/manuscript.tex index 03300f8..0a81617 100644 --- a/manuscript.tex +++ b/manuscript.tex @@ -47,7 +47,7 @@ \usepackage{newfloat} \usepackage{upgreek} \usepackage{soul} - +\usepackage{hyperref} \let\cite\citep \renewenvironment{abstract} @@ -90,58 +90,74 @@ \newcommand{\noteuh}[1]{\note[UBSH]{#1}} \begin{document} -\title{Loss or Gain of Function? Neuronal Firing Effects of Ion Channel Mutations Depend on the Cell Type} +\title{Loss or Gain of Function? Effects of Ion Channel Mutations on Neuronal Firing Depend on the Cell Type} \vspace{-1em} \date{} -%\section*{Titlepage for eNeuro - will be put into Word file provided for submission} -%\subsection{Manuscript Title (50 word maximum)} -%Loss or Gain of Function? Neuronal Firing Effects of Ion Channel Mutations Depend on the Cell Type -% -%\subsection{Abbreviated Title (50 character maximum)} -%Effects of Ion Channel Mutation Depend on Cell Type -% -%\subsection{List all Author Names and Affiliations in order as they would appear in the published article} -%Nils A. Koch\textsuperscript{1,2}, Lukas Sonnenberg\textsuperscript{1,2}, Ulrike B.S. Hedrich\textsuperscript{3}, Stephan Lauxmann\textsuperscript{1,3}, Jan Benda\textsuperscript{1,2} -% -%\textsuperscript{1}Institute for Neurobiology, University of Tuebingen, 72072 Tuebingen, Germany\\ -%\textsuperscript{2}Bernstein Center for Computational Neuroscience Tuebingen, 72076 Tuebingen, Germany\\ -%\textsuperscript{3} Department of Neurology and Epileptology, Hertie Institute for Clinical Brain Research, University of Tuebingen, 72076 Tuebingen, Germany\\ -% -%\subsection{Author Contributions - Each author must be identified with at least one of the following: Designed research, Performed research, Contributed unpublished reagents/ analytic tools, Analyzed data, Wrote the paper.} -%\notenk{Adjust as you deem appropriate}\\ -%NK, LS, UBSH, SL, JB Designed Research; -%NK Performed research; -%NK, LS Analyzed data; -%NK, LS,UBSH, SL, JB Wrote the paper -% -%\subsection{Correspondence should be addressed to (include email address)} -%\ \notenk{Nils oder Jan?} -%\subsection{Number of Figures} -% 5 -%\subsection{Number of Tables} -%3 -%\subsection{Number of Multimedia} -%0 -%\subsection{Number of words for Abstract} -%\notenk{Added when manuscript is finalized} -%\subsection{Number of Words for Significance Statement} -%\notenk{Added when manuscript is finalized} -%\subsection{Number of words for Discussion} -%\notenk{Added when manuscript is finalized} -%\subsection{Acknowledgements} -% -%\subsection{Conflict of Interest} -%Authors report no conflict of interest. -%\\\textbf{A.} The authors declare no competing financial interests. -%\subsection{Funding sources} -%\notenk{Add as appropriate - I don't know this information}\notejb{SmartStart} -%\newpage{} +\section*{Titlepage for eNeuro - will be put into Word file provided for submission} +\subsection{Manuscript Title (50 word maximum)} +Loss or Gain of Function? Effects of Ion Channel Mutations on Neuronal Firing Depend on the Cell Type +\subsection{Abbreviated Title (50 character maximum)} +Effects of Ion Channel Mutation Depend on Cell Type + +\subsection{List all Author Names and Affiliations in order as they would appear in the published article} +Nils A. Koch\textsuperscript{1,2}, Lukas Sonnenberg\textsuperscript{1,2}, Ulrike B.S. Hedrich\textsuperscript{3}, Stephan Lauxmann\textsuperscript{1,3}, Jan Benda\textsuperscript{1,2} +\textsuperscript{1}Institute for Neurobiology, University of Tuebingen, 72072 Tuebingen, Germany\\ +\textsuperscript{2}Bernstein Center for Computational Neuroscience Tuebingen, 72076 Tuebingen, Germany\\ +\textsuperscript{3} Department of Neurology and Epileptology, Hertie Institute for Clinical Brain Research, University of Tuebingen, 72076 Tuebingen, Germany\\ + +\subsection{Author Contributions - Each author must be identified with at least one of the following: Designed research, Performed research, Contributed unpublished reagents/ analytic tools, Analyzed data, Wrote the paper.} +\notenk{Adjust as you deem appropriate}\\ +NK, LS, UBSH, SL, JB Designed Research; +NK Performed research; +NK, LS Analyzed data; +NK, LS, UBSH, SL, JB Wrote the paper + +\subsection{Correspondence should be addressed to (include email address)} +\ \notenk{Nils oder Jan?} +\subsection{Number of Figures} + 5 +\subsection{Number of Tables} +3 +\subsection{Number of Multimedia} +0 +\subsection{Number of words for Abstract} +\notenk{Added when manuscript is finalized} +\subsection{Number of Words for Significance Statement} +\notenk{Added when manuscript is finalized} +\subsection{Number of words for Discussion} +\notenk{Added when manuscript is finalized} +\subsection{Acknowledgements} + +\subsection{Conflict of Interest} +Authors report no conflict of interest. +\\\textbf{A.} The authors declare no competing financial interests. +\subsection{Funding sources} +\notenk{Add as appropriate - I don't know this information}\notejb{SmartStart} + + +\section*{Publishing Topic} +\begin{enumerate} + \item Development; + \item \textbf{Neuronal Excitability}; + \item Sensory and Motor Systems; + \item Integrative Systems; + \item Cognition and Behavior; + \item Novel Tools and Methods; + \item Disorders of the Nervous System; + \item or History, Teaching, and Public Awareness. +\end{enumerate} + +\section*{Other issue for Submission} +\textit{Authors will be asked to choose one or two preferred Reviewing Editor(s) in order of preference. Editor assignments will be made based on the expertise of the editors, load, and scheduling. Authors may also exclude reviewing editors from handling their manuscripts.} +\url{https://www.eneuro.org/content/editorial-board#reviewing_editors}\\ +\textit{Authors may optionally identify up to 5 reviewers who are well qualified to referee the work and who would not have a conflict of interest. Authors should provide the name, address, and email for each potential referee} +\newpage{} \begingroup \let\center\flushleft \let\endcenter\endflushleft @@ -199,25 +215,28 @@ Due to the high clinical relevance of understanding cell-type dependent effects %Computational modelling approaches can be used to assess the impacts of altered ionic current properties on firing behavior, bridging the gap between changes in the biophysical properties induced by mutations, firing and clinical symptoms. Conductance-based neuronal models enable insight into the effects of ion channel mutations with specific effects of the resulting ionic current as well as enabling \textit{in silico} assessment of the relative effects of changes in biophysical properties of ionic currents on neuronal firing. Furthermore, modelling approaches enable predictions of the effects of specific mutation and drug induced biophysical property changes \citep{Layer2021,Liu2019,johannesen_genotype-phenotype_2021, lauxmann_therapeutic_2021}. In this study, we therefore investigated how the outcome of ionic current kinetic changes on firing depend on neuronal cell type by (1) characterizing firing responses with 2 measures, (2) simulating the response of a repertoire of different neuronal models to changes in single current parameters as well as (3) to more complex changes as they were observed for \textit{specific mutations. For this task we chose mutations in the \textit{KCNA1} gene, encoding the potassium channel subunit \Kv, that are associated with episodic ataxia type~1 \citep{Browne1994, Browne1995, lauxmann_therapeutic_2021}.} \textcolor{red}{ specific \textit{KCNA1} mutations that are associated with episodic ataxia type~1 \citep{Browne1994, Browne1995, lauxmann_therapeutic_2021}} -\par\null +%\par\null \section*{Materials and Methods} % \textit{The materials and methods section should be brief but sufficient to allow other investigators to repeat the research (see also Policy Concerning Availability of Materials). Reference should be made to published procedures wherever possible; this applies to the original description and pertinent published modifications. } -\par\null +%\par\null All modelling and simulation was done in parallel with custom written Python 3.8 software, run on a Cent-OS 7 server with an Intel(R) Xeon (R) E5-2630 v2 CPU. % @ 2.60 GHz Linux 3.10.0-123.e17.x86_64. \subsection*{Different Cell Models} - A group of neuronal models representing the major classes of cortical and thalamic neurons including regular spiking pyramidal (RS pyramidal; model D), regular spiking inhibitory (RS inhibitory; model B), and fast spiking (FS; model C) cells were used \citep{pospischil_minimal_2008}. Additionally, a \Kv current (\IKv; \citealt{ranjan_kinetic_2019}) was added to each of these models (RS pyramidal +\Kv; model H, RS inhibitory +\Kv; model E, and FS +\Kv; model G respectively). A cerebellar stellate cell model from \citet{alexander_cerebellar_2019} is used (Cb stellate; model A) in this study. This cell model was also extended by a \Kv current \citep{ranjan_kinetic_2019}, either in addition to the A-type potassium current (Cb stellate +\Kv; model F) or by replacing the A-type potassium current (Cb stellate \(\Delta\)\Kv; model J). A subthalamic nucleus (STN; model L) neuron model as described by \citet{otsuka_conductance-based_2004} was also used. The STN cell model (model L) was additionally extended by a \Kv current \citep{ranjan_kinetic_2019}, either in addition to the A-type potassium current (STN +\Kv; model I) or by replacing the A-type potassium current (STN \(\Delta\)\Kv; model K). Model letter naming corresponds to panel lettering in \Cref{fig:diversity_in_firing}. The properties and maximal conductances of each model are detailed in \Cref{tab:g} and the gating properties are unaltered from the original Cb stellate (model A) and STN (model L) models \citep{alexander_cerebellar_2019, otsuka_conductance-based_2004}. For enabling the comparison of models with the typically reported electrophysiological data fitting reported and for ease of further gating curve manipulations, a modified Boltzmann function + +A group of neuronal models representing the major classes of cortical and thalamic neurons including regular spiking pyramidal (RS pyramidal; model D), regular spiking inhibitory (RS inhibitory; model B), and fast spiking (FS; model C) cells were used \citep{pospischil_minimal_2008}. Additionally, a \Kv current (\IKv; \citealt{ranjan_kinetic_2019}) was added to each of these models (RS pyramidal +\Kv; model H, RS inhibitory +\Kv; model E, and FS +\Kv; model G respectively). A cerebellar stellate cell model from \citet{alexander_cerebellar_2019} is used (Cb stellate; model A) in this study. This cell model was also extended by a \Kv current \citep{ranjan_kinetic_2019}, either in addition to the A-type potassium current (Cb stellate +\Kv; model F) or by replacing the A-type potassium current (Cb stellate \(\Delta\)\Kv; model J). A subthalamic nucleus (STN; model L) neuron model as described by \citet{otsuka_conductance-based_2004} was also used. The STN cell model (model L) was additionally extended by a \Kv current \citep{ranjan_kinetic_2019}, either in addition to the A-type potassium current (STN +\Kv; model I) or by replacing the A-type potassium current (STN \(\Delta\)\Kv; model K). Model letter naming corresponds to panel lettering in \Cref{fig:diversity_in_firing}. The properties and maximal conductances of each model are detailed in \Cref{tab:g} and the gating properties are unaltered from the original Cb stellate (model A) and STN (model L) models \citep{alexander_cerebellar_2019, otsuka_conductance-based_2004}. For enabling the comparison of models with the typically reported electrophysiological data fitting reported and for ease of further gating curve manipulations, a modified Boltzmann function + \begin{equation}\label{eqn:Boltz} x_\infty = {\left(\frac{1-a}{1+{\exp\left[{\frac{V-V_{1/2}}{k}}\right]}} +a\right)^j} \end{equation} + with slope \(k\), voltage for half-maximal activation or inactivation (\(V_{1/2}\)), exponent \(j\), and persistent current \(0 \leq a \leq 1\) were fitted to the original formulism for RS pyramidal (model D), RS inhibitory (model B) and FS (model C) models from \citet{pospischil_minimal_2008}. The properties of \IKv were fitted to the mean wild type biophysical parameters of \Kv described in \citet{lauxmann_therapeutic_2021}. Each of the original single-compartment models used here can reproduce physiological firing behavior of the neurons they represent (\Cref{fig:diversity_in_firing}; \citealt{pospischil_minimal_2008, alexander_cerebellar_2019, otsuka_conductance-based_2004}) and capture key aspects of the dynamics of these cell types. -\input{g_table} - -\input{gating_table} +%\input{g_table} +% +%\input{gating_table} \subsection*{Firing Frequency Analysis} The membrane responses to 200 equidistant two second long current steps were simulated using the forward-Euler method with a \(\Delta \textrm{t} = 0.01\)\,ms from steady state. Current steps ranged from 0 to 1\,nA (step size 5\,pA) for all models except for the RS inhibitory neuron models where a range of 0 to 0.35\,nA (step size 1.75\,pA) was used to ensure repetitive firing across the range of input currents. For each current step, action potentials were detected as peaks with at least 50\,mV prominence, or the relative height above the lowest contour line encircling it, and a minimum interspike interval of 1\,ms. The interspike interval was computed and used to determine the instantaneous firing frequencies elicited by the current step. @@ -255,7 +274,7 @@ The Kendall's \(\tau\) coefficient, a non-parametric rank correlation, is used t The code/software described in the paper is freely available online at [URL redacted for double-blind review]. The code is available as Extended Data. % The type of computer and operating system on which the code was run to obtain the results in the manuscript must be stated in the Materials and Methods section.\\ -\input{statistical_table} +%\input{statistical_table} \section*{Results} @@ -264,13 +283,13 @@ The code/software described in the paper is freely available online at [URL reda To examine the role of cell-type specific ionic current environments on the impact of altered ion currents properties on firing behavior a set of neuronal models was used and properties of channels common across models were altered systematically one at a time. The effects of a set of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing was then examined across different neuronal models with different ionic current environments. -\begin{figure}[tp] - \centering - \includegraphics[width=\linewidth]{Figures/diversity_in_firing.pdf} - \linespread{1.}\selectfont - \caption[]{Diversity in Neuronal Model Firing. Spike trains (left), frequency-current (fI) curves (right) for Cb stellate (A), RS inhibitory (B), FS (C), RS pyramidal (D), RS inhibitory +\Kv (E), Cb stellate +\Kv (F), FS +\Kv (G), RS pyramidal +\Kv (H), STN +\Kv (I), Cb stellate \(\Delta\)\Kv (J), STN \(\Delta\)\Kv (K), and STN (L) neuron models. Models are sorted qualitatively based on their fI curves. Black markers on the fI curves indicate the current step at which the spike train occurs. The green marker indicates the current at which firing begins in response to an ascending current ramp, whereas the red marker indicates the current at which firing ceases in response to a descending current ramp (see \Cref{fig:ramp_firing}).} - \label{fig:diversity_in_firing} -\end{figure} +%\begin{figure}[tp] +% \centering +% \includegraphics[width=\linewidth]{Figures/diversity_in_firing.pdf} +% \linespread{1.}\selectfont +% \caption[]{Diversity in Neuronal Model Firing. Spike trains (left), frequency-current (fI) curves (right) for Cb stellate (A), RS inhibitory (B), FS (C), RS pyramidal (D), RS inhibitory +\Kv (E), Cb stellate +\Kv (F), FS +\Kv (G), RS pyramidal +\Kv (H), STN +\Kv (I), Cb stellate \(\Delta\)\Kv (J), STN \(\Delta\)\Kv (K), and STN (L) neuron models. Models are sorted qualitatively based on their fI curves. Black markers on the fI curves indicate the current step at which the spike train occurs. The green marker indicates the current at which firing begins in response to an ascending current ramp, whereas the red marker indicates the current at which firing ceases in response to a descending current ramp (see \Cref{fig:ramp_firing}).} +% \label{fig:diversity_in_firing} +%\end{figure} \subsection*{Variety of model neurons} %Neuronal firing is heterogenous across the CNS and a set of neuronal models with heterogenous firing due to different ionic currents is desirable to reflect this heterogeneity. The set of single-compartment, conductance-based neuronal models used here has considerable diversity as evident in the variability seen across neuronal models both in spike trains and their fI curves (\Cref{fig:diversity_in_firing}). The models chosen for this study all fire tonically and do not exhibit bursting (see methods for details and naming of the models). Some models, such as Cb stellate and RS inhibitory models, display type I firing, whereas others such as Cb stellate \(\Delta\)\Kv and STN models exhibit type II firing. Type I firing is characterized by continuous fI curves (i.e. firing rate increases from 0 in a continuous fashion) whereas type II firing is characterized by a discontinuity in the fI curve (i.e. a jump occurs from no firing to firing at a certain frequency) \cite{ermentrout_type_1996, Rinzel_1998}. The other models used here lie on a continuum between these prototypical firing classifications. Most neuronal models exhibit hysteresis with ascending and descending ramps eliciting spikes at different current thresholds. However, the STN +\Kv, STN \(\Delta\)\Kv, and Cb stellate \(\Delta\)\Kv models have large hysteresis (\Cref{fig:diversity_in_firing}, \Cref{fig:ramp_firing}). Different types of underlying current dynamics are known to generate these different firing types and hysteresis \cite{ERMENTROUT2002, ermentrout_type_1996, Izhikevich2006}. @@ -278,14 +297,14 @@ To examine the role of cell-type specific ionic current environments on the impa Neuronal firing is heterogenous across the CNS and a set of neuronal models with heterogenous firing due to different ionic currents is desirable to reflect this heterogeneity. The set of single-compartment, conductance-based neuronal models used here has considerable diversity as evident in the variability seen across neuronal models both in spike trains and their fI curves (\Cref{fig:diversity_in_firing}). The models chosen for this study all fire tonically and do not exhibit bursting (see methods for details and naming of the models). Models are qualitatively sorted based on their firing curves and labeled model A through L accordingly. Some models, such as models A and B, display type I firing, whereas others such as models J and L exhibit type II firing. Type I firing is characterized by continuous fI curves (i.e. firing rate increases from 0 in a continuous fashion) whereas type II firing is characterized by a discontinuity in the fI curve (i.e. a jump occurs from no firing to firing at a certain frequency; \citet{ermentrout_type_1996, Rinzel_1998}). The other models used here lie on a continuum between these prototypical firing classifications. Most neuronal models exhibit hysteresis with ascending and descending ramps eliciting spikes at different current thresholds. However, the models I, J, and K have large hysteresis (\Cref{fig:diversity_in_firing,fig:ramp_firing}). Different types of underlying current dynamics are known to generate these different firing types and hysteresis \cite{ERMENTROUT2002, ermentrout_type_1996, Izhikevich2006}. \subsection*{Characterization of Neuronal Firing Properties} -\begin{figure}[tp] - \centering - \includegraphics[width=0.5\linewidth]{Figures/firing_characterization_arrows.pdf} - \linespread{1.}\selectfont - \caption[]{Characterization of firing with AUC and rheobase. (A) The area under the curve (AUC) of the repetitive firing frequency-current (fI) curve. (B) -Changes in firing as characterized by \(\Delta\)AUC and \(\Delta\)rheobase occupy four quadrants separated by no changes in AUC and rheobase. Representative schematic fI curves in red with respect to a reference (or wild type) fI curve (blue) depict the general changes associated with each quadrant.} - \label{fig:firing_characterization} -\end{figure} +%\begin{figure}[tp] +% \centering +% \includegraphics[width=0.5\linewidth]{Figures/firing_characterization_arrows.pdf} +% \linespread{1.}\selectfont +% \caption[]{Characterization of firing with AUC and rheobase. (A) The area under the curve (AUC) of the repetitive firing frequency-current (fI) curve. (B) +%Changes in firing as characterized by \(\Delta\)AUC and \(\Delta\)rheobase occupy four quadrants separated by no changes in AUC and rheobase. Representative schematic fI curves in red with respect to a reference (or wild type) fI curve (blue) depict the general changes associated with each quadrant.} +% \label{fig:firing_characterization} +%\end{figure} Neuronal firing is a complex phenomenon, and a quantification of firing properties is required for comparisons across cell types and between different conditions. Here we focus on two aspects of firing: rheobase, the smallest injected current at which the cell fires an action potential, and the shape of the frequency-current (fI) curve as quantified by the area under the curve (AUC) for a fixed range of input currents above rheobase (\Cref{fig:firing_characterization}~A). The characterization of the firing properties of a neuron by using rheobase and AUC allows to characterize both a neuron's excitability in the sub-threshold regime (rheobase) and periodic firing in the super-threshold regime (AUC) by two independent measures. Note that AUC is essentially quantifying the slope of a neuron's fI curve. @@ -305,14 +324,14 @@ Changes in gating half activation potential \(V_{1/2}\) and slope factor \(k\) a Qualitative differences could be found, for example, when increasing the maximal conductance of the delayed rectifier (\Cref{fig:AUC_correlation}~G,H,I). In some model neurons this increased AUC (\( \text{Kendall} \ \tau \approx +1\)), whereas in others AUC was decreased (\( \text{Kendall} \ \tau \approx -1\)). In model I, AUC depended in a non-linear way on the maximal conductance of the delayed rectifier, resulting in a \( \text{Kendall} \ \tau \) close to zero. Even more dramatic qualitative differences between models resulted from shifts of the activation curve of the delayed rectifier, as discussed already above (\Cref{fig:AUC_correlation}~A,B,C). Some model neurons did almost not depend on changes in K-current half activation \(V_{1/2}\) or showed strong non-linear dependencies, both resulting in \( \text{Kendall} \ \tau\) close to zero. Many model neurons showed strongly negative correlations, and a few displayed positive correlations with shifting the activation curve of the delayed rectifier. -\begin{figure}[tp] - \centering - \includegraphics[width=\linewidth]{Figures/AUC_correlation.pdf} - \linespread{1.}\selectfont -% \caption[]{Effects of altered channel kinetics on AUC in various neuron models. The fI curves corresponding to shifts in FS \(+\)\Kv model delayed rectifier K half activation \(V_{1/2}\) (A), changes \Kv activation slope factor \(k\) in the FS \(+\)\Kv model (D), and changes in maximal conductance of delayed rectifier K current in the STN \(+\)\Kv model (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \ndAUC of fI curves is plotted against delayed rectifier K half activation potential (\(\Delta V_{1/2}\); D), \Kv activation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the delayed rectifier K current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \ndAUC (C), slope factor k and \ndAUC (F) as well as maximal current conductances and \ndAUC (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \ndAUC for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively. } - \caption[]{Effects of altered channel kinetics on AUC in various neuron models. The fI curves corresponding to shifts in model G delayed rectifier K half activation \(V_{1/2}\) (A), changes \Kv activation slope factor \(k\) in model G (D), and changes in maximal conductance of delayed rectifier K current in the model I (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \ndAUC of fI curves is plotted against delayed rectifier K half activation potential (\(\Delta V_{1/2}\); D), \Kv activation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the delayed rectifier K current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \ndAUC (C), slope factor k and \ndAUC (F) as well as maximal current conductances and \ndAUC (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \ndAUC for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively. } - \label{fig:AUC_correlation} -\end{figure} +%\begin{figure}[tp] +% \centering +% \includegraphics[width=\linewidth]{Figures/AUC_correlation.pdf} +% \linespread{1.}\selectfont +%% \caption[]{Effects of altered channel kinetics on AUC in various neuron models. The fI curves corresponding to shifts in FS \(+\)\Kv model delayed rectifier K half activation \(V_{1/2}\) (A), changes \Kv activation slope factor \(k\) in the FS \(+\)\Kv model (D), and changes in maximal conductance of delayed rectifier K current in the STN \(+\)\Kv model (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \ndAUC of fI curves is plotted against delayed rectifier K half activation potential (\(\Delta V_{1/2}\); D), \Kv activation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the delayed rectifier K current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \ndAUC (C), slope factor k and \ndAUC (F) as well as maximal current conductances and \ndAUC (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \ndAUC for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively. } +% \caption[]{Effects of altered channel kinetics on AUC in various neuron models. The fI curves corresponding to shifts in model G delayed rectifier K half activation \(V_{1/2}\) (A), changes \Kv activation slope factor \(k\) in model G (D), and changes in maximal conductance of delayed rectifier K current in the model I (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \ndAUC of fI curves is plotted against delayed rectifier K half activation potential (\(\Delta V_{1/2}\); D), \Kv activation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the delayed rectifier K current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \ndAUC (C), slope factor k and \ndAUC (F) as well as maximal current conductances and \ndAUC (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \ndAUC for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively. } +% \label{fig:AUC_correlation} +%\end{figure} %Changes in gating half activation potential \(V_{1/2}\) and slope factor \(k\) as well as the maximum conductance \(g\) affected rheobase (\Cref{fig:rheobase_correlation}). However, in contrast to AUC, qualitatively consistent effects on rheobase across models could be observed. An increasing of the maximal conductance of the leak current in the Cb stellate model increased the rheobase (\Cref{fig:rheobase_correlation}~G). When these changes were plotted against the change in maximal conductance a monotonically increasing relationship was evident (thick teal line in \Cref{fig:rheobase_correlation}~H). This monotonically increasing relationship was evident in all models (\( \text{Kendall} \ \tau \approx +1\)\textsuperscript{a}), but with different slopes (thin lines in \Cref{fig:rheobase_correlation}~H). Similarly, positive correlations were consistently found across models for maximal conductances of delayed rectifier K, \Kv, and A type currents, whereas the maximal conductance of the sodium current was consistently associated with negative correlations (\( \text{Kendall} \ \tau \approx -1\)\textsuperscript{a}; \Cref{fig:rheobase_correlation}~I), i.e. rheobase decreased with increasing maximum conductance in all models. @@ -322,27 +341,26 @@ Changes in gating half activation potential \(V_{1/2}\) and slope factor \(k\) a Although changes in half maximal potential \(V_{1/2}\) and slope factor \(k\) generally correlated with rheobase similarly across model there were some exceptions. Rheobase was affected with both with positive and negative correlations in different models as a result of changing slope factor of Na-current inactivation (positive: models A--H and J; negative: models I, K and L), \Kv-current inactivation (positive: models I and K; negative: models E--G, J, H), and A-current activation (positive: models A, F and L; negative: model I; \Cref{fig:rheobase_correlation}~F). Departures from monotonic relationships also occurred in some models as a result of K-current activation \(V_{1/2}\) (e.g. model J) and slope factor \(k\) (models F and G), \Kv-current inactivation slope factor \(k\) (model K), and A-current activation slope factor \(k\) (model L). Thus, identical changes in current gating properties such as the half maximal potential \(V_{1/2}\) or slope factor \(k\) can have differing effects on firing depending on the model in which they occur. -\begin{figure}[tp] - \centering - \includegraphics[width=\linewidth]{Figures/rheobase_correlation.pdf} - \linespread{1.}\selectfont -% \caption[]{Effects of altered channel kinetics on rheobase. The fI curves corresponding to shifts in FS \(+\)\Kv model \Kv activation \(V_{1/2}\) (A), changes \Kv inactivation slope factor \(k\) in the Cb stellate \(+\)\Kv model (D), and changes in maximal conductance of the leak current in the Cb stellate model (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \drheo of fI curves is plotted against \Kv half activation potential (\(\Delta V_{1/2}\); B), \Kv inactivation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the leak current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \drheo (C), slope factor k and \drheo (F) as well as maximal current conductances and \drheo (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \drheo for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively.} - \caption[]{Effects of altered channel kinetics on rheobase. The fI curves corresponding to shifts in model G \Kv activation \(V_{1/2}\) (A), changes \Kv inactivation slope factor \(k\) in model F (D), and changes in maximal conductance of the leak current in model A (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \drheo of fI curves is plotted against \Kv half activation potential (\(\Delta V_{1/2}\); B), \Kv inactivation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the leak current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \drheo (C), slope factor k and \drheo (F) as well as maximal current conductances and \drheo (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \drheo for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively.} - \label{fig:rheobase_correlation} -\end{figure} +%\begin{figure}[tp] +% \centering +% \includegraphics[width=\linewidth]{Figures/rheobase_correlation.pdf} +% \linespread{1.}\selectfont +%% \caption[]{Effects of altered channel kinetics on rheobase. The fI curves corresponding to shifts in FS \(+\)\Kv model \Kv activation \(V_{1/2}\) (A), changes \Kv inactivation slope factor \(k\) in the Cb stellate \(+\)\Kv model (D), and changes in maximal conductance of the leak current in the Cb stellate model (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \drheo of fI curves is plotted against \Kv half activation potential (\(\Delta V_{1/2}\); B), \Kv inactivation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the leak current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \drheo (C), slope factor k and \drheo (F) as well as maximal current conductances and \drheo (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \drheo for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively.} +% \caption[]{Effects of altered channel kinetics on rheobase. The fI curves corresponding to shifts in model G \Kv activation \(V_{1/2}\) (A), changes \Kv inactivation slope factor \(k\) in model F (D), and changes in maximal conductance of the leak current in model A (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \drheo of fI curves is plotted against \Kv half activation potential (\(\Delta V_{1/2}\); B), \Kv inactivation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the leak current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \drheo (C), slope factor k and \drheo (F) as well as maximal current conductances and \drheo (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \drheo for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively.} +% \label{fig:rheobase_correlation} +%\end{figure} \subsection*{\textit{KCNA1} Mutations} Mutations in \textit{KCNA1} are associated with episodic ataxia type~1 (EA1) and have been characterized biophysically (as reviewed by \citet{lauxmann_therapeutic_2021}). Here they were used as a test case in the effects of various ionic current environments on neuronal firing and on the outcomes of channelopathies. The changes in AUC and rheobase from wild type values for reported EA1 associated \textit{KCNA1} mutations were heterogeneous across models containing \Kv, but generally showed decreases in rheobase (\Cref{fig:simulation_model_comparision}A--I). Pairwise non-parametric Kendall \(\tau\) rank correlations between the simulated effects of these \Kv mutations on rheobase were highly correlated across models (\Cref{fig:simulation_model_comparision}J) indicating that EA1 associated \textit{KCNA1} mutations generally decrease rheobase across diverse cell-types. However, the effects of the \Kv mutations on AUC were more heterogenous as reflected by both weak and strong positive and negative pairwise correlations between models (\Cref{fig:simulation_model_comparision}K), suggesting that the effects of ion-channel variant on super-threshold neuronal firing depend both quantitatively and qualitatively on the specific composition of ionic currents in a given neuron. -%use alphabetic order in both %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{figure}[tp] - \centering - \includegraphics[width=\linewidth]{Figures/simulation_model_comparison.pdf} - \linespread{1.}\selectfont -% \caption[]{Effects of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing. Effects of \textit{KCNA1} mutations on AUC (percent change in normalized \(\Delta\)AUC) and rheobase (\(\Delta\)Rheobase) compared to wild type for RS pyramidal +\Kv (A), RS inhibitory +\Kv (B), FS +\Kv (C), Cb stellate (D), Cb stellate +\Kv (E), Cb stellate \(\Delta\)\Kv (F), STN (G), STN +\Kv (H) and STN \(\Delta\)\Kv (I) models. All \textit{KCNA1} Mutations are marked in grey with the V174F, F414C, E283K, and V404I \textit{KCNA1} mutations highlighted in color for each model. Pairwise Kendall rank correlation coefficients (Kendall \(\tau\)) between the effects of \textit{KCNA1} mutations on rheobase and on AUC are shown in J and K respectively. Marker shape is indicative of model/firing type, and grey dashed lines denote the quadrants of firing characterization (see \Cref{fig:firing_characterization}).} - \caption[]{Effects of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing. Effects of \textit{KCNA1} mutations on AUC (percent change in normalized \(\Delta\)AUC) and rheobase (\(\Delta\)Rheobase) compared to wild type for model H (A), model E (B), model G (C), model A (D), model F (E), model J (F), model L (G), model I (H) and model K (I). All \textit{KCNA1} Mutations are marked in grey with the V174F, F414C, E283K, and V404I \textit{KCNA1} mutations highlighted in color for each model. Pairwise Kendall rank correlation coefficients (Kendall \(\tau\)) between the effects of \textit{KCNA1} mutations on rheobase and on AUC are shown in J and K respectively. Marker shape is indicative of model/firing type, and grey dashed lines denote the quadrants of firing characterization (see \Cref{fig:firing_characterization}).} - \label{fig:simulation_model_comparision} -\end{figure} +%\begin{figure}[tp] +% \centering +% \includegraphics[width=\linewidth]{Figures/simulation_model_comparison.pdf} +% \linespread{1.}\selectfont +%% \caption[]{Effects of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing. Effects of \textit{KCNA1} mutations on AUC (percent change in normalized \(\Delta\)AUC) and rheobase (\(\Delta\)Rheobase) compared to wild type for RS pyramidal +\Kv (A), RS inhibitory +\Kv (B), FS +\Kv (C), Cb stellate (D), Cb stellate +\Kv (E), Cb stellate \(\Delta\)\Kv (F), STN (G), STN +\Kv (H) and STN \(\Delta\)\Kv (I) models. All \textit{KCNA1} Mutations are marked in grey with the V174F, F414C, E283K, and V404I \textit{KCNA1} mutations highlighted in color for each model. Pairwise Kendall rank correlation coefficients (Kendall \(\tau\)) between the effects of \textit{KCNA1} mutations on rheobase and on AUC are shown in J and K respectively. Marker shape is indicative of model/firing type, and grey dashed lines denote the quadrants of firing characterization (see \Cref{fig:firing_characterization}).} +% \caption[]{Effects of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing. Effects of \textit{KCNA1} mutations on AUC (percent change in normalized \(\Delta\)AUC) and rheobase (\(\Delta\)Rheobase) compared to wild type for model H (A), model E (B), model G (C), model A (D), model F (E), model J (F), model L (G), model I (H) and model K (I). All \textit{KCNA1} Mutations are marked in grey with the V174F, F414C, E283K, and V404I \textit{KCNA1} mutations highlighted in color for each model. Pairwise Kendall rank correlation coefficients (Kendall \(\tau\)) between the effects of \textit{KCNA1} mutations on rheobase and on AUC are shown in J and K respectively. Marker shape is indicative of model/firing type, and grey dashed lines denote the quadrants of firing characterization (see \Cref{fig:firing_characterization}).} +% \label{fig:simulation_model_comparision} +%\end{figure} \section*{Discussion (3000 Words Maximum - Currently 2353)} @@ -430,8 +448,7 @@ With this study we suggest that cell-type specific effects are vital to a full u \bibliographystyle{eneuro} %dcu -%\newpage - +\newpage \section*{Figures} % \textit{Figures must be numbered independently of tables and multimedia and cited in the manuscript. Do not duplicate data by presenting it both in the text and in a figure. % A title should be part of the legend and not lettered onto the figure. A legend must be included in the manuscript document after the reference list, and should include enough detail to be intelligible without reference to the text. Specific individuals’ contributions to data acquisition, analysis, or other responsibility resulting in a figure may be included at the end of each legend. Please use the heading “Figure Contributions” and state each contribution with the author’s full name. @@ -442,15 +459,51 @@ With this study we suggest that cell-type specific effects are vital to a full u % Remove top and right borderlines that to not contain measuring metrics from all graph/histogram figure panels (i.e., do not box the panels in). Do not include any two-bar graphs/histograms; instead state those values in the text. % All illustrations documenting results must include a bar to indicate the scale. All labels used in a figure should be explained in the legend. The migration of protein molecular weight size markers or nucleic acid size markers must be indicated and labeled appropriately (e.g., “kD”, “nt”, “bp”) on all figure panels showing gel electrophoresis.} -%\setcounter{figure}{0} -% -%\begin{figure}[tp] -% \centering -% \includegraphics[width=\linewidth]{Figures/diversity_in_firing.pdf} -% \linespread{1.}\selectfont -% \caption[]{Diversity in Neuronal Model Firing. Spike trains (left), frequency-current (fI) curves (right) for Cb stellate (A), RS inhibitory (B), FS (C), RS pyramidal (D), RS inhibitory +\Kv (E), Cb stellate +\Kv (F), FS +\Kv (G), RS pyramidal +\Kv (H), STN +\Kv (I), Cb stellate \(\Delta\)\Kv (J), STN \(\Delta\)\Kv (K), and STN (L) neuron models. Black marker on the fI curves indicate the current step at which the spike train occurs. The green marker indicates the current at which firing begins in response to an ascending current ramp, whereas the red marker indicates the current at which firing ceases in response to a descending current ramp (see \Cref{fig:ramp_firing}).} -% \label{fig:diversity_in_firing} -%\end{figure} +\setcounter{figure}{0} + +\begin{figure}[tp] + \centering + \includegraphics[width=\linewidth]{Figures/diversity_in_firing.pdf} + \linespread{1.}\selectfont + \caption[]{Diversity in Neuronal Model Firing. Spike trains (left), frequency-current (fI) curves (right) for Cb stellate (A), RS inhibitory (B), FS (C), RS pyramidal (D), RS inhibitory +\Kv (E), Cb stellate +\Kv (F), FS +\Kv (G), RS pyramidal +\Kv (H), STN +\Kv (I), Cb stellate \(\Delta\)\Kv (J), STN \(\Delta\)\Kv (K), and STN (L) neuron models. Models are sorted qualitatively based on their fI curves. Black markers on the fI curves indicate the current step at which the spike train occurs. The green marker indicates the current at which firing begins in response to an ascending current ramp, whereas the red marker indicates the current at which firing ceases in response to a descending current ramp (see \Cref{fig:ramp_firing}).} + \label{fig:diversity_in_firing} +\end{figure} + + + +\begin{figure}[tp] + \centering + \includegraphics[width=0.5\linewidth]{Figures/firing_characterization_arrows.pdf} + \linespread{1.}\selectfont + \caption[]{Characterization of firing with AUC and rheobase. (A) The area under the curve (AUC) of the repetitive firing frequency-current (fI) curve. (B) +Changes in firing as characterized by \(\Delta\)AUC and \(\Delta\)rheobase occupy four quadrants separated by no changes in AUC and rheobase. Representative schematic fI curves in red with respect to a reference (or wild type) fI curve (blue) depict the general changes associated with each quadrant.} + \label{fig:firing_characterization} +\end{figure} + +\begin{figure}[tp] + \centering + \includegraphics[width=\linewidth]{Figures/AUC_correlation.pdf} + \linespread{1.}\selectfont + \caption[]{Effects of altered channel kinetics on AUC in various neuron models. The fI curves corresponding to shifts in model G delayed rectifier K half activation \(V_{1/2}\) (A), changes \Kv activation slope factor \(k\) in model G (D), and changes in maximal conductance of delayed rectifier K current in the model I (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \ndAUC of fI curves is plotted against delayed rectifier K half activation potential (\(\Delta V_{1/2}\); D), \Kv activation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the delayed rectifier K current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \ndAUC (C), slope factor k and \ndAUC (F) as well as maximal current conductances and \ndAUC (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \ndAUC for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively. } + \label{fig:AUC_correlation} +\end{figure} + +\begin{figure}[tp] + \centering + \includegraphics[width=\linewidth]{Figures/rheobase_correlation.pdf} + \linespread{1.}\selectfont + \caption[]{Effects of altered channel kinetics on rheobase. The fI curves corresponding to shifts in model G \Kv activation \(V_{1/2}\) (A), changes \Kv inactivation slope factor \(k\) in model F (D), and changes in maximal conductance of the leak current in model A (G) are shown. The fI curves from the smallest (grey) to the largest (black) alterations are seen for (A,D, and G) in accordance to the greyscale of the x-axis in B, E, and H. The \drheo of fI curves is plotted against \Kv half activation potential (\(\Delta V_{1/2}\); B), \Kv inactivation slope factor \(k\) (k/\(\textrm{k}_{WT}\); E) and maximal conductance \(g\) of the leak current (g/\(\textrm{g}_{WT}\); H) for all models (thin lines) with relationships from the fI curve examples (A, D, G respectively) highlighted by thick lines with colors corresponding to the box highlighting each set of fI curves. The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in half maximal potential \(V_{1/2}\) and \drheo (C), slope factor k and \drheo (F) as well as maximal current conductances and \drheo (I) for each model and current property is computed. The relationships between \(\Delta V_{1/2}\), k/\(\textrm{k}_{WT}\), and g/\(\textrm{g}_{WT}\) and \drheo for the Kendall rank correlations highlighted in the black boxes are depicted in (B), (E) and (H) respectively.} + \label{fig:rheobase_correlation} +\end{figure} + +\begin{figure}[tp] + \centering + \includegraphics[width=\linewidth]{Figures/simulation_model_comparison.pdf} + \linespread{1.}\selectfont + \caption[]{Effects of episodic ataxia type~1 associated \textit{KCNA1} mutations on firing. Effects of \textit{KCNA1} mutations on AUC (percent change in normalized \(\Delta\)AUC) and rheobase (\(\Delta\)Rheobase) compared to wild type for model H (A), model E (B), model G (C), model A (D), model F (E), model J (F), model L (G), model I (H) and model K (I). All \textit{KCNA1} Mutations are marked in grey with the V174F, F414C, E283K, and V404I \textit{KCNA1} mutations highlighted in color for each model. Pairwise Kendall rank correlation coefficients (Kendall \(\tau\)) between the effects of \textit{KCNA1} mutations on rheobase and on AUC are shown in J and K respectively. Marker shape is indicative of model/firing type, and grey dashed lines denote the quadrants of firing characterization (see \Cref{fig:firing_characterization}).} + \label{fig:simulation_model_comparision} +\end{figure} + % % %\begin{figure}[tp]