{ "cells": [ { "cell_type": "markdown", "id": "d564a08b-3c3d-4f0d-a12c-ce94ed4168e3", "metadata": {}, "source": [ "# Smoothing Script" ] }, { "cell_type": "code", "execution_count": 1, "id": "288f06ae-cb9b-4947-80b1-71cb5483c603", "metadata": {}, "outputs": [], "source": [ "import os\n", "import sys\n", "import numpy as np\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "id": "fb90cd32-113f-4b67-8111-95065c8032fa", "metadata": {}, "outputs": [], "source": [ "sys.path.insert(0, '/home/cabsel/gfa/')\n", "from gfapy.curve_fit import curve_fitter" ] }, { "cell_type": "code", "execution_count": 3, "id": "eacc4c48-a06d-4fd3-92b1-1ee8462dae23", "metadata": {}, "outputs": [], "source": [ "mainDir = '/home/cabsel/gfa/'\n", "inputDir = os.path.join(mainDir, 'inputfiles')" ] }, { "cell_type": "markdown", "id": "05f70150-44af-4d27-89bc-78f7c48d33dd", "metadata": {}, "source": [ "## Read GFA model from Excel" ] }, { "cell_type": "code", "execution_count": 4, "id": "d373ac0a-5368-4401-9e13-efb2b8ffbd14", "metadata": {}, "outputs": [], "source": [ "expt_data = pd.read_excel(os.path.join(inputDir, 'smoothed_data_medpH.xlsx'), sheet_name=['vcd', 'titer', 'frac', 'q_prod_matched'])\n", "expt_data['VCD'] = (expt_data.pop('vcd').rename(columns={'VCD_1e6cells_mL': 'VCD (1E6 VC/mL)',\n", " 'Time_days': 'Time (WD)',\n", " 'fit_VCD_1e6cells_mL': 'fit_VCD (1E6 VC/mL)'}).\n", " set_index('Time (WD)'))\n", "expt_data['Titer'] = (expt_data.pop('titer').rename(columns={'Titer_g_L': 'Titer (g/L)',\n", " 'Time_days': 'Time (WD)',\n", " 'fit_Titer_g_L': 'fit_Titer (g/L)'}).\n", " set_index('Time (WD)'))\n", "expt_data['Fractions'] = (expt_data.pop('frac').rename(columns={'Time_days': 'Time (WD)',\n", " 'G0FplusGlcNAc': 'G0F+GlcNAc',\n", " 'G0FplusGlcNac': 'G0F+GlcNAc',\n", " 'G0F_GlcNac': 'G0F-GlcNAc',\n", " 'G0F_GlcNAc': 'G0F-GlcNAc',\n", " 'G0F_GlcNac': 'G0F-GlcNAc',\n", " 'G0_GlcNAc': 'G0-GlcNAc',\n", " 'G0_GlcNac': 'G0-GlcNAc',\n", " 'G1prime': 'G1a/b',\n", " 'Man7prime': 'Man7'}).\n", " assign(**{'G1Fa/b': lambda x: x['G1F']+x['G1Fprime']}).\n", " drop(columns=['G1F', 'G1Fprime']).\n", " set_index('Time (WD)'))\n", "expt_data['q_prod'] = (expt_data.pop('q_prod_matched').\n", " rename(columns={'Spec_prod_pg_cells_day': 'Spec Prod (pg/cells/day)',\n", " 'Time_days': 'Time (WD)',\n", " 'Time_windows_days': 'Time window (days)'}).\n", " set_index('Time (WD)'))\n", "expt_data['Concentrations'] = expt_data['Fractions'].mul(expt_data['Titer']['Titer (g/L)'], axis=0).dropna()\n", "for k, v in expt_data.items():\n", " expt_data[k] = expt_data[k].sort_index()" ] }, { "cell_type": "markdown", "id": "a33adb3d-60bb-4398-8940-5d0897f64bb8", "metadata": {}, "source": [ "## Smooth data and record all necessary variables in new dictionary (Trial and error to find correct function)" ] }, { "cell_type": "code", "execution_count": 5, "id": "88b75486-fccb-4cac-a491-f7598946665b", "metadata": {}, "outputs": [], "source": [ "smoothed_data = expt_data.copy()" ] }, { "cell_type": "code", "execution_count": 6, "id": "c8710a95-f640-4148-ad19-faf64c27469c", "metadata": {}, "outputs": [], "source": [ "retrieve_timepoints = np.arange(expt_data['VCD'].index.min(), expt_data['VCD'].index.max()+1, 1)" ] }, { "cell_type": "markdown", "id": "6e33d18b-0e4d-4784-9df7-00c3c2c2d54e", "metadata": {}, "source": [ "### VCD" ] }, { "cell_type": "code", "execution_count": 7, "id": "d44edcdf-959a-4f2e-8906-ad9ac81bf707", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Choose a model from below keys or \"Custom:\"\n", "['Polynomial', 'Exponential', 'Power', 'Logarithmic', 'Fourier', 'Gaussian', 'Weibull', 'Hill-type', 'Sigmoidal']\n" ] } ], "source": [ "fit_vcd = curve_fitter()\n", "fit_vcd.ingest_data(expt_data['VCD'].reset_index(), x_col='Time (WD)')" ] }, { "cell_type": "markdown", "id": "0a249afa-545d-4737-91d5-025ef0bead0b", "metadata": {}, "source": [ "Logistic: A / (exp(B * x) + C * exp(-D * x)) " ] }, { "cell_type": "code", "execution_count": 8, "id": "e1414aa5-1b20-401d-b924-aa4901c9bb8b", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "350df8dc94324024ab2e37698043d534", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f9a3d53edab14dfe8f179a5f8f054312", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "vcd_col = 'VCD (1E6 VC/mL)'\n", "fit_vcd.fit_jupyter(vcd_col)" ] }, { "cell_type": "code", "execution_count": 9, "id": "3dbcf083-e1df-46a7-9b6d-357fee523d6a", "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", "
VCD (1E6 VC/mL)fit_VCD (1E6 VC/mL)diff_VCD (1E6 VC/mL)
Time (WD)
10.7841380.8120270.435732
21.2653091.3742600.705857
32.1008692.2568441.073020
43.6014403.5322641.472161
55.2148835.1564311.735699
67.1921786.8935911.675505
78.1657858.3914121.275581
89.2805729.3965390.731072
99.7868359.8772300.252563
109.8696989.953180-0.074785
119.9525539.773722-0.264768
129.7876219.454708-0.361261
139.1114619.069461-0.402502
148.3537078.659642-0.413579
\n", "
" ], "text/plain": [ " VCD (1E6 VC/mL) fit_VCD (1E6 VC/mL) diff_VCD (1E6 VC/mL)\n", "Time (WD) \n", "1 0.784138 0.812027 0.435732\n", "2 1.265309 1.374260 0.705857\n", "3 2.100869 2.256844 1.073020\n", "4 3.601440 3.532264 1.472161\n", "5 5.214883 5.156431 1.735699\n", "6 7.192178 6.893591 1.675505\n", "7 8.165785 8.391412 1.275581\n", "8 9.280572 9.396539 0.731072\n", "9 9.786835 9.877230 0.252563\n", "10 9.869698 9.953180 -0.074785\n", "11 9.952553 9.773722 -0.264768\n", "12 9.787621 9.454708 -0.361261\n", "13 9.111461 9.069461 -0.402502\n", "14 8.353707 8.659642 -0.413579" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "smoothed_data['VCD']['fit_'+vcd_col] = fit_vcd.current_stats['fitted'].copy()\n", "smoothed_data['VCD']['diff_'+vcd_col] = fit_vcd.current_stats['deriv'].copy()\n", "display(smoothed_data['VCD'])" ] }, { "cell_type": "markdown", "id": "a037db99-98d0-401e-82ce-0e8fb788dd48", "metadata": {}, "source": [ "### Titer" ] }, { "cell_type": "code", "execution_count": 10, "id": "0ddfa529-c46c-41e5-b8cb-5b0514f1cdb9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Choose a model from below keys or \"Custom:\"\n", "['Polynomial', 'Exponential', 'Power', 'Logarithmic', 'Fourier', 'Gaussian', 'Weibull', 'Hill-type', 'Sigmoidal']\n" ] } ], "source": [ "fit_titer = curve_fitter()\n", "fit_titer.ingest_data(expt_data['Titer'].reset_index(), x_col='Time (WD)')" ] }, { "cell_type": "code", "execution_count": 11, "id": "9d532cae-110a-4e94-ab5e-e228c51b88b8", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e142827478bc4b9fafbe322790fe944e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0c579b87133548bab2dd51ab4598306a", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "titer_col = 'Titer (g/L)'\n", "fit_titer.fit_jupyter(titer_col)" ] }, { "cell_type": "code", "execution_count": 12, "id": "4214686d-9e1c-4e6b-86c5-59c3d3ee6f7f", "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", "
Titer (g/L)fit_Titer (g/L)diff_Titer (g/L)
Time (WD)
10.0388940.0007850.002834
20.0625560.0095760.017251
30.1000220.0410690.048891
40.1631210.1137370.099474
50.2696000.2450770.165003
60.4293200.4452400.234872
70.6600260.7113720.294462
81.0386211.0264310.331127
91.3482011.3641660.339716
101.6991891.6975610.323568
112.0265162.0058440.291056
122.3400392.2772260.251123
132.4406042.5079080.210547
142.7068032.6994580.173308
\n", "
" ], "text/plain": [ " Titer (g/L) fit_Titer (g/L) diff_Titer (g/L)\n", "Time (WD) \n", "1 0.038894 0.000785 0.002834\n", "2 0.062556 0.009576 0.017251\n", "3 0.100022 0.041069 0.048891\n", "4 0.163121 0.113737 0.099474\n", "5 0.269600 0.245077 0.165003\n", "6 0.429320 0.445240 0.234872\n", "7 0.660026 0.711372 0.294462\n", "8 1.038621 1.026431 0.331127\n", "9 1.348201 1.364166 0.339716\n", "10 1.699189 1.697561 0.323568\n", "11 2.026516 2.005844 0.291056\n", "12 2.340039 2.277226 0.251123\n", "13 2.440604 2.507908 0.210547\n", "14 2.706803 2.699458 0.173308" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "smoothed_data['Titer']['fit_'+titer_col] = fit_titer.current_stats['fitted'].copy()\n", "smoothed_data['Titer']['diff_'+titer_col] = fit_titer.current_stats['deriv'].copy()\n", "display(smoothed_data['Titer'])" ] }, { "cell_type": "markdown", "id": "02f83356-9880-4b59-a08b-26fb7a4e3105", "metadata": {}, "source": [ "### Glycoform Concentrations" ] }, { "cell_type": "code", "execution_count": 13, "id": "82105eef-7d33-4d92-9340-f3794f318526", "metadata": {}, "outputs": [], "source": [ "smoothed_data['Fit_Concentrations'] = (pd.DataFrame(0, index=retrieve_timepoints, columns=smoothed_data['Concentrations'].columns).\n", " rename_axis(index='Time (WD)'))\n", "smoothed_data['Diff_Concentrations'] = (pd.DataFrame(0, index=retrieve_timepoints, columns=smoothed_data['Concentrations'].columns).\n", " rename_axis(index='Time (WD)'))" ] }, { "cell_type": "code", "execution_count": 14, "id": "2cb8a6b4-0da6-4ea1-a782-fa9a7f2a8d47", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Choose a model from below keys or \"Custom:\"\n", "['Polynomial', 'Exponential', 'Power', 'Logarithmic', 'Fourier', 'Gaussian', 'Weibull', 'Hill-type', 'Sigmoidal']\n" ] } ], "source": [ "fit_fracs = curve_fitter()\n", "fit_fracs.ingest_data(expt_data['Concentrations'].reset_index(), x_col='Time (WD)')" ] }, { "cell_type": "markdown", "id": "557f2931-53eb-4f43-9389-55f31b3f534e", "metadata": {}, "source": [ "#### Man7" ] }, { "cell_type": "code", "execution_count": 15, "id": "67ff2ad7-27d3-4ecf-ab98-95d514fbbe0f", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "67bfaefb159b4b849dcac35d058669d3", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fb35b713dd4a46f4959349172675108e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'Man7'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 16, "id": "11131d03-b3c7-4a0b-ab9f-fd1ecc81458f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "8.77715414835226e-8*exp(-1.04979682849682*x)/(2.51606683299321e-5 + exp(-1.04979682849682*x))**2\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "9acfb2f8-c27f-4f6b-81d8-dc318f10a050", "metadata": {}, "source": [ "#### Man6" ] }, { "cell_type": "code", "execution_count": 17, "id": "36045d85-fb5c-4729-9ee6-dd7c55eb5a5b", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4d82d39252c1466f98cf678dc251329d", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "86d343778e29476da58c4d2b118a6ff8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'Man6'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 18, "id": "9fec7a0e-a138-48a4-9278-0db843b797c8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.53674532320441e-5/(x**3.63015880132957*(x**(-2.63015880132957) + 0.000730149475676811)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "8d6e08fe-495c-4237-8b6e-28e360b3c892", "metadata": {}, "source": [ "#### Man5" ] }, { "cell_type": "code", "execution_count": 19, "id": "cd31847f-25be-4188-b141-00368acf108a", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a63fdb91e41b479b9627f55a59d04518", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "80ba35fd0156485fb711d5e64c9f801a", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'Man5'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 20, "id": "ea5c8045-9543-4064-9090-16c5283568a1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "7.82512472492164e-5/(x**3.57898807718615*(x**(-2.57898807718615) + 1.48099279331054e-5)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "0e68dce7-c5a7-4f11-b898-fd9e243c69a7", "metadata": {}, "source": [ "#### G0-GlcNAc" ] }, { "cell_type": "code", "execution_count": 21, "id": "b2a0c21c-b224-472e-9971-6cecf5023b12", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6bb30f81c22b4989b9b5cf5135f0d376", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "81f666d5888147538254b0e3c090238c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G0-GlcNAc'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 23, "id": "0dcb1c81-ee19-40e0-b89e-ae41e3dfbb29", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.20970296762035e-6/(x**3.9857986207357*(x**(-2.9857986207357) - 8.91079207537524e-5)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "5db0a4e4-493a-46bc-91f4-00a1ab3125f5", "metadata": {}, "source": [ "#### G0F" ] }, { "cell_type": "code", "execution_count": 25, "id": "63af96b0-77c2-4037-8df6-1d52a9d83fd9", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "cfaf844eda31410689fa361f570841a1", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "eb5936183d0b4c2385b3906f100cb0d9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G0F'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 26, "id": "d4b7d955-71c8-4071-a4f5-01e2fd7352d3", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.00106965824298514/(x**4.9728043624615*(x**(-3.9728043624615) + 9.42588445419789e-5)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "1cba7fce-9749-4ae8-9fe6-8556e7cfea20", "metadata": {}, "source": [ "#### G1a/b" ] }, { "cell_type": "code", "execution_count": 27, "id": "6a9bf623-8a9b-48f2-91aa-135f5c212ae8", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e8b157d7226a45fa8b009be5b1c9c10b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "049b6366e5f2437da6c86c84a099f769", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G1a/b'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 28, "id": "7860d7c9-d605-490e-944a-5655a66a07d9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.81526914872763e-6*(17.2297568100532*exp(-0.514316349820139*x) + 0.0374374429383844*exp(-0.0374374429383844*x))/(exp(-0.514316349820139*x) + 0.0298504706415847*exp(-0.0374374429383844*x))**2\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "ba3cc0b7-53bd-4939-8112-b8ca6ed6af7d", "metadata": {}, "source": [ "#### G1Fa/b" ] }, { "cell_type": "code", "execution_count": 29, "id": "e5d44302-8964-442b-87b3-24c2a49e3706", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c8ae026536a0451b88bbcdb15024a9ac", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "31f23d2af5d0445fa24c00b782497cf7", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G1Fa/b'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 30, "id": "5d596d14-37df-49e5-a36f-0604f57c516f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.00238522708675479/(x**4.03582275597052*(x**(-3.03582275597052) + 0.00176704968125774)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "b36c4389-1764-427e-8e5c-411e58f20881", "metadata": {}, "source": [ "#### G0" ] }, { "cell_type": "code", "execution_count": 31, "id": "25f4ef21-bd96-4b12-bc84-3d833d364b15", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a685568161b345c1aa6b7076eaa68e79", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5fdfd815bf9d47d1a8123df93bebe8c0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G0'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 32, "id": "e5f74e6d-4788-4a32-a217-a47659faaa2f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "9.41441888399936e-5/(x**4.140653237447*(x**(-3.140653237447) + 0.000437837528509634)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "cb0f8078-5ed6-4a78-be44-f93d61ace2b9", "metadata": {}, "source": [ "#### G0F-GlcNAc" ] }, { "cell_type": "code", "execution_count": 33, "id": "7eb71af7-a615-49c2-8601-84b6371901a1", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "463f1091842a4ebba69a1a5d331f5c45", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2b64d17b7bc24f0e9aa82c7c1519bc0b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G0F-GlcNAc'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 34, "id": "628e7168-d57d-4468-bdb4-b6ad0dc9cec3", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.38019843466825e-5/(x**4.28619872306324*(x**(-3.28619872306324) + 4.59783223097008e-5)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "b5f7e453-62cc-440b-8f71-ead183d2bde6", "metadata": {}, "source": [ "#### G0F+GlcNAc" ] }, { "cell_type": "code", "execution_count": 35, "id": "e6dbab8b-9163-4e00-bae0-619e5ade00b4", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b25270f7fc2e457b900ff0e55c535bd8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ef17eda1078544ae841a3dd844f4bd66", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G0F+GlcNAc'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 36, "id": "ab203302-e7e9-4518-aa1b-bd3f62c6c5c1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2.51813290846332e-5*exp(-0.504806299908199*x)/(0.00380914878275068 + exp(-0.504806299908199*x))**2\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "81f01dd9-e4f6-4b16-86ac-acbddbe566c6", "metadata": {}, "source": [ "#### G2F" ] }, { "cell_type": "code", "execution_count": 37, "id": "5bd30b97-ea44-4c72-aaaa-4f86b57dae4b", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "35e4caec839646c4b01296bd6d00ebec", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "bb4676bea5d844838deaa3c0291d7828", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'G2F'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 38, "id": "a0937528-c799-41ca-91bb-c74dff4c0a27", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.000585155264255064/(x**3.59120437541022*(x**(-2.59120437541022) + 0.00854648647909327)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "d2bcc862-2e65-4ef1-b8a0-beab8a7f6963", "metadata": {}, "source": [ "#### A1G1F" ] }, { "cell_type": "code", "execution_count": 39, "id": "6a0141a5-3d19-4983-969b-27bcf5938988", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "22092b8424ca4b86b2d6f05b149128b0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c1526403d2824e4182bfc1e955244705", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'A1G1F'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 40, "id": "b5bb3921-35d8-4eb6-81f2-adf2d4721dc6", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.04061189355436e-5/(x**4.70728372947352*(x**(-3.70728372947352) + 0.000396022275776027)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "6d405214-338f-4672-a999-81417338ada2", "metadata": {}, "source": [ "#### A1G2F" ] }, { "cell_type": "code", "execution_count": 41, "id": "0ea78309-2f60-4404-a5cc-3a0724ae4190", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e7cab56c5e934ba6bb7605d93b59d668", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HBox(children=(Dropdown(description='Model:', options=('Polynomial', 'Exponential', 'Power', 'L…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "30dc186750ea44588f7ddfc8b0a76098", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frac_col = 'A1G2F'\n", "fit_fracs.fit_jupyter(frac_col)" ] }, { "cell_type": "code", "execution_count": 42, "id": "f230236b-8cad-424f-ae99-0fcf3fc2fcfb", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.000116773396805464/(x**3.22003059056402*(x**(-2.22003059056402) + 0.00621613842908323)**2)\n" ] } ], "source": [ "smoothed_data['Fit_Concentrations'][frac_col] = fit_fracs.get_fitmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)\n", "smoothed_data['Diff_Concentrations'][frac_col] = fit_fracs.get_diffmodel(fit_fracs.current_stats['params'])(retrieve_timepoints)" ] }, { "cell_type": "markdown", "id": "39ea3eb1-c808-4f97-9b04-b1f3e85637e9", "metadata": {}, "source": [ "# Summary" ] }, { "cell_type": "code", "execution_count": 43, "id": "a510eb04-c173-46e8-854c-87b8a2a6cbd5", "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", "
VCD (1E6 VC/mL)fit_VCD (1E6 VC/mL)diff_VCD (1E6 VC/mL)
Time (WD)
10.7841380.8120270.435732
21.2653091.3742600.705857
32.1008692.2568441.073020
43.6014403.5322641.472161
55.2148835.1564311.735699
67.1921786.8935911.675505
78.1657858.3914121.275581
89.2805729.3965390.731072
99.7868359.8772300.252563
109.8696989.953180-0.074785
119.9525539.773722-0.264768
129.7876219.454708-0.361261
139.1114619.069461-0.402502
148.3537078.659642-0.413579
\n", "
" ], "text/plain": [ " VCD (1E6 VC/mL) fit_VCD (1E6 VC/mL) diff_VCD (1E6 VC/mL)\n", "Time (WD) \n", "1 0.784138 0.812027 0.435732\n", "2 1.265309 1.374260 0.705857\n", "3 2.100869 2.256844 1.073020\n", "4 3.601440 3.532264 1.472161\n", "5 5.214883 5.156431 1.735699\n", "6 7.192178 6.893591 1.675505\n", "7 8.165785 8.391412 1.275581\n", "8 9.280572 9.396539 0.731072\n", "9 9.786835 9.877230 0.252563\n", "10 9.869698 9.953180 -0.074785\n", "11 9.952553 9.773722 -0.264768\n", "12 9.787621 9.454708 -0.361261\n", "13 9.111461 9.069461 -0.402502\n", "14 8.353707 8.659642 -0.413579" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['VCD'])" ] }, { "cell_type": "code", "execution_count": 44, "id": "d22891e4-0fc5-4b65-b08c-dc27a4b248c6", "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", "
Titer (g/L)fit_Titer (g/L)diff_Titer (g/L)
Time (WD)
10.0388940.0007850.002834
20.0625560.0095760.017251
30.1000220.0410690.048891
40.1631210.1137370.099474
50.2696000.2450770.165003
60.4293200.4452400.234872
70.6600260.7113720.294462
81.0386211.0264310.331127
91.3482011.3641660.339716
101.6991891.6975610.323568
112.0265162.0058440.291056
122.3400392.2772260.251123
132.4406042.5079080.210547
142.7068032.6994580.173308
\n", "
" ], "text/plain": [ " Titer (g/L) fit_Titer (g/L) diff_Titer (g/L)\n", "Time (WD) \n", "1 0.038894 0.000785 0.002834\n", "2 0.062556 0.009576 0.017251\n", "3 0.100022 0.041069 0.048891\n", "4 0.163121 0.113737 0.099474\n", "5 0.269600 0.245077 0.165003\n", "6 0.429320 0.445240 0.234872\n", "7 0.660026 0.711372 0.294462\n", "8 1.038621 1.026431 0.331127\n", "9 1.348201 1.364166 0.339716\n", "10 1.699189 1.697561 0.323568\n", "11 2.026516 2.005844 0.291056\n", "12 2.340039 2.277226 0.251123\n", "13 2.440604 2.507908 0.210547\n", "14 2.706803 2.699458 0.173308" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['Titer'])" ] }, { "cell_type": "code", "execution_count": 45, "id": "73d42fb1-bfae-46b2-af51-71ad63e86e43", "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", "
A1G1FA1G2FG0G0FG0F+GlcNAcG0F-GlcNAcG0-GlcNAcG1a/bG2FMan5Man6Man7G1Fa/b
Time (WD)
50.0032730.0068890.0177140.5964770.0010610.0037140.0006940.0021730.0352550.0083950.0011830.0003950.319791
80.0032730.0023230.0149890.7373780.0022810.0034290.0004880.0015610.0162770.0060520.001187-0.0000180.208716
100.0028050.0029520.0150320.7784740.0029890.0044490.0006840.0013220.0120440.0065970.0011410.0010890.170732
120.0023380.0022340.0153940.7995110.0033710.0054290.0009000.0012490.0097080.0079280.0011090.0010960.149998
140.0023380.0020620.0159700.8097850.0039850.0071430.0013730.0012150.0085400.0099610.0012850.0012950.136380
\n", "
" ], "text/plain": [ " A1G1F A1G2F G0 G0F G0F+GlcNAc G0F-GlcNAc \\\n", "Time (WD) \n", "5 0.003273 0.006889 0.017714 0.596477 0.001061 0.003714 \n", "8 0.003273 0.002323 0.014989 0.737378 0.002281 0.003429 \n", "10 0.002805 0.002952 0.015032 0.778474 0.002989 0.004449 \n", "12 0.002338 0.002234 0.015394 0.799511 0.003371 0.005429 \n", "14 0.002338 0.002062 0.015970 0.809785 0.003985 0.007143 \n", "\n", " G0-GlcNAc G1a/b G2F Man5 Man6 Man7 \\\n", "Time (WD) \n", "5 0.000694 0.002173 0.035255 0.008395 0.001183 0.000395 \n", "8 0.000488 0.001561 0.016277 0.006052 0.001187 -0.000018 \n", "10 0.000684 0.001322 0.012044 0.006597 0.001141 0.001089 \n", "12 0.000900 0.001249 0.009708 0.007928 0.001109 0.001096 \n", "14 0.001373 0.001215 0.008540 0.009961 0.001285 0.001295 \n", "\n", " G1Fa/b \n", "Time (WD) \n", "5 0.319791 \n", "8 0.208716 \n", "10 0.170732 \n", "12 0.149998 \n", "14 0.136380 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['Fractions'])" ] }, { "cell_type": "code", "execution_count": 46, "id": "f0d4f45c-75b5-43c7-8f46-cbace641e437", "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", "
A1G1FA1G2FG0G0FG0F+GlcNAcG0F-GlcNAcG0-GlcNAcG1a/bG2FMan5Man6Man7G1Fa/b
Time (WD)
50.0008820.0018570.0047760.1608110.0002860.0010010.0001870.0005860.0095050.0022630.0003190.0001060.086216
80.0033990.0024130.0155680.7658560.0023690.0035610.0005070.0016210.0169060.0062850.001233-0.0000190.216777
100.0047670.0050160.0255421.3227740.0050790.0075600.0011620.0022460.0204650.0112100.0019400.0018500.290106
120.0054700.0052270.0360231.8708870.0078870.0127030.0021050.0029230.0227170.0185510.0025940.0025640.351002
140.0063280.0055830.0432272.1919280.0107870.0193340.0037160.0032880.0231160.0269620.0034770.0035040.369154
\n", "
" ], "text/plain": [ " A1G1F A1G2F G0 G0F G0F+GlcNAc G0F-GlcNAc \\\n", "Time (WD) \n", "5 0.000882 0.001857 0.004776 0.160811 0.000286 0.001001 \n", "8 0.003399 0.002413 0.015568 0.765856 0.002369 0.003561 \n", "10 0.004767 0.005016 0.025542 1.322774 0.005079 0.007560 \n", "12 0.005470 0.005227 0.036023 1.870887 0.007887 0.012703 \n", "14 0.006328 0.005583 0.043227 2.191928 0.010787 0.019334 \n", "\n", " G0-GlcNAc G1a/b G2F Man5 Man6 Man7 \\\n", "Time (WD) \n", "5 0.000187 0.000586 0.009505 0.002263 0.000319 0.000106 \n", "8 0.000507 0.001621 0.016906 0.006285 0.001233 -0.000019 \n", "10 0.001162 0.002246 0.020465 0.011210 0.001940 0.001850 \n", "12 0.002105 0.002923 0.022717 0.018551 0.002594 0.002564 \n", "14 0.003716 0.003288 0.023116 0.026962 0.003477 0.003504 \n", "\n", " G1Fa/b \n", "Time (WD) \n", "5 0.086216 \n", "8 0.216777 \n", "10 0.290106 \n", "12 0.351002 \n", "14 0.369154 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['Concentrations'])" ] }, { "cell_type": "code", "execution_count": 47, "id": "ff6a239c-2891-4cb0-984c-5ac0de3598be", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
A1G1FA1G2FG0G0FG0F+GlcNAcG0F-GlcNAcG0-GlcNAcG1a/bG2FMan5Man6Man7G1Fa/b
10.0000030.0000520.0000300.0002690.0000820.0000040.0000010.0000970.0002240.0000300.0000062.388571e-070.000784
20.0000360.0002380.0002630.0042210.0001350.0000410.0000090.0001580.0012940.0001810.0000366.823406e-070.006352
30.0001610.0005630.0009320.0210110.0002230.0001550.0000290.0002530.0033920.0005160.0001041.948752e-060.021022
40.0004490.0010060.0022550.0648690.0003650.0003980.0000680.0003960.0062580.0010830.0002185.561665e-060.047231
50.0009490.0015340.0043970.1524740.0005940.0008250.0001330.0006010.0094120.0019240.0003831.584083e-050.084312
60.0016510.0021090.0074270.2977080.0009560.0014900.0002310.0008750.0124240.0030780.0006024.486123e-050.128615
70.0024790.0026950.0112890.5047840.0015110.0024470.0003700.0012090.0150490.0045770.0008701.250369e-040.175136
80.0033230.0032660.0158130.7635910.0023270.0037400.0005590.0015810.0172170.0064530.0011823.339065e-040.219469
90.0040920.0038040.0207461.0514930.0034530.0054030.0008110.0019570.0189540.0087330.0015298.039687e-040.258881
100.0047400.0042970.0258151.3413890.0048760.0074550.0011390.0023060.0203270.0114450.0019011.584894e-030.292310
110.0052580.0047420.0307741.6106770.0064910.0099000.0015620.0026140.0214070.0146110.0022882.401272e-030.319840
120.0056610.0051390.0354391.8459680.0081120.0127210.0021060.0028770.0222600.0182540.0026792.929413e-030.342132
130.0059700.0054900.0396952.0428130.0095530.0158830.0028070.0031030.0229370.0223930.0030663.173732e-030.360037
140.0062050.0057990.0434902.2028360.0107010.0193360.0037170.0033010.0234780.0270470.0034423.269164e-030.374388
\n", "
" ], "text/plain": [ " A1G1F A1G2F G0 G0F G0F+GlcNAc G0F-GlcNAc G0-GlcNAc \\\n", "1 0.000003 0.000052 0.000030 0.000269 0.000082 0.000004 0.000001 \n", "2 0.000036 0.000238 0.000263 0.004221 0.000135 0.000041 0.000009 \n", "3 0.000161 0.000563 0.000932 0.021011 0.000223 0.000155 0.000029 \n", "4 0.000449 0.001006 0.002255 0.064869 0.000365 0.000398 0.000068 \n", "5 0.000949 0.001534 0.004397 0.152474 0.000594 0.000825 0.000133 \n", "6 0.001651 0.002109 0.007427 0.297708 0.000956 0.001490 0.000231 \n", "7 0.002479 0.002695 0.011289 0.504784 0.001511 0.002447 0.000370 \n", "8 0.003323 0.003266 0.015813 0.763591 0.002327 0.003740 0.000559 \n", "9 0.004092 0.003804 0.020746 1.051493 0.003453 0.005403 0.000811 \n", "10 0.004740 0.004297 0.025815 1.341389 0.004876 0.007455 0.001139 \n", "11 0.005258 0.004742 0.030774 1.610677 0.006491 0.009900 0.001562 \n", "12 0.005661 0.005139 0.035439 1.845968 0.008112 0.012721 0.002106 \n", "13 0.005970 0.005490 0.039695 2.042813 0.009553 0.015883 0.002807 \n", "14 0.006205 0.005799 0.043490 2.202836 0.010701 0.019336 0.003717 \n", "\n", " G1a/b G2F Man5 Man6 Man7 G1Fa/b \n", "1 0.000097 0.000224 0.000030 0.000006 2.388571e-07 0.000784 \n", "2 0.000158 0.001294 0.000181 0.000036 6.823406e-07 0.006352 \n", "3 0.000253 0.003392 0.000516 0.000104 1.948752e-06 0.021022 \n", "4 0.000396 0.006258 0.001083 0.000218 5.561665e-06 0.047231 \n", "5 0.000601 0.009412 0.001924 0.000383 1.584083e-05 0.084312 \n", "6 0.000875 0.012424 0.003078 0.000602 4.486123e-05 0.128615 \n", "7 0.001209 0.015049 0.004577 0.000870 1.250369e-04 0.175136 \n", "8 0.001581 0.017217 0.006453 0.001182 3.339065e-04 0.219469 \n", "9 0.001957 0.018954 0.008733 0.001529 8.039687e-04 0.258881 \n", "10 0.002306 0.020327 0.011445 0.001901 1.584894e-03 0.292310 \n", "11 0.002614 0.021407 0.014611 0.002288 2.401272e-03 0.319840 \n", "12 0.002877 0.022260 0.018254 0.002679 2.929413e-03 0.342132 \n", "13 0.003103 0.022937 0.022393 0.003066 3.173732e-03 0.360037 \n", "14 0.003301 0.023478 0.027047 0.003442 3.269164e-03 0.374388 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['Fit_Concentrations'])" ] }, { "cell_type": "code", "execution_count": 48, "id": "48702831-6aa0-4672-8eba-acddcc18bf98", "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
A1G1FA1G2FG0G0FG0F+GlcNAcG0F-GlcNAcG0-GlcNAcG1a/bG2FMan5Man6Man7G1Fa/b
10.0000100.0001150.0000940.0010690.0000410.0000140.0000030.0000480.0005750.0000780.0000152.507334e-070.002377
20.0000670.0002570.0004120.0083730.0000680.0000670.0000130.0000760.0015950.0002340.0000477.161719e-070.009503
30.0001950.0003890.0009620.0276200.0001110.0001700.0000290.0001170.0025540.0004430.0000902.044594e-060.020267
40.0003890.0004920.0017120.0629650.0001790.0003260.0000510.0001720.0030940.0006980.0001395.828847e-060.032039
50.0006090.0005580.0025850.1146830.0002860.0005370.0000800.0002390.0031400.0009920.0001921.655038e-050.041484
60.0007830.0005860.0034660.1765780.0004470.0008030.0001170.0003070.0028430.0013210.0002444.645938e-050.046252
70.0008540.0005830.0042300.2358600.0006750.0011180.0001630.0003590.0023980.0016820.0002911.263242e-040.046037
80.0008180.0005570.0047740.2778310.0009660.0014730.0002180.0003790.0019430.0020740.0003313.153108e-040.042175
90.0007120.0005160.0050460.2932920.0012830.0018560.0002870.0003660.0015430.0024920.0003616.398031e-040.036481
100.0005820.0004700.0050510.2826540.0015450.0022500.0003720.0003300.0012150.0029350.0003818.702574e-040.030401
110.0004570.0004210.0048370.2537020.0016530.0026370.0004790.0002850.0009570.0034010.0003916.992117e-040.024775
120.0003520.0003730.0044740.2161920.0015580.0029990.0006160.0002430.0007570.0038880.0003913.642221e-040.019954
130.0002690.0003290.0040300.1778210.0013040.0033170.0007950.0002100.0006030.0043940.0003831.496321e-040.015997
140.0002050.0002890.0035590.1430350.0009880.0035780.0010370.0001870.0004840.0049170.0003695.556953e-050.012826
\n", "
" ], "text/plain": [ " A1G1F A1G2F G0 G0F G0F+GlcNAc G0F-GlcNAc G0-GlcNAc \\\n", "1 0.000010 0.000115 0.000094 0.001069 0.000041 0.000014 0.000003 \n", "2 0.000067 0.000257 0.000412 0.008373 0.000068 0.000067 0.000013 \n", "3 0.000195 0.000389 0.000962 0.027620 0.000111 0.000170 0.000029 \n", "4 0.000389 0.000492 0.001712 0.062965 0.000179 0.000326 0.000051 \n", "5 0.000609 0.000558 0.002585 0.114683 0.000286 0.000537 0.000080 \n", "6 0.000783 0.000586 0.003466 0.176578 0.000447 0.000803 0.000117 \n", "7 0.000854 0.000583 0.004230 0.235860 0.000675 0.001118 0.000163 \n", "8 0.000818 0.000557 0.004774 0.277831 0.000966 0.001473 0.000218 \n", "9 0.000712 0.000516 0.005046 0.293292 0.001283 0.001856 0.000287 \n", "10 0.000582 0.000470 0.005051 0.282654 0.001545 0.002250 0.000372 \n", "11 0.000457 0.000421 0.004837 0.253702 0.001653 0.002637 0.000479 \n", "12 0.000352 0.000373 0.004474 0.216192 0.001558 0.002999 0.000616 \n", "13 0.000269 0.000329 0.004030 0.177821 0.001304 0.003317 0.000795 \n", "14 0.000205 0.000289 0.003559 0.143035 0.000988 0.003578 0.001037 \n", "\n", " G1a/b G2F Man5 Man6 Man7 G1Fa/b \n", "1 0.000048 0.000575 0.000078 0.000015 2.507334e-07 0.002377 \n", "2 0.000076 0.001595 0.000234 0.000047 7.161719e-07 0.009503 \n", "3 0.000117 0.002554 0.000443 0.000090 2.044594e-06 0.020267 \n", "4 0.000172 0.003094 0.000698 0.000139 5.828847e-06 0.032039 \n", "5 0.000239 0.003140 0.000992 0.000192 1.655038e-05 0.041484 \n", "6 0.000307 0.002843 0.001321 0.000244 4.645938e-05 0.046252 \n", "7 0.000359 0.002398 0.001682 0.000291 1.263242e-04 0.046037 \n", "8 0.000379 0.001943 0.002074 0.000331 3.153108e-04 0.042175 \n", "9 0.000366 0.001543 0.002492 0.000361 6.398031e-04 0.036481 \n", "10 0.000330 0.001215 0.002935 0.000381 8.702574e-04 0.030401 \n", "11 0.000285 0.000957 0.003401 0.000391 6.992117e-04 0.024775 \n", "12 0.000243 0.000757 0.003888 0.000391 3.642221e-04 0.019954 \n", "13 0.000210 0.000603 0.004394 0.000383 1.496321e-04 0.015997 \n", "14 0.000187 0.000484 0.004917 0.000369 5.556953e-05 0.012826 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(smoothed_data['Diff_Concentrations'])" ] }, { "cell_type": "markdown", "id": "6c8e8ce9-4520-43e2-b918-f82dfd9890d4", "metadata": {}, "source": [ "# Write to excel" ] }, { "cell_type": "code", "execution_count": 49, "id": "993f24b2-198f-4092-bd6c-14b365f164b9", "metadata": {}, "outputs": [], "source": [ "with pd.ExcelWriter(os.path.join(inputDir, 'Lee et al', 'medpH_processed.xlsx')) as writer:\n", " for k, v in smoothed_data.items():\n", " v.to_excel(writer, sheet_name=k)" ] }, { "cell_type": "code", "execution_count": null, "id": "fcb5300f-b5fe-48ef-aa59-16629456ddb0", "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.7" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }