Updated Figures 3 and 4, added comments, and changed small things throughout

This commit is contained in:
nkoch1 2022-05-05 22:14:37 -04:00
parent 62e2a28ac2
commit fc64168046
6 changed files with 10 additions and 533 deletions

Binary file not shown.

View File

@ -389,7 +389,7 @@ color_dict = {'Cb stellate': '#40A787', # cyan'#
# plot setup # plot setup
marker_s_leg = 2 marker_s_leg = 2
max_width = 10 max_width = 20
pad_x = 0.65 pad_x = 0.65
pad_y= 0.4 pad_y= 0.4
pad_w = 0.85 pad_w = 0.85
@ -523,528 +523,3 @@ plt.show()
# fig.savefig('AUC_correlation_2.pdf', bbox_inches='tight') # # fig.savefig('AUC_correlation_2.pdf', bbox_inches='tight') #
# # plt.saveas(fig, 'AUC_correlation_2.png') # # plt.saveas(fig, 'AUC_correlation_2.png')
# plt.show() # plt.show()
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 3 19:52:04 2021
@author: nils
"""
import pandas as pd
import numpy as np
import string
import textwrap
import json
import matplotlib
import matplotlib.lines as mlines
from matplotlib import ticker
from matplotlib.ticker import NullFormatter
from plotstyle import boxplot_style
def cm2inch(*tupl):
inch = 2.54
if isinstance(tupl[0], tuple):
return tuple(i/inch for i in tupl[0])
else:
return tuple(i/inch for i in tupl)
#%% ##################### From https://stackoverflow.com/questions/52878845/swarmplot-with-hue-affecting-marker-beyond-color ##
# to change marker types in seaborn swarmplot
import seaborn as sns
import matplotlib.pyplot as plt
############## Begin hack ##############
from matplotlib.axes._axes import Axes
from matplotlib.markers import MarkerStyle
from numpy import ndarray
def GetColor2Marker(markers):
colorslist = ['#40A787', # cyan'#
'#F0D730', # yellow
'#C02717', # red
'#007030', # dark green
'#AAB71B', # lightgreen
'#008797', # light blue
'#F78017', # orange
'#478010', # green
'#53379B', # purple
'#2060A7', # blue
'#873770', # magenta
'#D03050' # pink
]
import matplotlib.colors
palette = [matplotlib.colors.to_rgb(c) for c in colorslist]
mkcolors = [(palette[i]) for i in range(len(markers))]
return dict(zip(mkcolors,markers))
def fixlegend(ax,markers,markersize=3,**kwargs):
# Fix Legend
legtitle = ax.get_legend().get_title().get_text()
_,l = ax.get_legend_handles_labels()
colorslist = ['#40A787', # cyan'#
'#F0D730', # yellow
'#C02717', # red
'#007030', # dark green
'#AAB71B', # lightgreen
'#008797', # light blue
'#F78017', # orange
'#478010', # green
'#53379B', # purple
'#2060A7', # blue
'#873770', # magenta
'#D03050' # pink
]
import matplotlib.colors
palette = [matplotlib.colors.to_rgb(c) for c in colorslist]
mkcolors = [(palette[i]) for i in range(len(markers))]
newHandles = [plt.Line2D([0],[0], ls="none", marker=m, color=c, mec="none", markersize=markersize,**kwargs) \
for m,c in zip(markers, mkcolors)]
ax.legend(newHandles,l)
leg = ax.get_legend()
leg.set_title(legtitle)
old_scatter = Axes.scatter
def new_scatter(self, *args, **kwargs):
colors = kwargs.get("c", None)
co2mk = kwargs.pop("co2mk",None)
FinalCollection = old_scatter(self, *args, **kwargs)
if co2mk is not None and isinstance(colors, ndarray):
Color2Marker = GetColor2Marker(co2mk)
paths=[]
for col in colors:
mk=Color2Marker[tuple(col)]
marker_obj = MarkerStyle(mk)
paths.append(marker_obj.get_path().transformed(marker_obj.get_transform()))
FinalCollection.set_paths(paths)
return FinalCollection
Axes.scatter = new_scatter
############## End hack. ##############
########################################################################################################################
#%%
def boxplot_with_markers(ax,max_width, alteration='shift', msize=3):
# size =4
# ax.tick_params(axis='x', rotation=90)
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$']
colorslist = ['#007030', # dark green
'#F0D730', # yellow
'#C02717', # red
'#478010', # green
'#AAB71B', # lightgreen
'#F78017', # orange
'#40A787', # cyan'#
'#008797', # light blue
'#2060A7', # blue
'#D03050', # pink
'#53379B', # purple
'#873770', # magenta
]
# colorslist = ['#40A787', # cyan'#
# '#F0D730', # yellow
# 'C02717', # red
# '#007030', # dark green
# '#AAB71B', # lightgreen
# '#008797', # light blue
# '#F78017', # orange
# '#478010', # green
# '#53379B', # purple
# '#2060A7', # blue
# '#873770', # magenta
# '#D03050' # pink
# ]
hlinewidth =0.5
import matplotlib.colors
colors = [matplotlib.colors.to_rgb(c) for c in colorslist] # sns.color_palette("hls", 14, desat=0.75)#[cm.tab20(i) for i in range(20)]
clr_dict = {}
for m in range(len(model_names)):
clr_dict[model_names[m]] = colors[m]
Markers = ["o", "o", "o", "^", "^", "^", "D", "D", "D", "s", "s", "s"]
if alteration=='shift':
i = 2 # Kd act
ax.axvspan(i - 0.4, i + 0.4, fill=False, edgecolor = 'k')
df = pd.read_csv('./Figures/Data/AUC_shift_corr.csv')
sns.swarmplot(y="corr", x="$\Delta V_{1/2}$", hue="model", data=df,
palette=clr_dict, linewidth=0, orient='v', ax=ax, size=msize,
order=['Na activation', 'Na inactivation', 'K activation', '$K_V1.1$ activation',
'$K_V1.1$ inactivation', 'A activation', 'A inactivation'],
hue_order=model_names, co2mk=Markers)
lim = ax.get_xlim()
ax.plot([lim[0], lim[1]], [0, 0], ':r',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [1, 1], ':k',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [-1, -1], ':k',linewidth=hlinewidth)
# ax.get_legend().remove()
# sns.despine(trim=True, bottom=True, ax=ax)
# ax.set(xlabel=None, ylabel=r'Kendall $\it{\tau}$')
ax.set_title("Shift ($\Delta V_{1/2}$)", y=1.05)
elif alteration=='slope':
i = 3 # Kv1.1 act
ax.axvspan(i - 0.4, i + 0.4, fill=False, edgecolor='k')
df = pd.read_csv('./Figures/Data/AUC_scale_corr.csv')
# Add in points to show each observation
sns.swarmplot(y="corr", x="Slope (k)", hue="model", data=df, #dodge=True,
palette=clr_dict, linewidth=0, orient='v', ax=ax, size=msize,
order=['Na activation', 'Na inactivation', 'K activation', '$K_V1.1$ activation',
'$K_V1.1$ inactivation', 'A activation', 'A inactivation'],
hue_order=model_names, co2mk=Markers)
lim = ax.get_xlim()
# ax.plot([lim[0], lim[1]], [0,0], ':k')
ax.plot([lim[0], lim[1]], [0, 0], ':r',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [1, 1], ':k',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [-1, -1], ':k',linewidth=hlinewidth)
# Markers = ["o","s","v","^","<",">","p","h","P","X","D","*","8","o"]
# ax=fixlegend(ax, Markers)
# Tweak the visual presentation
# ax.get_legend().remove()
# ax.xaxis.grid(False)
# ax.set_xticklabels(textwrap.fill(x.get_text(), max_width) for x in ax.get_xticklabels())
# ax.set(xlabel=None, ylabel=r'Kendall $\it{\tau}$')
ax.set_title("Slope (k)", y=1.05)
# sns.despine(trim=True, bottom=True, ax=ax)
elif alteration=='g':
i = 1 # Kd
ax.axvspan(i - 0.4, i + 0.4, fill=False, edgecolor='k')
df = pd.read_csv('./Figures/Data/AUC_g_corr.csv')
# Add in points to show each observation
sns.swarmplot(y="corr", x="g", hue="model", data=df, #dodge=True,
palette=clr_dict, linewidth=0, orient='v', ax=ax, size=msize,
order=['Na', 'K', '$K_V1.1$', 'A', 'Leak'],
hue_order=model_names, co2mk=Markers)
lim = ax.get_xlim()
# ax.plot([lim[0], lim[1]], [0,0], ':k')
ax.plot([lim[0], lim[1]], [0, 0], ':r',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [1, 1], ':k',linewidth=hlinewidth)
ax.plot([lim[0], lim[1]], [-1, -1], ':k',linewidth=hlinewidth)
# Tweak the visual presentation
# ax.xaxis.grid(False)
# sns.despine(trim=True, bottom=True, ax=ax)
# ax.set(xlabel=None, ylabel=r'Kendall $\it{\tau}$')
ax.set_title("Conductance (g)", y=1.05)
# ax.set_xticklabels(textwrap.fill(x.get_text(), max_width) for x in ax.get_xticklabels())
else:
print('Please chose "shift", "slope" or "g"')
ax.get_legend().remove()
ax.xaxis.grid(False)
sns.despine(trim=True, bottom=True, ax=ax)
ax.set(xlabel=None, ylabel=r'Kendall $\it{\tau}$')
ax.set_xticklabels(textwrap.fill(x.get_text(), max_width) for x in ax.get_xticklabels())
# fixlegend(ax, Markers)
def model_legend(ax, marker_s_leg, pos, ncol):
colorslist = [ '#40A787', # cyan'#
'#F0D730', # yellow
'#C02717', # red
'#007030', # dark green
'#AAB71B', # lightgreen
'#008797', # light blue
'#F78017', # orange
'#478010', # green
'#53379B', # purple
'#2060A7', # blue
'#873770', # magenta
'#D03050' # pink
]
import matplotlib.colors
colors = [matplotlib.colors.to_rgb(c) for c in colorslist] #sns.color_palette("hls", 14, desat=0.75) #[cm.tab20(i) for i in range(20)]
model_pos = {'Cb stellate':0, 'RS Inhibitory':1, 'FS':2, 'RS Pyramidal':3,
'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':4,
'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':5, 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':6,
'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':7, 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':8,
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':9,
'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$':10, 'STN':11}
Markers = ["o", "o", "o", "^", "^", "^", "D", "D", "D", "s", "s", "s"]
RS_p = mlines.Line2D([], [], color=colors[model_pos['RS Pyramidal']], marker=Markers[model_pos['RS Pyramidal']], markersize=marker_s_leg, linestyle='None',
label='RS pyramidal')
RS_i = mlines.Line2D([], [], color=colors[model_pos['RS Inhibitory']], marker=Markers[model_pos['RS Inhibitory']], markersize=marker_s_leg, linestyle='None',
label='RS inhibitory')
FS = mlines.Line2D([], [], color=colors[model_pos['FS']], marker=Markers[model_pos['FS']], markersize=marker_s_leg, linestyle='None', label='FS')
RS_p_Kv = mlines.Line2D([], [], color=colors[model_pos['RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
RS_i_Kv = mlines.Line2D([], [], color=colors[model_pos['RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
FS_Kv = mlines.Line2D([], [], color=colors[model_pos['Cb stellate']], marker=Markers[model_pos['Cb stellate']], markersize=marker_s_leg, linestyle='None', label='FS +$K_V1.1$')
Cb = mlines.Line2D([], [], color=colors[8], marker=Markers[8], markersize=marker_s_leg, linestyle='None',
label='Cb stellate')
Cb_pl = mlines.Line2D([], [], color=colors[model_pos['Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
Cb_sw = mlines.Line2D([], [], color=colors[model_pos['Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
STN = mlines.Line2D([], [], color=colors[model_pos['STN']], marker=Markers[model_pos['STN']], markersize=marker_s_leg, linestyle='None', label='STN')
STN_pl = mlines.Line2D([], [], color=colors[model_pos['STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
STN_sw = mlines.Line2D([], [], color=colors[model_pos['STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], marker=Markers[model_pos['STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']], markersize=marker_s_leg, linestyle='None',
label='STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$')
ax.legend(handles=[RS_p, RS_i, FS, RS_p_Kv, RS_i_Kv, FS_Kv, Cb, Cb_pl, Cb_sw, STN, STN_pl, STN_sw], loc='center',
bbox_to_anchor=pos, ncol=ncol, frameon=False)
def plot_AUC_alt(ax, model='FS', color1='red', color2='dodgerblue', alteration='shift'):
ax.spines["right"].set_visible(False)
ax.spines["top"].set_visible(False)
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$']
model_name_dict = {'RS Pyramidal': 'RS Pyramidal',
'RS Inhibitory': 'RS Inhibitory',
'FS': 'FS',
'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'RS Pyramidal +$K_V1.1$',
'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'RS Inhibitory +$K_V1.1$',
'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'FS +$K_V1.1$',
'Cb stellate': 'Cb stellate',
'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'Cb stellate +$K_V1.1$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'Cb stellate $\Delta$$K_V1.1$',
'STN': 'STN',
'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'STN +$K_V1.1$',
'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': 'STN $\Delta$$K_V1.1$'}
colorslist = ['#007030', # dark green
'#F0D730', # yellow
'#C02717', # red
'#478010', # green
'#AAB71B', # lightgreen
'#F78017', # orange
'#40A787', # cyan'#
'#008797', # light blue
'#2060A7', # blue
'#D03050', # pink
'#53379B', # purple
'#873770', # magenta
]
import matplotlib.colors
colors = [matplotlib.colors.to_rgb(c) for c in
colorslist] #sns.color_palette("hls", 14, desat=0.75)#[cm.tab20(i) for i in range(20)]
clr_dict = {}
for m in range(len(model_names)):
clr_dict[model_names[m]] = colors[m]
if alteration=='shift':
df = pd.read_csv('./Figures/Data/AUC_shift_ex.csv')
df = df.sort_values('alteration')
ax.set_xlabel('$\Delta$$V_{1/2}$')
elif alteration=='slope':
df = pd.read_csv('./Figures/Data/AUC_slope_ex.csv')
ax.set_xscale("log")
ax.set_xticks([0.5, 1, 2])
ax.xaxis.set_major_formatter(ticker.ScalarFormatter())
ax.xaxis.set_minor_formatter(NullFormatter())
ax.set_xlabel('Slope factor k')
elif alteration=='g':
df = pd.read_csv('./Figures/Data/AUC_g_ex.csv')
ax.set_xscale("log")
ax.set_xticks([0.5, 1, 2])
ax.xaxis.set_major_formatter(ticker.ScalarFormatter())
ax.xaxis.set_minor_formatter(NullFormatter())
ax.set_xlabel('g')
for mod in model_names:
if mod == model_name_dict[model]:
ax.plot(df['alteration'], df[mod], color=clr_dict[mod], alpha=1, zorder=10, linewidth=2)
else:
ax.plot(df['alteration'], df[mod], color=clr_dict[mod],alpha=1, zorder=1, linewidth=1)
ax.set_ylabel('Normalized AUC')
x = df['alteration']
y = df[model_name_dict[model]]
ax.set_xlim(x.min(), x.max())
ax.set_ylim(df[model_names].min().min(), df[model_names].max().max())
return ax
def plot_fI(ax, model='RS Pyramidal', type='shift', alt='m', color1='red', color2='dodgerblue'):
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'}
cvals = [-2., 2]
colors = [color1, color2]
norm = plt.Normalize(min(cvals), max(cvals))
tuples = list(zip(map(norm, cvals), colors))
cmap = matplotlib.colors.LinearSegmentedColormap.from_list("", tuples)
colors = cmap(np.linspace(0, 1, 22))
df = pd.read_csv('./Figures/Data/Model_fI/{}_fI.csv'.format(model_save_name[model]))
df.drop(['Unnamed: 0'], axis=1)
newdf = df.loc[df.index[(df['alt'] == alt) & (df['type'] == type)], :]
newdf['mag'] = newdf['mag'].astype('float')
newdf = newdf.sort_values('mag').reset_index()
c = 0
for i in newdf.index:
ax.plot(json.loads(newdf.loc[i, 'I']), json.loads(newdf.loc[i, 'F']), color=colors[c])
c += 1
ax.set_ylabel('Frequency [Hz]')
ax.set_xlabel('Current [nA]')
ax.set_title(model)
ax.spines["right"].set_visible(False)
ax.spines["top"].set_visible(False)
L = ax.get_ylim()
ax.set_ylim([0, L[1]])
return ax
#%%
boxplot_style()
color_dict = {'Cb stellate': '#40A787', # cyan'#
'RS Inhibitory': '#F0D730', # yellow
'FS': '#C02717', # red
'RS Pyramidal': '#007030', # dark green
'RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#AAB71B', # lightgreen
'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#008797', # light blue
'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#F78017', # orange
'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#478010', # green
'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#53379B', # purple
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#2060A7', # blue
'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$': '#873770', # magenta
'STN': '#D03050' # pink
}
# plot setup
marker_s_leg = 2
max_width = 10
pad_x = 0.65
pad_y= 0.4
pad_w = 0.85
pad_h = 0.7
fig = plt.figure()
# fig = plt.figure()
# fig.set_size_inches(cm2inch(17.6,10))
gs = fig.add_gridspec(3, 6, wspace=1., hspace=0.8)
# plt.subplots_adjust(hspace=0.8) #, wspace=0.6
ax0 = fig.add_subplot(gs[0,2:6])
ax0_ex = fig.add_subplot(gs[0,1])
ax0_fI = fig.add_subplot(gs[0,0])
ax1 = fig.add_subplot(gs[1,2:6])
ax1_ex = fig.add_subplot(gs[1,1])
ax1_fI = fig.add_subplot(gs[1,0])
ax2 = fig.add_subplot(gs[2,2:6])
ax2_ex = fig.add_subplot(gs[2,1])
ax2_fI = fig.add_subplot(gs[2,0])
line_width = 1
# plot fI examples
ax0_fI = plot_fI(ax0_fI, model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='shift', alt='s', color1='lightgrey', color2='k')
rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=line_width,transform=ax0_fI.transAxes, color=color_dict['FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
rec = ax0_fI.add_patch(rec)
rec.set_clip_on(False)
ax1_fI = plot_fI(ax1_fI, model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='slope', alt='u', color1='lightgrey', color2='k')
rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=line_width,transform=ax1_fI.transAxes, color=color_dict['FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
rec = ax1_fI.add_patch(rec)
rec.set_clip_on(False)
ax2_fI = plot_fI(ax2_fI, model='STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='g', alt='Leak', color1='lightgrey', color2='k')
rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=line_width,transform=ax2_fI.transAxes, color=color_dict['STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
rec = ax2_fI.add_patch(rec)
rec.set_clip_on(False)
# label subplots with letters
ax0_fI.text(-0.95, 1.12, string.ascii_uppercase[0], transform=ax0_fI.transAxes, size=10, weight='bold') #-0.09
ax1_fI.text(-0.95, 1.12, string.ascii_uppercase[1], transform=ax1_fI.transAxes,size=10, weight='bold')
ax2_fI.text(-0.95, 1.12, string.ascii_uppercase[2], transform=ax2_fI.transAxes,size=10, weight='bold')
# plot boxplots
boxplot_with_markers(ax0,max_width, alteration='shift')
boxplot_with_markers(ax1,max_width, alteration='slope')
boxplot_with_markers(ax2,max_width, alteration='g')
# plot legend
pos = (0.25, -0.6)
ncol = 6
model_legend(ax2, marker_s_leg, pos, ncol)
# plot examples
plot_AUC_alt(ax0_ex,model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k', alteration='shift')
plot_AUC_alt(ax1_ex,model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k',alteration='slope')
plot_AUC_alt(ax2_ex, model='STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k', alteration='g')
#save
# plt.tight_layout(pad=0)
print(fig.dpi)
fig.set_size_inches(cm2inch(20.3,10))
fig.savefig('./Figures/AUC_correlation.pdf', dpi=fig.dpi) #bbox_inches='tight', dpi=fig.dpi
plt.show()
# #%% alternative layout
# # boxplot_style()
# marker_s_leg = 8
# max_width = 10
# pad_x = 0.2
# pad_y= 0.4
# pad_w = 0.22
# pad_h = 0.6
#
# fig = plt.figure(figsize=(12,20))
# gs = fig.add_gridspec(3, 1, hspace=0.4, wspace=0.4)
# gs0 = gs[0].subgridspec(2, 4, wspace=0.6, hspace=1.)
# gs1 = gs[1].subgridspec(2, 4, wspace=0.6, hspace=1.)
# gs2 = gs[2].subgridspec(2, 4, wspace=0.6, hspace=1.)
# ax0 = fig.add_subplot(gs0[1,:])
# ax0_ex = fig.add_subplot(gs0[0,2:])
# ax0_fI = fig.add_subplot(gs0[0,:2])
# ax1 = fig.add_subplot(gs1[1,:])
# ax1_ex = fig.add_subplot(gs1[0,2:])
# ax1_fI = fig.add_subplot(gs1[0,:2])
# ax2 = fig.add_subplot(gs2[1,:])
# ax2_ex = fig.add_subplot(gs2[0,2:])
# ax2_fI = fig.add_subplot(gs2[0,:2])
#
#
# ax0_fI = plot_fI(ax0_fI, model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='shift', alt='s', color1='lightgrey', color2='k')
# rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=2,transform=ax0_fI.transAxes, color=color_dict['FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
# rec = ax0_fI.add_patch(rec)
# rec.set_clip_on(False)
#
# ax1_fI = plot_fI(ax1_fI, model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='slope', alt='u', color1='lightgrey', color2='k')
# rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=2,transform=ax1_fI.transAxes, color=color_dict['FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
# rec = ax1_fI.add_patch(rec)
# rec.set_clip_on(False)
#
# ax2_fI = plot_fI(ax2_fI, model='STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', type='g', alt='Leak', color1='lightgrey', color2='k')
# rec = plt.Rectangle((-pad_x, -pad_y), 1 + pad_w, 1 + pad_h, fill=False, lw=2,transform=ax2_fI.transAxes, color=color_dict['STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$'], alpha=1, zorder=-1)
# rec = ax2_fI.add_patch(rec)
# rec.set_clip_on(False)
#
# # label subplots with letters
# ax0_fI.text(-0.2, 1.38, string.ascii_uppercase[0], transform=ax0_fI.transAxes, size=16, weight='bold') #-0.09
# ax1_fI.text(-0.2, 1.38, string.ascii_uppercase[1], transform=ax1_fI.transAxes,size=16, weight='bold')
# ax2_fI.text(-0.2, 1.38, string.ascii_uppercase[2], transform=ax2_fI.transAxes,size=16, weight='bold')
#
# # plot boxplots
# boxplot_with_markers(ax0,max_width, alteration='shift')
# boxplot_with_markers(ax1,max_width, alteration='slope')
# boxplot_with_markers(ax2,max_width, alteration='g')
# # plot legend
# pos = (0.5, -1.)
# ncol = 6
# model_legend(ax2, marker_s_leg, pos, ncol)
#
# # # plot rheo across model for example alteration
# # plot_rheo_alt(ax0_ex,model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='red', color2='maroon', alteration='shift')
# # plot_rheo_alt(ax1_ex,model='Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='orchid', color2='purple',alteration='slope')
# # plot_rheo_alt(ax2_ex, model='Cb stellate', color1='darkviolet', color2='indigo', alteration='g')
# # plot_rheo_alt(ax0_ex,model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k', alteration='shift')
# # plot_rheo_alt(ax1_ex,model='Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k',alteration='slope')
# # plot_rheo_alt(ax2_ex, model='Cb stellate', color1='lightgrey', color2='k', alteration='g')
#
# # plot examples
# plot_AUC_alt(ax0_ex,model='FS', color1='lightgrey', color2='k', alteration='shift')
# plot_AUC_alt(ax1_ex,model='FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k',alteration='slope')
# plot_AUC_alt(ax2_ex, model='STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', color1='lightgrey', color2='k', alteration='g')
# fig.savefig('AUC_correlation_2.pdf', bbox_inches='tight') #
# # plt.saveas(fig, 'AUC_correlation_2.png')
# plt.show()

Binary file not shown.

View File

@ -361,7 +361,7 @@ color_dict = {'Cb stellate': '#40A787', # cyan'#
# plot setup # plot setup
marker_s_leg = 2 marker_s_leg = 2
max_width = 10 max_width = 20
pad_x = 0.65 pad_x = 0.65
pad_y= 0.4 pad_y= 0.4
pad_w = 0.85 pad_w = 0.85

View File

@ -6,7 +6,7 @@ TEXFILE=$(TEXBASE).tex
PDFFILE=$(TEXBASE).pdf PDFFILE=$(TEXBASE).pdf
TXTFILE=$(TEXBASE).txt TXTFILE=$(TEXBASE).txt
REVISION=0691c71d176511c294f39d84c89864fa8c141e4a REVISION=0691c71d176511c294f39d84c89864fa8c141e4a
PDFFIGURES=$(shell sed -n -e '/^[^%].*includegraphics/{s/^.*includegraphics.*{\(.*\)}/\1.pdf/;p}' $(TEXFILE)) PDFFIGURES=$(shell sed -n -e '/^[^%].*includegraphics/{s/^.*includegraphics.*{\(.*\)}/\1.pdf/;p}' $(TEXFILE))

View File

@ -133,11 +133,11 @@ However the effect of a given channelopathy on different neuronal types across t
% \textcolor{red}{In the simplest case, the influence on the firing behaviour should correlate with the expression level of the affected gene \textcolor{red}{(cite Niko , other Papers)}. But if a \textcolor{red}{ kinetic parameter} is changed too much, it can have unforseen consequences. } % \textcolor{red}{In the simplest case, the influence on the firing behaviour should correlate with the expression level of the affected gene \textcolor{red}{(cite Niko , other Papers)}. But if a \textcolor{red}{ kinetic parameter} is changed too much, it can have unforseen consequences. }
The expression level of an affected gene can correlate with firing behaviour in the simplest case \citep{Layer2021} \textcolor{red}{(cite other Papers?)}, however if a gating property is altered substantially this can have complex consequences. The expression level of an affected gene can correlate with firing behaviour in the simplest case \citep{Layer2021} \textcolor{red}{(cite other Papers?)}, however if a gating property is altered substantially this can have complex consequences.
For instance, altering relative amplitudes of ionic currents can dramatically influence the firing behaviour and dynamics of neurons \citep{rutecki_neuronal_1992, pospischil_minimal_2008,Kispersky2012, golowasch_failure_2002, barreiro_-current_2012, Noebels2017, Layer2021}, however other properties of ionic currents impact neuronal firing as well. In extreme cases, a mutation can have opposite effects on different neuron types. For example, the R1629H SCN1A mutation is associated which increased firing in interneurons, but decreases pyramidal neuron excitability \citep{Hedrich14874}\textcolor{red}{(and the other paper?)}. %not sure which paper you mean Lukas For instance, altering relative amplitudes of ionic currents can dramatically influence the firing behaviour and dynamics of neurons \citep{rutecki_neuronal_1992, pospischil_minimal_2008,Kispersky2012, golowasch_failure_2002, barreiro_-current_2012, Noebels2017, Layer2021}, however other properties of ionic currents impact neuronal firing as well. In extreme cases, a mutation can have opposite effects on different neuron types. For example, the R1629H SCN1A mutation is associated which increased firing in interneurons, but decreases pyramidal neuron excitability \citep{Hedrich14874}\textcolor{red}{(and the other paper?)}. \notenk{Lukas I'm not sure which other paper you are referencing}
%However, the effect on the firing behaviour of different neurons is often unclear \textcolor{red}{(and always incomplete)}. Generally, different neuron types have different ionic current compositions and therefore could react in different ways to changes in one ionic current. In the simpler cases, the respective firing behaviour should mostly correlate with expression level of the affected current and scale with it \textcolor{red}{(cite some stuff, cite NikoPaper)}. \textcolor{red}{If the change in gating kinetics is too strong, the firing behaviour can change qualitatively.} Altering the relative current amplitudes in neuronal models leads to dramtic changes in their firing behaviour and dynamics \citep{rutecki_neuronal_1992, pospischil_minimal_2008,Kispersky2012, golowasch_failure_2002, barreiro_-current_2012, Noebels2017}. \textcolor{red}{The same could happen for other parameters too. \citet{Liu2019} reported a drastically slowed inacitvaiton time constant for a mutation in \textcolor{red}{Na$_V$1.6}, which led to huge depolarization plateaus after an action potential, that lasted several 100 milliseconds.} The most drastic example known to us would be the R1629H mutation in \textcolor{red}{SCN2A}. This mutation increases the excitability of interneurons, but decreases it in pyramidal neurons \textcolor{red}{(cite Hedrich2014 and the other paper)}. \textcolor{red}{Some neuron types may be closer to certain transitions between firing states than other, making these observations even more unpredictable \textcolor{red}{(cite some bifurcation stuff?)}.} %However, the effect on the firing behaviour of different neurons is often unclear \textcolor{red}{(and always incomplete)}. Generally, different neuron types have different ionic current compositions and therefore could react in different ways to changes in one ionic current. In the simpler cases, the respective firing behaviour should mostly correlate with expression level of the affected current and scale with it \textcolor{red}{(cite some stuff, cite NikoPaper)}. \textcolor{red}{If the change in gating kinetics is too strong, the firing behaviour can change qualitatively.} Altering the relative current amplitudes in neuronal models leads to dramtic changes in their firing behaviour and dynamics \citep{rutecki_neuronal_1992, pospischil_minimal_2008,Kispersky2012, golowasch_failure_2002, barreiro_-current_2012, Noebels2017}. \textcolor{red}{The same could happen for other parameters too. \citet{Liu2019} reported a drastically slowed inacitvaiton time constant for a mutation in \textcolor{red}{Na$_V$1.6}, which led to huge depolarization plateaus after an action potential, that lasted several 100 milliseconds.} The most drastic example known to us would be the R1629H mutation in \textcolor{red}{SCN2A}. This mutation increases the excitability of interneurons, but decreases it in pyramidal neurons \textcolor{red}{(cite Hedrich2014 and the other paper)}. \textcolor{red}{Some neuron types may be closer to certain transitions between firing states than other, making these observations even more unpredictable \textcolor{red}{(cite some bifurcation stuff?)}.}
Computational modelling approaches can be used to assess the impacts of changed properties of ionic currents on firing behaviour, 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. Computational modelling approaches can be used to assess the impacts of changed ionic current properties on firing behaviour, 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.
We therefore investigate the role that neuronal type plays on the outcome of ionic current kinetic changes on firing by simulating the response of a repertoire of different neuronal models to changes in single current parameters as well as to episodic ataxia type~1 associated \Kv mutations. We therefore investigate the role that neuronal type plays on the outcome of ionic current kinetic changes on firing by simulating the response of a repertoire of different neuronal models to changes in single current parameters as well as to episodic ataxia type~1 associated \Kv mutations.
%In this study we want to get an insight into how changes in ion current kinetics change firing behaviour dependent on neuron type. We will simulate a repertoire of different neuronal models and compare their response to changes in single parameters and to changes as they were observed for mutations in \textcolor{red}{KCNA1}, causing ataxia. %In this study we want to get an insight into how changes in ion current kinetics change firing behaviour dependent on neuron type. We will simulate a repertoire of different neuronal models and compare their response to changes in single parameters and to changes as they were observed for mutations in \textcolor{red}{KCNA1}, causing ataxia.
@ -197,7 +197,7 @@ with slope \(k\), voltage for half-maximal activation or inactivation (\(V_{1/2}
% Sensitivity analyses enable investigation into how different sources of uncertainty in a model result in uncertainty in model outputs \citep{saltelli_sensitivity_2002} and provide information on the relative impact of model inputs \citep{saltelli_why_2019}. We recently used a one-factor-at-a-time (OFAT) sensitivity analysis approach to evaluate the relative impacts of currents on neuronal firing and developed a scoring system for SCN8A mutations that correlated (p = 0.0077, r = 0.64) with the clinical severity of epilepsy in patients with these mutations \citep{johannesen_genotype-phenotype_2021}. This was done in an isolated neuronal model and suggests that even with disregard of network level effects of mutations, the single cell level outcomes of mutations are relevant to disease phenotypes. OFAT sensitivity analyses indicate which factors have or do not have influence, with uninfluential factors never detected as relevant \citep{saltelli_how_2010}. OFAT sensitivity analyses can be used to screen factors that are influential on model outcomes and provide a mechanism by which factors and their relative influence can be easily identified and used in predictive applications. % Sensitivity analyses enable investigation into how different sources of uncertainty in a model result in uncertainty in model outputs \citep{saltelli_sensitivity_2002} and provide information on the relative impact of model inputs \citep{saltelli_why_2019}. We recently used a one-factor-at-a-time (OFAT) sensitivity analysis approach to evaluate the relative impacts of currents on neuronal firing and developed a scoring system for SCN8A mutations that correlated (p = 0.0077, r = 0.64) with the clinical severity of epilepsy in patients with these mutations \citep{johannesen_genotype-phenotype_2021}. This was done in an isolated neuronal model and suggests that even with disregard of network level effects of mutations, the single cell level outcomes of mutations are relevant to disease phenotypes. OFAT sensitivity analyses indicate which factors have or do not have influence, with uninfluential factors never detected as relevant \citep{saltelli_how_2010}. OFAT sensitivity analyses can be used to screen factors that are influential on model outcomes and provide a mechanism by which factors and their relative influence can be easily identified and used in predictive applications.
Properties of ionic currents common to all models (\(\textrm{I}_{\textrm{Na}}\), \(\textrm{I}_{\textrm{K}}\), \(\textrm{I}_{\textrm{A}}\)/\IKv, and \(\textrm{I}_{Leak}\)) were systematically altered in a one-factor-at-a-time sensitivity analysis for all models. The gating curves for each current were shifted (\(\Delta V_{1/2}\)) from -10 to 10\,mV in increments of 1\,mV. The slope (\(k\)) of the gating curves were altered from half to twice the initial slope. Similarly, the maximal current conductance (\(g\)) was also scaled from half to twice the initial value. For both slope and conductance alterations, alterations consisted of 21 steps spaced equally on a \(\textrm{log}_2\) scale. Properties of ionic currents common to all models (\(\textrm{I}_{\textrm{Na}}\), \(\textrm{I}_{\textrm{K}}\), \(\textrm{I}_{\textrm{A}}\)/\IKv, and \(\textrm{I}_{\textrm{Leak}}\)) were systematically altered in a one-factor-at-a-time sensitivity analysis for all models. The gating curves for each current were shifted (\(\Delta V_{1/2}\)) from -10 to 10\,mV in increments of 1\,mV. The slope (\(k\)) of the gating curves were altered from half to twice the initial slope. Similarly, the maximal current conductance (\(g\)) was also scaled from half to twice the initial value. For both slope and conductance alterations, alterations consisted of 21 steps spaced equally on a \(\textrm{log}_2\) scale.
\subsection*{Model Comparison} \subsection*{Model Comparison}
Changes in rheobase (\(\Delta rheobase\)) are calculated in relation to the original model rheobase. The contrast of each AUC value (\(AUC_i\)) was computed in comparison to the AUC of the unaltered wild type model (\(AUC_{wt}\)) Changes in rheobase (\(\Delta rheobase\)) are calculated in relation to the original model rheobase. The contrast of each AUC value (\(AUC_i\)) was computed in comparison to the AUC of the unaltered wild type model (\(AUC_{wt}\))
@ -230,6 +230,7 @@ To examine the role of cell specific environments of ionic currents on the impac
\centering \centering
\includegraphics[width=0.5\linewidth]{Figures/firing_characterization.pdf} \includegraphics[width=0.5\linewidth]{Figures/firing_characterization.pdf}
\\\notejb{Nils, can you put the python script of this figure into the git? I have some ideas I would like to try.} \\\notejb{Nils, can you put the python script of this figure into the git? I have some ideas I would like to try.}
\\\notenk{Should already be in \path{./Figures}, specifically file: \path{./Figures/firing_characterization.py}}
\linespread{1.}\selectfont \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) \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 4 quadrants separated by no changes in AUC and rheobase. Representative schematic fI curves in blue with respect to a reference fI curve (black) depict the general changes associated with each quadrant.} Changes in firing as characterized by \(\Delta\)AUC and \(\Delta\)rheobase occupy 4 quadrants separated by no changes in AUC and rheobase. Representative schematic fI curves in blue with respect to a reference fI curve (black) depict the general changes associated with each quadrant.}
@ -250,7 +251,7 @@ Neuronal firing is a complex phenomenon and a quantification of firing propertie
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 neuronal models used here has considerable diversity as evident in the variability seen across neuronal models both in representative spike trains and their fI curves (\Cref{fig:diversity_in_firing}). The models chosen all fire repetitively and do not exhibit bursting. 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 have type II firing. Type I firing is characterized by continuous fI curve (i.e. firing rate is continuous) generated through a saddle-node on invariant cycle bifurcation and 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) due to a sub-critical Hopf bifurcation \cite{ERMENTROUT2002, ermentrout_type_1996}. Other models lie on a continuum between these prototypical firing classifications. Most neuronal models exhibit hysteresis with ascending and descending ramps eliciting spikes with different thresholds, however the STN +\Kv, STN \(\Delta\)\Kv, and Cb stellate \(\Delta\)\Kv models have large hysteresis (\Cref{fig:diversity_in_firing}). 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 neuronal models used here has considerable diversity as evident in the variability seen across neuronal models both in representative spike trains and their fI curves (\Cref{fig:diversity_in_firing}). The models chosen all fire repetitively and do not exhibit bursting. 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 have type II firing. Type I firing is characterized by continuous fI curve (i.e. firing rate is continuous) generated through a saddle-node on invariant cycle bifurcation and 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) due to a sub-critical Hopf bifurcation \cite{ERMENTROUT2002, ermentrout_type_1996}. Other models lie on a continuum between these prototypical firing classifications. Most neuronal models exhibit hysteresis with ascending and descending ramps eliciting spikes with different thresholds, however the STN +\Kv, STN \(\Delta\)\Kv, and Cb stellate \(\Delta\)\Kv models have large hysteresis (\Cref{fig:diversity_in_firing}).
\subsection*{Sensitivity Analysis} \subsection*{Sensitivity Analysis}
Sensitivity analyses are used to understand how input model parameters contribute to the output of a model \citep{Saltelli2002}. In other words, sensitivity analyses are used to understand how sensitive the output of a model is to a change in input or model parameters. One-factor-a-time sensitivity analysis involve altering one parameter at a time and enable the comparison of a given alteration in parameters of ionic currents across models. Changes in gating \(V_{1/2}\) and slope factor $k$ as well as the maximum conductance affect AUC (\Cref{fig:AUC_correlation} A, B and C). Heterogeneity in the correlation between gating and conductance changes and AUC occurs across models for most ionic currents. In these cases some of the models display non-monotonic relationships (i.e. \( |\text{Kendall} \tau | \approx 0\)\notejb{is this right?} ). However, shifts in A-current activation \(V_{1/2}\), changes in \Kv activation \(V_{1/2}\) and slope factor $k$, and changes in A-current conductance display consistent monotonic relationships across models. Sensitivity analyses are used to understand how input model parameters contribute to the output of a model \citep{Saltelli2002}. In other words, sensitivity analyses are used to understand how sensitive the output of a model is to a change in input or model parameters. One-factor-a-time sensitivity analysis involve altering one parameter at a time and enable the comparison of a given alteration in parameters of ionic currents across models. Changes in gating \(V_{1/2}\) and slope factor $k$ as well as the maximum conductance affect AUC (\Cref{fig:AUC_correlation} A, B and C). Heterogeneity in the correlation between gating and conductance changes and AUC occurs across models for most ionic currents. In these cases some of the models display non-monotonic relationships (i.e. \( |\text{Kendall} \tau | \approx 0\)\notejb{is this right?} \notenk{Yes, although it is perhaps a bit misleadingly written as this is not the only situation in which the Kendall \(\tau \approx 0\). Kendall \(\tau\) is a measure of monotonic relationships so if there is no relationship or the relationship is completely non-monotonic (i.e. a parabola) then the Kendall \(\tau\) is zero.}). However, shifts in A-current activation \(V_{1/2}\), changes in \Kv activation \(V_{1/2}\) and slope factor $k$, and changes in A-current conductance display consistent monotonic relationships across models.
\begin{figure}[ht!] \begin{figure}[ht!]
\centering \centering
@ -266,6 +267,7 @@ Alterations in gating \(V_{1/2}\) and slope factor $k$ as well as the maximum co
\centering \centering
\includegraphics[width=\linewidth]{Figures/rheobase_correlation.pdf} \includegraphics[width=\linewidth]{Figures/rheobase_correlation.pdf}
\\\notejb{Oben rechts: linebreak in ``A inactivation'' is weird} \\\notejb{Oben rechts: linebreak in ``A inactivation'' is weird}
\\\notenk{Habe ich fuer dieses und das AUC Abbildung (Figure 3) geaendert}
\linespread{1.}\selectfont \linespread{1.}\selectfont
\caption[]{The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in \(V_{1/2}\) and rheobase, slope factor k and AUC as well as current conductances and rheobase for each model are shown on the right in (A), (B) and (C) respectively. The relationships between rheobase and \(\Delta V_{1/2}\), slope (k) and conductance (g) for the Kendall \(\tau\) coefficients highlights by the black box are depicted in the middle panel. The fI curves corresponding to one of the models are shown in the left panels.} \caption[]{The Kendall rank correlation (Kendall \(\tau\)) coefficients between shifts in \(V_{1/2}\) and rheobase, slope factor k and AUC as well as current conductances and rheobase for each model are shown on the right in (A), (B) and (C) respectively. The relationships between rheobase and \(\Delta V_{1/2}\), slope (k) and conductance (g) for the Kendall \(\tau\) coefficients highlights by the black box are depicted in the middle panel. The fI curves corresponding to one of the models are shown in the left panels.}
\label{fig:rheobase_correlation} \label{fig:rheobase_correlation}
@ -312,7 +314,7 @@ Variability in ion channel expression often correlates with the expression of ot
The variability of ion currents and degeneracy of neurons may account, at least in part, for the observation that the effect of toxins within a neuronal type is frequently not constant \citep{khaliq_relative_2006, puopolo_roles_2007, ransdell_neurons_2013}. The variability of ion currents and degeneracy of neurons may account, at least in part, for the observation that the effect of toxins within a neuronal type is frequently not constant \citep{khaliq_relative_2006, puopolo_roles_2007, ransdell_neurons_2013}.
\subsection*{Effects of KCNA1 Mutations} \subsection*{Effects of KCNA1 Mutations}
Moderate changes in delayed rectifier potassium currents change the bifurcation structure of Hodgkin Huxley model, with changes analogous to those seen with \Kv mutations resulting in increased excitability due to reduced thresholds for repetitive firing \citep{hafez_altered_2020}. Although the Hodgkin Huxley delayed rectifier lacks inactivation, the increases in excitability seen are in line with \textcolor{red}{both score-based and} simulation-based predictions of the outcomes of \textit{KCNA1} mutations. LOF KCNA1 mutations generally increase neuronal excitability, however the different effects of KCNA1 mutations across models on AUC are indicative that a certain cell type specific complexity exists. Increased excitability seen experimentally with \Kv null mice \citep{smart_deletion_1998, zhou_temperature-sensitive_1998}, with pharmacological \Kv block \citep{chi_manipulation_2007, morales-villagran_protection_1996}, by \citet{hafez_altered_2020} and with simulation-based predictions of KCNA1 mutations. Contrary to these results, \citet{zhao_common_2020} predicted \textit{in silico} that the depolarizing shifts seen as a result of KCNA1 mutations broaden action potentials and interfere negatively with high frequency action potential firing, however \textcolor{green}{they varied stimulus duration between different models and therefore} comparability of firing rates is lacking in this study. Moderate changes in delayed rectifier potassium currents change the bifurcation structure of Hodgkin Huxley model, with changes analogous to those seen with \Kv mutations resulting in increased excitability due to reduced thresholds for repetitive firing \citep{hafez_altered_2020}. Although the Hodgkin Huxley delayed rectifier lacks inactivation, the increases in excitability seen are in line with simulation-based predictions of the outcomes of \textit{KCNA1} mutations. LOF KCNA1 mutations generally increase neuronal excitability, however the different effects of KCNA1 mutations across models on AUC are indicative that a certain cell type specific complexity exists. Increased excitability seen experimentally with \Kv null mice \citep{smart_deletion_1998, zhou_temperature-sensitive_1998}, with pharmacological \Kv block \citep{chi_manipulation_2007, morales-villagran_protection_1996}, by \citet{hafez_altered_2020} and with simulation-based predictions of KCNA1 mutations. Contrary to these results, \citet{zhao_common_2020} predicted \textit{in silico} that the depolarizing shifts seen as a result of KCNA1 mutations broaden action potentials and interfere negatively with high frequency action potential firing, however \textcolor{green}{they varied stimulus duration between different models and therefore} comparability of firing rates is lacking in this study.
Different current properties, such as the difference in \(\textrm{I}_\textrm{A}\) and \IKv in the Cb stellate and STN model families alter the impact of KCNA1 mutations on firing highlighting that knowledge of the biophysical properties of a current and its neuronal expression is vital for holistic understanding of the effects of a given ion channel mutation both at a single cell and network level. Different current properties, such as the difference in \(\textrm{I}_\textrm{A}\) and \IKv in the Cb stellate and STN model families alter the impact of KCNA1 mutations on firing highlighting that knowledge of the biophysical properties of a current and its neuronal expression is vital for holistic understanding of the effects of a given ion channel mutation both at a single cell and network level.
\subsection*{Loss or Gain of Function Characterizations Do Not Fully Capture Ion Channel Mutation Effects on Firing} \subsection*{Loss or Gain of Function Characterizations Do Not Fully Capture Ion Channel Mutation Effects on Firing}