{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Tutorial : Constructing an energy matrix using Linear regression and MCMC " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The code in this tutorial is released under the [MIT License](https://opensource.org/licenses/MIT). All the content in this notebook is under a [CC-by 4.0 License](https://creativecommons.org/licenses/by/4.0/). \n", "\n", "Created by Bill Ireland, Suzy Beleer and Manu Flores. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:34.400432Z", "start_time": "2019-11-27T22:55:30.721870Z" } }, "outputs": [], "source": [ "#Import basic stuff\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "from sklearn import linear_model\n", "\n", "#import the custom analysis software\n", "import scipy as sp\n", "import plot_informationfootprint as pli\n", "import seaborn as sns\n", "\n", "# Activate a setting that causes all plots to be inside the notebook rather than in pop-ups.\n", "%matplotlib inline\n", "# Get svg graphics from the notebook\n", "%config InlineBackend.figure_format = 'svg' " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will first load in a data set in a format accepted by the analysis software.\n", "\n", "During this experiment, we measure the frequencies of mutant promoters in the libraries via sequencing, which we label as 'ct_0'. We also measure the number mRNA counts produced by each mutant promoter via sequencing, which we label 'ct_1'. \n", "\n", "We then format the resulting dataset into a format usable by the data analysis software. The dataset must have the columns 'ct', 'ct_0', 'ct_1', and 'seq' where 'ct' is the total number of reads, and 'seq' is the sequence of the mutant promoter. " ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:34.411339Z", "start_time": "2019-11-27T22:55:34.404634Z" } }, "outputs": [], "source": [ "#We will declare the path where all the data for this notebook is stored. It can be downloaded from the\n", "#website under 'datasets' or from the github repo (in the datasets folder).\n", "path = '../MCMC/'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:34.482934Z", "start_time": "2019-11-27T22:55:34.415866Z" }, "scrolled": true }, "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", "
ctct_0ct_1seq
010.05.05.0AAACAAAAAAACACATGAACGTATCTACTTGGTTCAATATAAGGAT...
12.02.00.0AAACAAAAAAACACATGAACGTATCTACTTGGTTCAATATAAGGAT...
210.01.09.0AAACAAAAAAAGACAGGAACGTAATGACTGGGTGAAATATAATCAT...
39.09.00.0AAACAAAAAAAGACAGGAACGTAATTACTGGGTTAAATATTATCAT...
41.01.00.0AAACAAAAAAAGACAGGAACGTAATTACTGGGTTAAATATTATCAT...
\n", "
" ], "text/plain": [ " ct ct_0 ct_1 seq\n", "0 10.0 5.0 5.0 AAACAAAAAAACACATGAACGTATCTACTTGGTTCAATATAAGGAT...\n", "1 2.0 2.0 0.0 AAACAAAAAAACACATGAACGTATCTACTTGGTTCAATATAAGGAT...\n", "2 10.0 1.0 9.0 AAACAAAAAAAGACAGGAACGTAATGACTGGGTGAAATATAATCAT...\n", "3 9.0 9.0 0.0 AAACAAAAAAAGACAGGAACGTAATTACTGGGTTAAATATTATCAT...\n", "4 1.0 1.0 0.0 AAACAAAAAAAGACAGGAACGTAATTACTGGGTTAAATATTATCAT..." ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#we will look at the aphA gene in a low oxygen growth condition.\n", "genelabel = 'aphA'\n", "#We handle most data using the Pandas package, we will load in the target data set now.\n", "df = pd.io.parsers.read_csv(path + genelabel + 'Anaerodataset_alldone_with_large',delim_whitespace=True)\n", "#this is what the first few lines of a typical data set looks like. From the few sequences displayed below\n", "#Sequence 2 has the highest expression level as 9 mRNA counts were measured while only 1 library\n", "#count was found indicating its average expression is likely to be high.\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next we will define necessary functions and determine the wild type sequence of the gene." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:34.510096Z", "start_time": "2019-11-27T22:55:34.487702Z" }, "collapsed": true }, "outputs": [], "source": [ "#we have a file with all wild type sequences for our genes. We load it in now\n", "genedf = pd.io.parsers.read_csv(path +'wtsequences.csv')\n", "\n", "#we extract the wild type sequence for aphA from that file.\n", "wt = str(genedf.loc[genedf['name'] == genelabel,'geneseq'].tolist()[0])\n", "\n", "#we convert the wild type sequence to a list.\n", "wtlist = np.array(list(wt))\n", "\n", "def Compute_Least_Squares(raveledmat,batch):\n", " '''this is a simple linear regression function that will return the coefficients from the regression.\n", " In this case each coefficient represents the effect on gene expression of mutation of the corresponding base.\n", " We use sklearn to do this regression.'''\n", " clf = linear_model.LinearRegression()\n", " clf.fit(raveledmat,batch)\n", " emat = clf.coef_\n", " return emat" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Our goal is to determine the effect of mutation at each position. To do this we first need to parameterize each sequence by whether or not each base pair is mutated. This produces an array of dimensions NxL where N is the number of sequences and L is the length of each sequence." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:35.757844Z", "start_time": "2019-11-27T22:55:34.514822Z" }, "collapsed": true }, "outputs": [], "source": [ "#some basic parameters of our sequences\n", "taglength = 20 \n", "#total promoter length\n", "seqlength = len(df['seq'][0]) - taglength #160 bp\n", "#we create dictionaries that relate A,C,G,T to the number 1,2,3,4\n", "seq_dict,inv_dict = pli.choose_dict('dna')\n", "\n", "'''we initialize our array where we parameterize the sequence. There is one entry per base pair which\n", "is equal to 1 for mutated, or 0 for wild type.'''\n", "all_mutarr = np.zeros((len(df.index),seqlength))\n", "\n", "#We will now parameterize our sequences\n", "for i,row in df.iterrows():\n", " s = np.array(list(row['seq']))\n", " #clip off any sequence past the 160 bp mutated sequence length.\n", " s_clipped = s[:seqlength]\n", " #determine which bases are mutated\n", " all_mutarr[i,:seqlength] = (wtlist != s_clipped)\n", "\n", "#We will use the ratio of mRNA counts to DNA counts to regress against. We add a pseudocount of 1.\n", "thetarget = np.array((df['ct_0']+1)/(df['ct_1']+1))\n", "#We will center the mean to be 0.\n", "thetarget = thetarget - np.mean(thetarget)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We then need to fit the effect of mutation from the data. For illustration purposes we now show how this can be done using linear regression." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:35.817406Z", "start_time": "2019-11-27T22:55:35.760900Z" }, "collapsed": true }, "outputs": [], "source": [ "emat = Compute_Least_Squares(all_mutarr,thetarget)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can now plot the results. We will see the effect of mutation on expression." ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:36.891452Z", "start_time": "2019-11-27T22:55:35.820387Z" }, "scrolled": true }, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −120\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −100\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −80\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −60\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −40\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −20\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 20\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 40\n", " \n", " \n", " \n", " position\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 1\n", " \n", " \n", " \n", " Expression shift (A.U.)\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n" ], "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "fig,ax = plt.subplots(figsize=(10,2))\n", "ax.set_ylabel('Expression shift (A.U.)',fontname='DejaVu Sans',fontsize=12)\n", "ax.set_xlabel('position',fontname='DejaVu Sans',fontsize=12)\n", "plt.bar(range(-115,-115+seqlength),emat,color='r')\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will now convert the expression shift into an information footprint." ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:36.977751Z", "start_time": "2019-11-27T22:55:36.897062Z" }, "collapsed": true }, "outputs": [], "source": [ "'''The conversion script returns the information footprint smoothed with a window size = 3\n", "(the values are averaged with their neighbors), and also a variable called shiftcolors. Shiftcolors is\n", "a colorcoding scheme for showing whether mutation tends to increase gene expression (repressor like) or\n", "decrease gene expression (activator like).'''\n", "smoothinfo, shiftcolors = pli.main(emat)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "ExecuteTime": { "end_time": "2019-11-27T22:55:38.052707Z", "start_time": "2019-11-27T22:55:36.985613Z" } }, "outputs": [ { "data": { "image/svg+xml": [ "\n", "\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −120\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −100\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −80\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −60\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −40\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " −20\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 20\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 40\n", " \n", " \n", " \n", " position\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.00\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.05\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.10\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.15\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.20\n", " \n", " \n", " \n", " Information (bits)\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n" ], "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "fig,ax = plt.subplots(figsize=(10,2))\n", "ax.set_ylabel('Information (bits)',fontname='DejaVu Sans',fontsize=12)\n", "ax.set_xlabel('position',fontname='DejaVu Sans',fontsize=12)\n", "ax.bar(range(-114,43),np.abs(smoothinfo),color=shiftcolors)\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Determining the effect of mutation with a linear regression based method works well in many cases, and it has the advantage of having little computational cost. However, MCMC inference is a far more robust method, and so the MCMC method was used to generate all information footprints displayed in the paper. The MCMC inference can be run from the command line using the MPATHIC software, create by Justin Kinney. We ran all inference on the amazon cloud. The command is\n", "\n", "\n", "`mpathic learn_model -i data_file_name -o model_file_out_name -db database_file_out_name --iterations 300000 --thin 30 --initialize rand`\n", "\n", "Where:\n", "\n", "`-i` designates the input datafile name \n", "\n", "`-o` designates the output file name\n", "\n", "`-db` is the file name for saving all MCMC samples during the run\n", "\n", "`--iterations` is the number of MCMC iterations to run\n", "\n", "`--initialize` is how to initialize the inference, doing it randomly allows you to check that nomatter where you start you will converge to the same answer.\n", "\n", "It is important to check that if you run multiple MCMC chains, you will converge to the same answer, even though you start in different places.\n", "\n", "In the above example for aphA, we can qualitatively examine the information footprint to determine possible binding site locations. We can see that the regions in -80 to -65, -60 to -50, -40 to -30, and -18 to -5 appear to be qualitatively important for binding. We can also use an automatic technique to identify these possible binding sites (this is explained in the automatic binding site tutorial), and we can identify the RNAP binding site by studying the binding preference of the sites (this is explained in the sequence logo tutorial). " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.9" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }