{ "cells": [ { "cell_type": "markdown", "id": "6f6aa857", "metadata": {}, "source": [ "# Exercise: Compute summary statistics for the neural data" ] }, { "cell_type": "code", "execution_count": 1, "id": "8f9bc8b1", "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "\n", "# Set some Pandas options: maximum number of rows/columns it's going to display\n", "pd.set_option('display.max_rows', 1000)\n", "pd.set_option('display.max_columns', 100)" ] }, { "cell_type": "markdown", "id": "1be11d54", "metadata": {}, "source": [ "# Load the processed neural data" ] }, { "cell_type": "code", "execution_count": 2, "id": "d2dfebd3", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('processed_QC_passed_2024-07-04_collected_v1.csv')" ] }, { "cell_type": "code", "execution_count": 3, "id": "09554c84", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(659, 35)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.shape" ] }, { "cell_type": "code", "execution_count": 4, "id": "df95a10b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
OPfilenameslicecell_chcell_IDdaytreatmenthrs_incubationrepatchhrs_after_OPRsRinresting_potentialmax_spikesRheobaseAP_heigthTHmax_depolmax_repolmembra_time_constant_taucapacitancecommentsrheo_rampAP_halfwidthRheobse_rampUnnamed: 27rheos_rampcommenthigh K concentrationRMP_from_chartissue_sourceareapatient_agepatcher
0OP23042023420003.abfS1123420S1c1D1TTX0.0no10.4163896.67564339.025301-74.28588924200.080.749512-35.278320336.181641-60.79101619.40510.6017670753.3801131.151009NaNNaNNaNNaNNaN8 mM-61.828554Bielefeldtemporal13.0Verji
1OP23042023420003.abfS1323420S1c3D1TTX0.0no10.4163897.86717448.728367-69.57397526300.078.448486-32.043457350.097656-67.13867217.30393.3979181585.1028371.006321NaNNaNNaNNaNNaN8 mM-60.460298Bielefeldtemporal13.0Verji
2OP23042023420003.abfS1623420S1c6D1TTX0.0no10.4163898.82013435.971082-54.95605522300.076.660156-29.827881270.629883-52.24609414.85426.0987743173.9157971.266335NaNNaNNaNNaNNaN8 mM-59.615979Bielefeldtemporal13.0Verji
3OP23042023420003.abfS1823420S1c8D1TTX0.0yes10.4163896.00040031.599917-70.55053722350.081.011963-33.068848309.448242-61.40136716.65575.5139245786.9278981.182830NaNNaNNaNNaNNaN8 mM-60.956350Bielefeldtemporal13.0Verji
4OP23042023420061.abfS1_D2823420S1c8D2TTX19.0yes29.6333338.27161430.607259-70.74585011300.048.883057-20.855713100.952148-27.46582013.25864.89243029565.9388651.504127NaNNaNNaNNaNNaN8 mM-61.283967Bielefeldtemporal13.0Verji
\n", "
" ], "text/plain": [ " OP filename slice cell_ch cell_ID day treatment \\\n", "0 OP230420 23420003.abf S1 1 23420S1c1 D1 TTX \n", "1 OP230420 23420003.abf S1 3 23420S1c3 D1 TTX \n", "2 OP230420 23420003.abf S1 6 23420S1c6 D1 TTX \n", "3 OP230420 23420003.abf S1 8 23420S1c8 D1 TTX \n", "4 OP230420 23420061.abf S1_D2 8 23420S1c8 D2 TTX \n", "\n", " hrs_incubation repatch hrs_after_OP Rs Rin \\\n", "0 0.0 no 10.416389 6.675643 39.025301 \n", "1 0.0 no 10.416389 7.867174 48.728367 \n", "2 0.0 no 10.416389 8.820134 35.971082 \n", "3 0.0 yes 10.416389 6.000400 31.599917 \n", "4 19.0 yes 29.633333 8.271614 30.607259 \n", "\n", " resting_potential max_spikes Rheobase AP_heigth TH max_depol \\\n", "0 -74.285889 24 200.0 80.749512 -35.278320 336.181641 \n", "1 -69.573975 26 300.0 78.448486 -32.043457 350.097656 \n", "2 -54.956055 22 300.0 76.660156 -29.827881 270.629883 \n", "3 -70.550537 22 350.0 81.011963 -33.068848 309.448242 \n", "4 -70.745850 1 1300.0 48.883057 -20.855713 100.952148 \n", "\n", " max_repol membra_time_constant_tau capacitance comments rheo_ramp \\\n", "0 -60.791016 19.40 510.601767 0 753.380113 \n", "1 -67.138672 17.30 393.397918 1 585.102837 \n", "2 -52.246094 14.85 426.098774 3 173.915797 \n", "3 -61.401367 16.65 575.513924 5 786.927898 \n", "4 -27.465820 13.25 864.892430 29 565.938865 \n", "\n", " AP_halfwidth Rheobse_ramp Unnamed: 27 rheos_ramp comment \\\n", "0 1.151009 NaN NaN NaN NaN NaN \n", "1 1.006321 NaN NaN NaN NaN NaN \n", "2 1.266335 NaN NaN NaN NaN NaN \n", "3 1.182830 NaN NaN NaN NaN NaN \n", "4 1.504127 NaN NaN NaN NaN NaN \n", "\n", " high K concentration RMP_from_char tissue_source area patient_age \\\n", "0 8 mM -61.828554 Bielefeld temporal 13.0 \n", "1 8 mM -60.460298 Bielefeld temporal 13.0 \n", "2 8 mM -59.615979 Bielefeld temporal 13.0 \n", "3 8 mM -60.956350 Bielefeld temporal 13.0 \n", "4 8 mM -61.283967 Bielefeld temporal 13.0 \n", "\n", " patcher \n", "0 Verji \n", "1 Verji \n", "2 Verji \n", "3 Verji \n", "4 Verji " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head()" ] }, { "cell_type": "markdown", "id": "0b4f6091", "metadata": {}, "source": [ "# 1. Does capacitance change with age?\n", "\n", "* Compute the capacitance by patient age, and plot it\n", "* Does it change with age? (eyeballing is enough)" ] }, { "cell_type": "code", "execution_count": 5, "id": "00bb9eb1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGxCAYAAABMeZ2uAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwhUlEQVR4nO3dfXBUVYL+8eeSkBhC0pIE0h0NARVUJkEpYCHoyDvIiDjGEhxZB0bG0hWRFLAiuK5xHAnDLKIOu0zJWLzqhqqVOLq+IBQSi6EYQ5QlMC6DChLGzmSjoRMgJpic3x/+uEVDAukQ0qeT76fqVtn3nnSfPrb20+fcc45jjDECAACwUJdwVwAAAKA5BBUAAGAtggoAAL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91+++3y+/2SpLy8PK1bt05//OMf5TiOHMcJ+vvmLFy4UP3791e3bt10zTXX6Omnn9bp06eDyvz6179Wr169lJCQoF/+8pd68skndfPNNweVWbNmjW688UZdccUVuuGGG/Qf//EfIbQygLZAUAE6qXXr1ik6Olp//vOf9fLLL2vFihX6wx/+IOmHgPHcc8/pf/7nf/Tmm2/q8OHDbhhJT0/XG2+8IUk6ePCg/H6/XnrppSZf4xe/+IX+9Kc/qaCgQPv27dO9996r22+/XYcOHXLLnDp1Sv/2b/+mDRs26KOPPtLRo0e1YMECSdKCBQs0depUN7z4/X6NGDHiou8tISFBa9eu1V/+8he99NJLWr16tVasWOFef+211/T888/rN7/5jUpKStS7d2+tWrUq6DlWr16tp556Ss8//7w+++wzLVmyRE8//bTWrVvX8kYGcOkucYdnABFo5MiR5sYbbzSNjY3uuYULF5obb7yxyfIff/yxkWRqamqMMcZ8+OGHRpKpqqo673nnzp1rjDHm888/N47jmL/97W9BZcaOHWsWLVpkjDFmzZo1RpL5/PPP3ev//u//blJTU93HM2bMMHfddVdr36oxxphly5aZwYMHu4+HDRtmZs+eHVTmlltuMTfddJP7OD093bz++utBZZ577jmTnZ19SXUBEBruUQE6qeHDh8txHPdxdna2li9froaGBu3bt095eXnau3evvv32WzU2NkqSjh49qgEDBrTo+T/55BMZY9S/f/+g83V1dUpOTnYfd+vWTddee6372OfzucNMrfVf//VfevHFF/X555/rxIkT+v7775WYmOheP3jwoB599NGgv/mHf/gHbd++XZL0f//3fyorK9OsWbP00EMPuWW+//57eTyeS6obgNAQVAAE+e677zRhwgRNmDBBGzduVM+ePXX06FFNnDhR9fX1LX6exsZGRUVFqaSkRFFRUUHXunfv7v5z165dg645juPeK9Mau3fv1n333adnn31WEydOlMfjUUFBgZYvX37e65zt7Nc8E8xWr16tYcOGBZU7970AuLwIKkAntXv37vMe9+vXT//7v/+ryspKLV26VOnp6ZKkPXv2BJWNiYmRJDU0NDT7/IMGDVJDQ4MqKir04x//uNX1jImJueDrnOtPf/qTMjIy9NRTT7nnvvrqq6Ay119/vT7++GM98MAD7rmz32Nqaqquuuoqffnll5o+fXqr6w7g0hFUgE6qrKxM8+bN08MPP6xPPvlEv/vd77R8+XL17t1bMTEx+t3vfqdHHnlE+/fv13PPPRf0txkZGXIcR//93/+tn/zkJ4qLiwvqJZGk/v37a/r06fr5z3+u5cuXa9CgQaqsrNT27duVlZWln/zkJy2qZ58+fbRlyxYdPHhQycnJ8ng85/XCnO26667T0aNHVVBQoKFDh+qdd95RYWFhUJk5c+booYce0pAhQzRixAht2rRJ+/bt0zXXXOOWycvL0+OPP67ExERNmjRJdXV12rNnj6qqqjRv3rwW1R1AGwjzPTIAwmDkyJHm0UcfNY888ohJTEw0PXr0ME8++aR7c+3rr79u+vTpY2JjY012drZ56623jCTz6aefus/xq1/9yni9XuM4jpkxY4b7vGdupjXGmPr6evOv//qvpk+fPqZr167G6/Wau+++2+zbt88Y88PNtB6PJ6huhYWF5uz/NVVUVJjx48eb7t27G0nmww8/vOj7++d//meTnJxsunfvbqZNm2ZWrFhx3uv86le/MikpKaZ79+7mwQcfNI8//rgZPnx4UJnXXnvN3HzzzSYmJsb06NHD3HbbbWbz5s0XfX0AbYeVaYFOaNSoUbr55pv14osvhrsq1hg/fry8Xq82bNgQ7qoAOAtDPwA6nVOnTun3v/+9Jk6cqKioKP3nf/6ntm3bpq1bt4a7agDOwYJvACLKkiVL1L179yaPSZMmteg5HMfRu+++qx//+McaPHiw3n77bb3xxhsaN27cZa49gFAx9AMgonz77bf69ttvm7wWFxenq666qp1rBOByIqgAAABrMfQDAACsRVABAADWIqgAAABrEVQAAIC1CCoAAMBaBBUAAGAtggoAALAWQQUAAFjr/wG6t+F7pXHoxgAAAABJRU5ErkJggg==", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df.groupby('patient_age')['capacitance'].mean().plot(ls='', marker='.')" ] }, { "cell_type": "markdown", "id": "1940d3fe", "metadata": {}, "source": [ "# 2. Spiking threshold after potassium incubation\n", "\n", "1. Does the spiking threshold (TH) change between Day 1 and Day 2?\n", "2. Does this result depend on the treatment?" ] }, { "cell_type": "code", "execution_count": 6, "id": "8175fc1c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "day\n", "D1 -37.276805\n", "D2 -33.039838\n", "Name: TH, dtype: float64" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.groupby('day')['TH'].mean()" ] }, { "cell_type": "code", "execution_count": 7, "id": "fc34eecb", "metadata": {}, "outputs": [], "source": [ "th_per_treatment_and_day = df.pivot_table(index='treatment', columns='day', values='TH', aggfunc='mean')" ] }, { "cell_type": "code", "execution_count": 8, "id": "05761273", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
dayD1D2
treatment
Ctrl-37.865372-35.751658
TTX-36.852170-30.008780
high K-36.926069-33.162092
wash in high KNaN-35.791016
\n", "
" ], "text/plain": [ "day D1 D2\n", "treatment \n", "Ctrl -37.865372 -35.751658\n", "TTX -36.852170 -30.008780\n", "high K -36.926069 -33.162092\n", "wash in high K NaN -35.791016" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "th_per_treatment_and_day" ] }, { "cell_type": "code", "execution_count": 9, "id": "95fabcd9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
meanstd
dayD1D2D1D2
treatment
Ctrl-37.865372-35.7516584.2601405.459102
TTX-36.852170-30.0087805.4065696.577182
high K-36.926069-33.1620923.9662944.479648
wash in high KNaN-35.791016NaN1.009906
\n", "
" ], "text/plain": [ " mean std \n", "day D1 D2 D1 D2\n", "treatment \n", "Ctrl -37.865372 -35.751658 4.260140 5.459102\n", "TTX -36.852170 -30.008780 5.406569 6.577182\n", "high K -36.926069 -33.162092 3.966294 4.479648\n", "wash in high K NaN -35.791016 NaN 1.009906" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "th_per_treatment_and_day = df.pivot_table(index='treatment', columns='day', values='TH', aggfunc=['mean', 'std'])\n", "th_per_treatment_and_day" ] }, { "cell_type": "code", "execution_count": null, "id": "dd5023cd", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.3" } }, "nbformat": 4, "nbformat_minor": 5 }