Compare commits
4 commits
747b28321f
...
a737cb8e3f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a737cb8e3f | ||
![]() |
0e7f8d2273 | ||
![]() |
57c6d310c3 | ||
![]() |
5f46255df8 |
|
@ -0,0 +1,875 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "3325951a33e219b4018ec2a3d92da174",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-5e22290104c842b6",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# You must run this cell, but you can ignore its contents.\n",
|
||||||
|
"\n",
|
||||||
|
"import hashlib\n",
|
||||||
|
"\n",
|
||||||
|
"def ads_hash(ty):\n",
|
||||||
|
" \"\"\"Return a unique string for input\"\"\"\n",
|
||||||
|
" ty_str = str(ty).encode()\n",
|
||||||
|
" m = hashlib.sha256()\n",
|
||||||
|
" m.update(ty_str)\n",
|
||||||
|
" return m.hexdigest()[:10]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "a5067aaf2a99b7decbc8c17d9ebd280e",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-9f70118929cfc07a",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"# Bayesian Statistics: Interactive Bayesian updating\n",
|
||||||
|
"\n",
|
||||||
|
"From https://github.com/NuclearTalent/Bayes2019/blob/master/topics/basics-of-bayesian-statistics/Bayesian_updating_coinflip_interactive.ipynb"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "ca64a684f3ba03b196e9255ca7592b89",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-f4d886aaea957b85",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## <a name=\"Python\">Python/Jupyter set up</a>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "143499ed0f4a1d70035ac46a55a0f3ab",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-8a69051f2683cc79",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import numpy as np\n",
|
||||||
|
"\n",
|
||||||
|
"import scipy.stats as stats\n",
|
||||||
|
"from scipy.stats import norm, uniform\n",
|
||||||
|
"\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"\n",
|
||||||
|
"import ipywidgets as widgets\n",
|
||||||
|
"from ipywidgets import HBox, VBox, Layout, Tab, Label, Checkbox, Button\n",
|
||||||
|
"from ipywidgets import FloatSlider, IntSlider, Play, Dropdown, HTMLMath \n",
|
||||||
|
"\n",
|
||||||
|
"from IPython.display import display\n",
|
||||||
|
"\n",
|
||||||
|
"import seaborn as sns\n",
|
||||||
|
"sns.set()\n",
|
||||||
|
"sns.set_context(\"talk\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "ee94303da91208f884b725bcdd5becf6",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-ef87f464e37e4cca",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## <a name=\"Updating\">Bayesian updating examples</a>\n",
|
||||||
|
"\n",
|
||||||
|
"$ \\newcommand{\\thetavec}{\\boldsymbol{\\theta}} \\newcommand{\\pr}{\\textrm{p}}$\n",
|
||||||
|
"Recall Bayes' theorem with $\\thetavec$ the vector of parameters we seek and information $I$ is kept implicit.\n",
|
||||||
|
"\n",
|
||||||
|
"$$\n",
|
||||||
|
" \\overbrace{\\pr(\\thetavec \\mid \\textrm{data},I)}^{\\textrm{posterior}} =\n",
|
||||||
|
" \\frac{\\color{red}{\\overbrace{\\pr(\\textrm{data} \\mid \\thetavec,I)}^{\\textrm{likelihood}}} \\times\n",
|
||||||
|
" \\color{blue}{\\overbrace{\\pr(\\thetavec \\mid I)}^{\\textrm{prior}}}}\n",
|
||||||
|
" {\\color{darkgreen}{\\underbrace{\\pr(\\textrm{data} \\mid I)}_{\\textrm{evidence}}}}\n",
|
||||||
|
"$$\n",
|
||||||
|
"\n",
|
||||||
|
"If we view the prior as the initial information we have about $\\thetavec$, summarized as a probability density function, then Bayes' theorem tells us how to <em>update</em> that information after observing some data: this is the posterior pdf. Here we will give some examples of how this plays out when tossing coins.\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "bc0be5ceec85b10c29143e1ad87f5ceb",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-4f86b9c7f450dfdc",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Determining the bias of a coin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "0e80c93cb3e2872a51c58fa678e7990f",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-f277b01772407ee0",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"The idea here is that we are observing successive flips of a coin, which is a proxy for any process that has a binary outcome. There is a definite true probability for getting heads, which we'll label $p_h$, but we don't know what it is. We start with a preconceived notion of the probability expressed in terms of a prior pdf for $p_h$, i.e., $\\pr(p_h)$. With each flip of the coin, we have more information, so our goal is to <em>update</em> our expectation of $p_h$, meaning we want the posterior $\\pr(p_h \\mid \\mbox{ num tosses, num heads})$. "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "c28b79b238bba84152b9e54b41ed109a",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-404c8f0599a0960c",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"#### Main code for coin-flipping UI"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"code_folding": [],
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "6d07721a47fc47504f2987268924f940",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-87f9a4135ca5602b",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Initial values (can be changed by widgets)\n",
|
||||||
|
"n_trials_max = 5000 # maximum number of coin tosses\n",
|
||||||
|
"prob_heads = 0.4 # p_h, the true probability of a heads\n",
|
||||||
|
"x = np.linspace(0, 1, 301) # mesh for posterior plots (enough so smooth)\n",
|
||||||
|
"\n",
|
||||||
|
"class Data():\n",
|
||||||
|
" \"\"\"Class to hold the array of heads and tails (1s and 0s) outcomes.\"\"\"\n",
|
||||||
|
" def __init__(self, prob_heads=0.5, n_trials_max=5000):\n",
|
||||||
|
" self._data = self.generate_data(prob_heads, n_trials_max)\n",
|
||||||
|
" \n",
|
||||||
|
" def generate_data(self, prob_heads, n_trials_max):\n",
|
||||||
|
" \"\"\"Generate an array of heads or tails, 1 or 0, for n_trials_max\n",
|
||||||
|
" independent tosses according to the Bernoulli distribution.\"\"\"\n",
|
||||||
|
" self._data = stats.bernoulli.rvs(prob_heads, size=n_trials_max)\n",
|
||||||
|
" \n",
|
||||||
|
" def heads_in_data_to_N(self, N):\n",
|
||||||
|
" \"\"\"Count how many heads in the first N elements of the data.\"\"\"\n",
|
||||||
|
" return self._data[:N].sum()\n",
|
||||||
|
"\n",
|
||||||
|
"coin_data = Data(prob_heads, n_trials_max) \n",
|
||||||
|
" \n",
|
||||||
|
"def update_plot(N=0, jump=1, recalculate_data=True, \n",
|
||||||
|
" prob_heads=0.5, n_trials_max=5000,\n",
|
||||||
|
" alpha_1=1., beta_1=1.,\n",
|
||||||
|
" alpha_2=30., beta_2=30.,\n",
|
||||||
|
" alpha_3=0.2, beta_3=0.3\n",
|
||||||
|
" ):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Make a new plot based on the current widget settings for the input\n",
|
||||||
|
" parameters.\n",
|
||||||
|
" \"\"\" \n",
|
||||||
|
" \n",
|
||||||
|
" font_size = 18\n",
|
||||||
|
" plt.rcParams.update({'font.size': font_size})\n",
|
||||||
|
" \n",
|
||||||
|
" fig = plt.figure(figsize=(12,5))\n",
|
||||||
|
" ax = fig.add_subplot(1, 1, 1)\n",
|
||||||
|
"\n",
|
||||||
|
" if recalculate_data:\n",
|
||||||
|
" coin_data.generate_data(prob_heads, n_trials_max)\n",
|
||||||
|
" recalculate_data_w.value = False\n",
|
||||||
|
"\n",
|
||||||
|
" heads = coin_data.heads_in_data_to_N(N) # add up the 1s (= # of heads)\n",
|
||||||
|
" # update using the conjugate prior, which is a beta pdf\n",
|
||||||
|
" y_1 = stats.beta.pdf(x, alpha_1 + heads, beta_1 + N - heads) \n",
|
||||||
|
" y_2 = stats.beta.pdf(x, alpha_2 + heads, beta_2 + N - heads) \n",
|
||||||
|
" y_3 = stats.beta.pdf(x, alpha_3 + heads, beta_3 + N - heads) \n",
|
||||||
|
"\n",
|
||||||
|
" # default y_3 distribution has two high max at endpoints for plot\n",
|
||||||
|
" y_max = np.max([y_1.max(), y_2.max()]) \n",
|
||||||
|
" \n",
|
||||||
|
" line1, = ax.plot(x, y_1, label=\"uniform prior\", color=\"blue\")\n",
|
||||||
|
" ax.fill_between(x, 0, y_1, color=\"blue\", alpha=0.1)\n",
|
||||||
|
" line2, = ax.plot(x, y_2, label=\"informative prior\", color=\"red\")\n",
|
||||||
|
" ax.fill_between(x, 0, y_2, color=\"red\", alpha=0.1)\n",
|
||||||
|
" line3, = ax.plot(x, y_3, label=\"anti prior\", color=\"green\")\n",
|
||||||
|
" ax.fill_between(x, 0, y_3, color=\"green\", alpha=0.1)\n",
|
||||||
|
" \n",
|
||||||
|
" ax.set_xlabel(\"$p_h$, probability of heads\") \n",
|
||||||
|
" ax.set_yticks([]) # turn off the plotting of ticks on the y-axis\n",
|
||||||
|
" ax.axvline(prob_heads, 0, 1.1*y_max, color=\"k\", linestyle=\"--\", lw=2)\n",
|
||||||
|
" ax.annotate(f'observe {N:d} tosses,\\n {heads:d} heads', \n",
|
||||||
|
" xy=(0.05,0.85), xycoords='axes fraction', \n",
|
||||||
|
" horizontalalignment='left',verticalalignment='top')\n",
|
||||||
|
" leg = ax.legend(loc='upper right')\n",
|
||||||
|
" leg.get_frame().set_alpha(0.4)\n",
|
||||||
|
" ax.autoscale(tight=True)\n",
|
||||||
|
"\n",
|
||||||
|
" \n",
|
||||||
|
"################### begin: text for help tabs ##################\n",
|
||||||
|
"# In HTML (could move this to an external file!)\n",
|
||||||
|
"overview_text = \\\n",
|
||||||
|
" r\"\"\"<p>Here we explore Bayesian updating for a coin flip. There is help \n",
|
||||||
|
" available under the other tabs.</p> \n",
|
||||||
|
" <ul>\n",
|
||||||
|
" <li>Bayes theorem tab: find out about Bayesian updating.\n",
|
||||||
|
" <li>Toss coin tab: find out what the controls do.\n",
|
||||||
|
" <li>Priors tab: change the three initial priors.\n",
|
||||||
|
" <li>Setup tab: change how the plots are made.\n",
|
||||||
|
" </ul> \n",
|
||||||
|
" \"\"\" \n",
|
||||||
|
"Bayes_text = \\\n",
|
||||||
|
" r\"\"\"\n",
|
||||||
|
" <p>Recall Bayes' theorem with $\\thetavec$ the vector of parameters \n",
|
||||||
|
" we seek and information $I$ is kept implicit.</p>\n",
|
||||||
|
"\n",
|
||||||
|
" $$\n",
|
||||||
|
" \\newcommand{\\thetavec}{\\boldsymbol{\\theta}}\n",
|
||||||
|
" \\overbrace{p(\\thetavec \\mid \\textrm{data},I)}^{\\textrm{posterior}} =\n",
|
||||||
|
" \\frac{\\color{red}{\\overbrace{p(\\textrm{data} \n",
|
||||||
|
" \\mid \\thetavec,I)}^{\\textrm{likelihood}}} \\times\n",
|
||||||
|
" \\color{blue}{\\overbrace{p(\\thetavec \\mid I)}^{\\textrm{prior}}}}\n",
|
||||||
|
" {\\color{darkgreen}{\\underbrace{p(\\textrm{data} \n",
|
||||||
|
" \\mid I)}_{\\textrm{evidence}}}}\n",
|
||||||
|
" $$\n",
|
||||||
|
"\n",
|
||||||
|
" <p>If we view the prior as the initial information we have about \n",
|
||||||
|
" $\\thetavec$, summarized as a probability density function, \n",
|
||||||
|
" then Bayes' theorem tells us how to <em>update</em> that \n",
|
||||||
|
" information after observing some data: this is the posterior pdf. \n",
|
||||||
|
" Here we will look at an example of how this plays out in practice:\n",
|
||||||
|
" flipping a (biased) coin.</p> \n",
|
||||||
|
"\n",
|
||||||
|
" <br>\n",
|
||||||
|
"\n",
|
||||||
|
" <p>The idea here is that we are observing successive flips of a coin, \n",
|
||||||
|
" which is a proxy for any process that has a binary outcome. \n",
|
||||||
|
" There is a definite true probability for getting heads, \n",
|
||||||
|
" which we'll label $p_h$, but we don't know what it is. \n",
|
||||||
|
" We start with a preconceived notion of the probability expressed \n",
|
||||||
|
" in terms of a prior pdf for $p_h$, i.e., $p(p_h)$. \n",
|
||||||
|
" With each flip of the coin, we have more information, so our goal is \n",
|
||||||
|
" to <em>update</em> our expectation of $p_h$, meaning we want the \n",
|
||||||
|
" posterior $p(p_h\\mid \\mbox{# tosses, # heads})$.</p> \n",
|
||||||
|
"\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
"toss_coin_text = \\\n",
|
||||||
|
" r\"\"\"\n",
|
||||||
|
" The graph shows three posteriors that result from three choices for\n",
|
||||||
|
" the prior (see the \"Priors\" tab for details) for the number of coin\n",
|
||||||
|
" tosses and observed heads shown at the upper left. The true probability\n",
|
||||||
|
" of a heads, $p_h$, is indicated by a dashed vertical line.\n",
|
||||||
|
" <ul>\n",
|
||||||
|
" <li>The \"Next\" button advances the number of coin tosses by the\n",
|
||||||
|
" amount shown after \"Jump\".\n",
|
||||||
|
" <li>The \"Jump\" pulldown is used to set how many observations are\n",
|
||||||
|
" made with each press of the \"Next\" button.\n",
|
||||||
|
" <li>The \"Reset\" button sets the number of observations back to zero.\n",
|
||||||
|
" <li>The probability of heads $p_h$ can be adjusted between 0 and\n",
|
||||||
|
" 1 using the slider.\n",
|
||||||
|
" </ul>\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
"setup_text = \\\n",
|
||||||
|
" r\"\"\"\n",
|
||||||
|
" Select the maximum number of trials possible. The calculations will\n",
|
||||||
|
" simply stop if you try to go higher.\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
"initial_text = \\\n",
|
||||||
|
" r\"\"\"\n",
|
||||||
|
" The graph shows three posteriors that result from three choices for\n",
|
||||||
|
" the prior (set under the \"Priors\" tab) for the number of coin\n",
|
||||||
|
" tosses and observed heads shown at the upper left. The true probability\n",
|
||||||
|
" of a heads, $p_h$, is indicated by a dashed vertical line.\n",
|
||||||
|
" Press \"Next\" to make observations, \"Reset\" to go back to zero.\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"initial_text_w = HTMLMath(value=initial_text)\n",
|
||||||
|
"\n",
|
||||||
|
"priors_text = \\\n",
|
||||||
|
" r\"\"\"\n",
|
||||||
|
" Hyperparameters for several different priors (all beta distributions).\n",
|
||||||
|
" Default prior 1 ($\\alpha_1 = 1$, $\\beta_1 = 1$) is uniform in [0,1].\n",
|
||||||
|
" Default prior 2 ($\\alpha_2 = 30$, $\\beta_2 = 30$) is concentrated \n",
|
||||||
|
" near 0.5 with very small tails.\n",
|
||||||
|
" Defalt prior 3 ($\\alpha_3 = .2$, $\\beta_3 = .2$) is peaked at the ends, \n",
|
||||||
|
" but allows for probability everywhere.\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"priors_text_w = HTMLMath(value=priors_text)\n",
|
||||||
|
"################### end: text for help tabs ##################\n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
" \n",
|
||||||
|
"################### begin: definitions of widgets ##################\n",
|
||||||
|
"recalculate_data_w = Checkbox(value=True) \n",
|
||||||
|
"prob_heads_w = FloatSlider(value=prob_heads, min=0., max=1., step=0.05,\n",
|
||||||
|
" description=r'true $p_h$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"n_trials_max_w = IntSlider(value=n_trials_max, min=100, max=10000, step=100,\n",
|
||||||
|
" description='max # trials:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
" \n",
|
||||||
|
"N_w = IntSlider(value=0, min=0, max=n_trials_max, step=1,\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"next_button_w = Button(description='Next', disabled=False,\n",
|
||||||
|
" layout=Layout(width='80px'), button_style='', \n",
|
||||||
|
" tooltip='Increment number of trials by jump')\n",
|
||||||
|
"reset_button_w = Button(description='Reset', disabled=False,\n",
|
||||||
|
" layout=Layout(width='80px'), button_style='', \n",
|
||||||
|
" tooltip='Reset number of trials to zero')\n",
|
||||||
|
"\n",
|
||||||
|
"jump_w = Dropdown(description='Jump:',\n",
|
||||||
|
" layout=Layout(width='150px'),\n",
|
||||||
|
" options=['1', '10', '100', '1000'],\n",
|
||||||
|
" value='1',\n",
|
||||||
|
" continuos_update=False,\n",
|
||||||
|
" disabled=False,)\n",
|
||||||
|
"\n",
|
||||||
|
"alpha_1_w = FloatSlider(value=1., min=0., max=2., step=0.1,\n",
|
||||||
|
" description=r'$\\alpha_1$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"alpha_1_w.style.handle_color = 'blue'\n",
|
||||||
|
"\n",
|
||||||
|
"alpha_2_w = FloatSlider(value=30., min=5., max=200., step=5.,\n",
|
||||||
|
" description=r'$\\alpha_2$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"alpha_2_w.style.handle_color = 'red'\n",
|
||||||
|
"alpha_3_w = FloatSlider(value=0.2, min=0., max=1., step=0.1,\n",
|
||||||
|
" description=r'$\\alpha_3$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"alpha_3_w.style.handle_color = 'green'\n",
|
||||||
|
"beta_1_w = FloatSlider(value=1., min=0.1, max=2., step=0.1,\n",
|
||||||
|
" description=r'$\\beta_1$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"beta_1_w.style.handle_color = 'blue'\n",
|
||||||
|
"beta_2_w = FloatSlider(value=30., min=5., max=200., step=5.,\n",
|
||||||
|
" description=r'$\\beta_2$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"beta_2_w.style.handle_color = 'red'\n",
|
||||||
|
"beta_3_w = FloatSlider(value=0.2, min=0., max=1., step=0.1,\n",
|
||||||
|
" description=r'$\\beta_3$:',\n",
|
||||||
|
" continuous_update=False)\n",
|
||||||
|
"beta_3_w.style.handle_color = 'green'\n",
|
||||||
|
"\n",
|
||||||
|
"# Widgets for the help section, which are HTMLMath boxes in a Tab widget\n",
|
||||||
|
"help_overview_w = HTMLMath(value=overview_text)\n",
|
||||||
|
"help_Bayes_w = HTMLMath(value=Bayes_text)\n",
|
||||||
|
"help_toss_coin_w = HTMLMath(value=toss_coin_text)\n",
|
||||||
|
"help_priors_w = HTMLMath(value=priors_text)\n",
|
||||||
|
"help_setup_w = HTMLMath(value=setup_text)\n",
|
||||||
|
"\n",
|
||||||
|
"################### end: definitions of widgets ##################\n",
|
||||||
|
"\n",
|
||||||
|
"################### begin: explicit widget callbacks ##################\n",
|
||||||
|
"def update_N(b):\n",
|
||||||
|
" \"\"\"Increment the number of trials N by the Jump value\"\"\"\n",
|
||||||
|
" N_w.value += int(jump_w.value)\n",
|
||||||
|
" \n",
|
||||||
|
"def reset_N(b):\n",
|
||||||
|
" \"\"\"Reset the number of trials N to zero\"\"\"\n",
|
||||||
|
" N_w.value = 0\n",
|
||||||
|
" \n",
|
||||||
|
"def update_prob_heads(b):\n",
|
||||||
|
" \"\"\"Change the value of prob_heads and regenerate data.\"\"\"\n",
|
||||||
|
" recalculate_data_w.value = True\n",
|
||||||
|
" N_w.max = n_trials_max_w.value\n",
|
||||||
|
"\n",
|
||||||
|
"next_button_w.on_click(update_N)\n",
|
||||||
|
"reset_button_w.on_click(reset_N)\n",
|
||||||
|
" \n",
|
||||||
|
"prob_heads_w.observe(update_prob_heads, 'value') \n",
|
||||||
|
"n_trials_max_w.observe(update_prob_heads, 'value') \n",
|
||||||
|
"\n",
|
||||||
|
"################### end: explicit widget callbacks ##################\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"# Organize the help as Tabs (which will be itself under the Help Tab)\n",
|
||||||
|
"help_max_height = '500px'\n",
|
||||||
|
"help_tab = Tab(children=[help_overview_w, help_Bayes_w, help_toss_coin_w, \n",
|
||||||
|
" help_priors_w, help_setup_w], \n",
|
||||||
|
" layout=Layout(width='95%', max_height=help_max_height))\n",
|
||||||
|
"help_tab.set_title(0, 'Overview')\n",
|
||||||
|
"help_tab.set_title(1, 'Bayes Theorem')\n",
|
||||||
|
"help_tab.set_title(2, 'Toss Coin')\n",
|
||||||
|
"help_tab.set_title(3, 'Priors')\n",
|
||||||
|
"help_tab.set_title(4, 'Set-up')\n",
|
||||||
|
" \n",
|
||||||
|
"# Boxes of widgets that will go into the top-level tabs\n",
|
||||||
|
"textbox0 = HBox([initial_text_w])\n",
|
||||||
|
"hbox0 = HBox([next_button_w, jump_w, reset_button_w, prob_heads_w])\n",
|
||||||
|
"textbox1 = HBox([priors_text_w])\n",
|
||||||
|
"hbox1a = HBox([alpha_1_w, alpha_2_w, alpha_3_w])\n",
|
||||||
|
"hbox1b = HBox([beta_1_w, beta_2_w, beta_3_w])\n",
|
||||||
|
"hbox2 = HBox([n_trials_max_w])\n",
|
||||||
|
"hbox3 = HBox([help_tab])\n",
|
||||||
|
"\n",
|
||||||
|
"# We'll set up Tabs to organize the controls. The Tab contents are declared\n",
|
||||||
|
"# as tab0, tab1, ... (probably should make this a list) and the overall Tab\n",
|
||||||
|
"# is called tab (so its children are tab0, tab1, ...).\n",
|
||||||
|
"tab_height = '70px' # Fixed minimum height for all tabs. Specify another way?\n",
|
||||||
|
"tab0 = VBox([textbox0, hbox0], layout=Layout(min_height=tab_height))\n",
|
||||||
|
"tab1 = VBox([textbox1, hbox1a, hbox1b], layout=Layout(min_height=tab_height))\n",
|
||||||
|
"tab2 = VBox([hbox2], layout=Layout(min_height=tab_height))\n",
|
||||||
|
"tab3 = VBox([hbox3], layout=Layout(min_height=tab_height))\n",
|
||||||
|
"\n",
|
||||||
|
"tab = Tab(children=[tab0, tab1, tab2, tab3])\n",
|
||||||
|
"tab.set_title(0, 'Toss Coin')\n",
|
||||||
|
"tab.set_title(1, 'Priors')\n",
|
||||||
|
"tab.set_title(2, 'Set-up')\n",
|
||||||
|
"tab.set_title(3, 'Help')\n",
|
||||||
|
"\n",
|
||||||
|
"plot_out = widgets.interactive_output(update_plot,\n",
|
||||||
|
" dict(\n",
|
||||||
|
" N=N_w,\n",
|
||||||
|
" jump=jump_w,\n",
|
||||||
|
" recalculate_data=recalculate_data_w,\n",
|
||||||
|
" prob_heads=prob_heads_w,\n",
|
||||||
|
" n_trials_max=n_trials_max_w,\n",
|
||||||
|
" alpha_1=alpha_1_w, beta_1=beta_1_w,\n",
|
||||||
|
" alpha_2=alpha_2_w, beta_2=beta_2_w,\n",
|
||||||
|
" alpha_3=alpha_3_w, beta_3=beta_3_w,\n",
|
||||||
|
" )\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
"UI_box = VBox([tab, plot_out]);"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "b9da5467093dc4eeb39025b393179ea9",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-a1fc76cad29d324e",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"#### User-interface for coin-flipping \n",
|
||||||
|
"\n",
|
||||||
|
"Take a look at the information under the `Help` tab to find out about what the controls do, what the priors are, etc. "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "99d9d53aff8a703be280467ce78bbf82",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-0f08b3f96e873a87",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"display(UI_box);"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "b29383ee67d53b63c4cbb69abe47af98",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-9fa43fdc4a161ce2",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Questions and tasks relating to priors and dealing with uncertainty: \n",
|
||||||
|
"* *What prior would you choose? How does this affect how long it takes you to arrive at the correct conclusion?* Note that the answer to this question may be $p_H$ dependent.\n",
|
||||||
|
"* *What would your standard be for deciding the coin was so unfair that you would walk away? That you'd call the police? That you'd try and publish the fact that you found an unfair coin in a scientific journal?* Hint: for the last one try thinking in terms of a \"p value\". If you don't know what that mean google \"hypothesis testing\".\n",
|
||||||
|
"* *What if you were **sure** the coin was unfair before you started? (E.g. you saw the person doctoring it.) What prior would you choose then? What happens to the posterior in this case?* This one may be best answered without any hitting of shift-return.....\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "c36a35795f81d0b713eb41195a27dcfe",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-6481ce022b1d1783",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q1 With the informative prior and no coin tosses, what is the mode of the posterior distribution? Put this in the variable `posterior_informative_0_0`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "21d73d3e155ed22a4c467afbd07c8b72",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-998c8286b5041f52",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "062137cf6cecb5065a2ed78fb13669c1",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-11199ecf37da5d78",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"assert ads_hash(int(np.round(posterior_informative_0_0*1000)))=='0604cd3138'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "08a9885dade942dbc73d994acbb3541c",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-8c2f2035bb2dc08d",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q2 After one toss but 0 heads and with a uniform prior distribution, what is the mode of the posterior distribution?\n",
|
||||||
|
"\n",
|
||||||
|
"Put this in the variable `uniform_informative_0_1`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "5187bbe185d9286aca9e797df50fc956",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-6f48bd0fc37a2c47",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "d11e74c40fbbcb325a0ed85e23a2fe48",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-ae2d2a33c719a214",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"assert ads_hash(int(np.round(uniform_informative_0_1*1000)))=='5feceb66ff'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "5e0f03f057c975d6851b32a5546322ba",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-c716c72bac26cd85",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q3 After one toss but 0 heads and with the \"anti\" prior distribution, what is the mode of the posterior distribution?\n",
|
||||||
|
"\n",
|
||||||
|
"Put this in the variable `anti_informative_0_1`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "649ebce89cea73418a2b352c47c16f4f",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-169a6bd947a7285e",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "3c7d52214605fe66a0a6f01124d84661",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-9eb8a9dbc2f2b809",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"assert ads_hash(int(np.round(anti_informative_0_1*1000))-42)=='fec80006df'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "6a37b994d6eefa0e0cdc237e728994ef",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-bad4ca51b288966b",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q4 How many tosses does it take for the posterior distributions to be approximately centered around the true value of $p_h$ for all prior distributions?\n",
|
||||||
|
"\n",
|
||||||
|
"Put this into the variable `n_to_converge`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "76c8e0cbfe5575221e2caa0216e2619d",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-a48da985862a2d34",
|
||||||
|
"locked": false,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
|
@ -0,0 +1,880 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "6c0d0187eb229d0e2e1ba0158281b58b",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-2d19f0af5c5a585e",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# You must run this cell, but you can ignore its contents.\n",
|
||||||
|
"\n",
|
||||||
|
"import hashlib\n",
|
||||||
|
"\n",
|
||||||
|
"def ads_hash(ty):\n",
|
||||||
|
" \"\"\"Return a unique string for input\"\"\"\n",
|
||||||
|
" ty_str = str(ty).encode()\n",
|
||||||
|
" m = hashlib.sha256()\n",
|
||||||
|
" m.update(ty_str)\n",
|
||||||
|
" return m.hexdigest()[:10]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "e6a2d44fd134a7ce5a461a752d6be4fa",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-75699939c3ce2503",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import numpy as np"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "342402564abf6b2c2bfcab3cc7378746",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-5d4bc0aa520da66e",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
" ## Disease diagnosis with Bayes' theorem\n",
|
||||||
|
"\n",
|
||||||
|
"Let's say that you know the prevalence of a disease (it could be a viral infection with SARS-CoV-2 or COVID-19) is 1% in a population of people. We have a test for the virus, which, given a person has the disease, will have a positive result 90% of the time. This is called the *true positive rate* (*TPR*), or *sensitivity*, of a test (and also called *recall* and *hit rate* in machine learning contexts). Unfortunately the test also gives a false positive (a positive result with no disease) 5% of the time. This is called the *false positive rate* (*FPR*). (The *specificity* of a test is `1-FPR`, so this test would have a 95% specificity.)\n",
|
||||||
|
"\n",
|
||||||
|
"See the [Wikipedia page on Sensitivity and specificity](https://en.wikipedia.org/wiki/Sensitivity_and_specificity) for more details about the definitions of these names and the relations between them.\n",
|
||||||
|
"\n",
|
||||||
|
"It is standard practice to report sensitivity and specificity when characterizing a test. For example, the European Commission published [this list of SARS-CoV-2 antigen rapid tests](https://health.ec.europa.eu/system/files/2022-12/covid-19_eu-common-list-antigen-tests_en_0.pdf).\n",
|
||||||
|
"\n",
|
||||||
|
"We are going to work through the probability that a person in this population has the disease given a positive test result. We will write a positive test result as $\\rm{T}$. So, mathematically, we want to solve for $P(\\rm{disease}|\\rm{T})$. We will use Bayes' theorem to calculate this.\n",
|
||||||
|
"\n",
|
||||||
|
"Remember that Bayes' theorem is\n",
|
||||||
|
"\n",
|
||||||
|
"$P(A|B)=\\frac{P(B|A)P(A)}{P(B)}$\n",
|
||||||
|
"\n",
|
||||||
|
"Let's use variable names suited for our problem here. `A` will be `disease`, `B` will be `T` which means positive test result. So, rewriting Bayes' theorem with these new names, we have:\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{disease}|\\rm{T})=\\frac{P(\\rm{T}|\\rm{disease})P(\\rm{disease})}{P(\\rm{T})}$\n",
|
||||||
|
"\n",
|
||||||
|
"In Bayesian terms, we can understand this as follows. Our *prior* belief is $P(\\rm{disease})$. This is our belief about the chances of having the disease prior to knowing the test results, and we take the population prevalence as our prior for this individual. We want to update our beliefs to compute our *posterior* belief $P(\\rm{disease}|\\rm{T})$. In other words, we want to update our belief of disease probability state given a positive test result. In Bayesian terms, our *likelhood function* is $P(\\rm{T}|\\rm{disease})$. In words, this is the chance of a positive test result given the presence of the disease. As discussed above, this is the test sensitivity, or true positive rate (TPR).\n",
|
||||||
|
"\n",
|
||||||
|
"Below, you will need to make use of the fact that the probability of a positive result is the sum of the true and false positive probabilities:\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{T})=P(\\rm{T}|\\rm{disease})P(\\rm{disease}) + P(\\rm{T}|\\rm{healthy})P(\\rm{healthy})$\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{T}) = (\\rm{true\\;positive\\;rate})P(\\rm{disease}) + (\\rm{false\\;positive\\;rate})P(\\rm{healthy}) = (TPR)P(\\rm{disease}) + (FPR)P(\\rm{healthy})$"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "1203d40fb1ec0ec0366a3a8ccef3a090",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-8a9f79b7a6d31d5d",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q1 Given the disease, what is the probability of obtaining a positive result with this test?\n",
|
||||||
|
"\n",
|
||||||
|
"Mathematically, we write this as `P(T|disease)`. As described above, this is the *sensitivity* of a test, also called the *true positive rate* (*TPR*).\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_positive_given_disease`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "eb9b195a47f1b9895169077220b60f38",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-bd5795e644219a5f",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "c5bdd2f91509d3ef1bb6e5363c1f8cc8",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-794f6ea4cc254f13",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_positive_given_disease*1000)))=='bdc5d8a48c'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "453d4f0a08acd28c2c8058e3edfdba20",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-0358735cabc9c677",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q2 What is the probability of having the disease in the population?\n",
|
||||||
|
"\n",
|
||||||
|
"Mathematically, we write this as `P(disease)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_disease`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "92591a94781f72590c4f0b396208e26e",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-14c9780bc2381875",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "7b706052339ea83c2cf0fcb04ecf575e",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-1458d1dd7685458a",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_disease*1000)))=='4a44dc1536'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "299aeac1ae4308ac21e25443a0eb5bcb",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-37ba1ce7923155cb",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q3 What is the probability of obtaining a positive result *in this population* due to actual disease?\n",
|
||||||
|
"\n",
|
||||||
|
"(This is the probability of a positive result given the disease and the probability of the disease.)\n",
|
||||||
|
"\n",
|
||||||
|
"Mathematically, this would be written as `P(T|disease)*P(disease)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_pos_disease`.\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "1d5f2d8f47f44a3b4968c515321d9e81",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-a2795deffa3c89c7",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "d70ee2671fd2b335ae2fcc3a81c6de73",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-667a1db97c8f798e",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_pos_disease*1000)))=='19581e27de'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "1e9e1685219652bc0cc104adaa2c4cfa",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-e060e20a197869ac",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q4 What is the prevalence of healthy (no disease) people in the population?\n",
|
||||||
|
"\n",
|
||||||
|
"In our model, a person is either healthy or has the disease. Thus, `P(healthy) + P(disease) = 1`. Based on this, `P(healthy) = 1-P(disease)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Mathematically, we want to know `P(healthy)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_healthy`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "3ef0951ee47f1405d24c143346737d13",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-c51a246f7cbdf86a",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "1f9a8c570afda57f499939465823f450",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-0899b61c455701f1",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_healthy*1000)))=='fe50b64954'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "9946ddf12d9a7778e4230a35f068e8d8",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-bfee709770a2f9e4",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q5 What is the probability of obtaining a positive result in this population due to false positive?\n",
|
||||||
|
"\n",
|
||||||
|
"(This is the probability of a - false - positive result given no disease and the probability being healthy.)\n",
|
||||||
|
"\n",
|
||||||
|
"Mathematically, we write this as `P(T|healthy)*P(healthy)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_pos_healthy`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "4088f687038ffcd4aae0ddf59f521250",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-e499af19d0992d30",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "93ce775768a60fbe3f609c62ff3ba94b",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-afd9c756a3c77813",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_pos_healthy*1000)))=='1a6562590e'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "7effb410c4bf5f38a283781b0cfddb23",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-c91b0aa17e5d9752",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q6 What is the probability of obtaining a positive result in this population?\n",
|
||||||
|
"\n",
|
||||||
|
"(This is the probability of obtaining a positive result, no matter the underlying disease or healthy state. Therefore, it is the sum of the probability of a postive result for all possible states.)\n",
|
||||||
|
"\n",
|
||||||
|
"Mathemetically, this would be `P(T) = P(T|disease)*P(disease) + P(T|healthy)*P(healthy)`.\n",
|
||||||
|
"\n",
|
||||||
|
"Put your answer in the variable `prob_positive`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "f68f4ee388785186a875106b737eb956",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-f21ea6c9a3bff85a",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "605f848a978b60026dbbe2d5019e7055",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-b0648a81e8391d34",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"assert ads_hash(int(np.round(prob_positive*1000))) == '6208ef0f77'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "e2cb82d7534f304106ff60305cd57374",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-1905d16b125a46d3",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q7 Given a positive result, what is the probability of having the disease?\n",
|
||||||
|
"\n",
|
||||||
|
"Finally, here is where we use Bayes' theorem to tell us how likely is it that there is disease given a positive result.\n",
|
||||||
|
"\n",
|
||||||
|
"`P(disease|T)=P(T|disease)*P(disease)/P(T)`\n",
|
||||||
|
"\n",
|
||||||
|
"Put the result in the variable `prob_disease_given_positive`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "d72b76dda71e359824f48b2e4f47a4f9",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-a0cc2998aca0717b",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "bd810979c72203397f4a39cb3f1f63a3",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-91fcc1b6c157fce2",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print(prob_disease_given_positive)\n",
|
||||||
|
"assert ads_hash(int(np.round(prob_disease_given_positive*1000)))=='1d0ebea552'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "4d12c8c2e19b64cb749d554e96e2ea40",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-be559c154ea45ba3",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Conclusion\n",
|
||||||
|
"\n",
|
||||||
|
"Perhaps surprisingly, in a low prevalence of disease (1%), a positive result from test with sensitivity of 90% and specificity of 95% indicates only an approximately 15% chance that the person has the disease.\n",
|
||||||
|
"\n",
|
||||||
|
"**Real world note:** this analysis was done assuming the test was administered randomly and not, for example, on whether the person was experiencing symptoms or had another reason to believe they may have the disease. These additional factors would need to be included to make predictions about such a situation."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "bb7c4ed86a59168711fad4ac408987ae",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-9ca150f6b141fc98",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Extra credit\n",
|
||||||
|
"\n",
|
||||||
|
"Now assume a second *independent* test is done. What would the chance be that a person has the disease after two independent positive results? Work out the steps. The correct result is about 77%.\n",
|
||||||
|
"\n",
|
||||||
|
"(It is important that the tests are independent because errors with one should not influence errors with the other.)\n",
|
||||||
|
"\n",
|
||||||
|
"Here we use $\\rm{TT}$ to indicate two positive test results. This is the probability of a first positive result and a second positive result, so the probability of a single positive result times the probability of a single positive result.\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{disease}|\\rm{TT})=\\frac{P(\\rm{TT}|\\rm{disease})P(\\rm{disease})}{P(\\rm{TT})}$\n",
|
||||||
|
"\n",
|
||||||
|
"Remember using basic probability logic:\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{positive\\;result})=P(\\rm{true\\;positive})P(\\rm{disease}) + P(\\rm{false\\;positive})P(\\rm{healthy})$\n",
|
||||||
|
"\n",
|
||||||
|
"We can work out the following relation for $P(\\rm{TT})$, the probability of two positive test results.\n",
|
||||||
|
"\n",
|
||||||
|
"Keep in mind the following relations:\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{TT}) = P(\\rm{TT}|\\rm{disease})P(\\rm{disease}) + P(\\rm{TT}|\\rm{healthy})P(\\rm{healthy})$\n",
|
||||||
|
"\n",
|
||||||
|
"Also:\n",
|
||||||
|
"\n",
|
||||||
|
"$P(\\rm{TT}|\\rm{disease}) = P(\\rm{positive\\;result}|\\rm{disease})P(\\rm{positive\\;result}|\\rm{disease}) = P(\\rm{positive\\;result}|\\rm{disease})^2$\n",
|
||||||
|
"\n",
|
||||||
|
"**Real world note:** a second independent test would need to test something different and perhaps be performed at a separate time and perhaps place by a seperate tester to acheive true independence. This is because an antigen test, for example, may give a false positive due to another cause - say presense of a rare but unrelated bacteria strain. Thus, using the same test again may again result in another positive for the same reason and is thus not truly independent."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "7e9783da7359bcdef1b247fd1c70f258",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-abdcc7bbaea9194d",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "3f874010e2f1b47124bb7d8242221228",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-0250d322805d7fd7",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "a057b18a8d70b5c2f13980d706d70aa1",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-7986416dfa056d9a",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "ee67ce04eafdfbd35a2a73838e36a891",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-fb540ee826540863",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "bffc5c71257454cf4d89e73d205cc41f",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-c1e4844321baf0be",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "40c2f8d1203d8b218c37cfc8cfcd327b",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-4e87df82fd6b4259",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "188ad324bdf444dccb520b32fb8ad02a",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-636758ec522a9a91",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "7d6f0915a558825df33a5ea48cbaef4a",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-ff65799f1a88e304",
|
||||||
|
"locked": false,
|
||||||
|
"points": 0,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
384
exercises/release/exercise-12/3__Monty_Hall_problem.ipynb
Normal file
|
@ -0,0 +1,384 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "f3bfc18d7d3126bb2bc86f70298b0eca",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-25e346adccbfbbd1",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"# The Monty Hall problem (Deutsch: Ziegenproblem)\n",
|
||||||
|
"\n",
|
||||||
|
"Read about it [on Wikipedia](https://en.wikipedia.org/wiki/Monty_Hall_problem) or [in German as the Ziegenproblem](https://de.wikipedia.org/wiki/Ziegenproblem) and come back. I'll wait.\n",
|
||||||
|
"\n",
|
||||||
|
"In this notebook, you will write a program to simulated the Monty Hall problem.\n",
|
||||||
|
"\n",
|
||||||
|
"We are going to make extensive use of the function `random.randint(a, b)`. From its docstring, it returns a `random integer in range [a, b], including both end points.`"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "aaf57ca23f25194de3aed50f5671d7f9",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-b19b617da52a3bc6",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import random"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "5080a90ced63235419068f94c7ff0a1f",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-8d3e7b29ddec3069",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"for i in range(10):\n",
|
||||||
|
" print(random.randint(0,2))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "3eeedae0c60f10a8521a250c65e21e19",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-474fcacf28983b26",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q1\n",
|
||||||
|
"\n",
|
||||||
|
"For your first task, create a function called `sample_not` which takes two positional arguments (call them `not1` and `not2`) and will return a random integer between 0 and 2 (endpoints included) but which is not either of the arguments. The positional arguments will always be integers between 0 and 2 (inclusive)."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "9797d3745174cd03506e52e2599c87b1",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-f0ca4e3187e53217",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "c31b214732c7f43f93e8308cfe9403e4",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-50feeabd1f4f7d07",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"assert sample_not(0,1)==2\n",
|
||||||
|
"assert sample_not(0,2)==1\n",
|
||||||
|
"assert sample_not(1,0)==2\n",
|
||||||
|
"assert sample_not(1,2)==0\n",
|
||||||
|
"assert sample_not(2,0)==1\n",
|
||||||
|
"assert sample_not(2,1)==0\n",
|
||||||
|
"assert sample_not(0,1)==2\n",
|
||||||
|
"assert sample_not(0,0) in (1,2)\n",
|
||||||
|
"assert sample_not(1,1) in (0,2)\n",
|
||||||
|
"assert sample_not(2,2) in (0,1)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "bece62fea06aaeb9d022fcd6e0a23032",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-8fdbeafabef55703",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Q2\n",
|
||||||
|
"\n",
|
||||||
|
"For your next task, consider the following code:\n",
|
||||||
|
"\n",
|
||||||
|
"```python\n",
|
||||||
|
"\n",
|
||||||
|
"# generate what is behind the doors\n",
|
||||||
|
"doors = ['goat', 'goat', 'goat']\n",
|
||||||
|
"car_door = random.randint(0,2)\n",
|
||||||
|
"doors[car_door] = 'car'\n",
|
||||||
|
"\n",
|
||||||
|
"# Now, the guest makes a first guess.\n",
|
||||||
|
"guess1 = random.randint(0,2)\n",
|
||||||
|
"\n",
|
||||||
|
"# Now, the host opens a door, which is not the guess or the car.\n",
|
||||||
|
"host_open_door = sample_not(guess1,car_door)\n",
|
||||||
|
"\n",
|
||||||
|
"# Based on the variable `do_switch` (which is not set here), the guess will either make a new choice or stay with the original guess.\n",
|
||||||
|
"if do_switch:\n",
|
||||||
|
" guess2 = sample_not(guess1,host_open_door)\n",
|
||||||
|
" final_guess = guess2\n",
|
||||||
|
"else:\n",
|
||||||
|
" final_guess = guess1\n",
|
||||||
|
"\n",
|
||||||
|
"# Finally, determine what was behind the door for the final guess.\n",
|
||||||
|
"result = doors[final_guess]\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"Put this code in a function called `run_game` which takes a single argument, `do_switch`, and returns a boolean, indicating a win with `True` or a loss with `False`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "7db500d5fbe4e3b7b017452c31d07cb2",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-c087e3c1a6e2d2dd",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "36aefb4d0a8ad8dbeeeac485d2bd9afe",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-a3750cd0c13cf6c0",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"count = 300\n",
|
||||||
|
"for do_switch in (True, False):\n",
|
||||||
|
" wins = 0\n",
|
||||||
|
" for i in range(count):\n",
|
||||||
|
" this_run_win = run_game(do_switch)\n",
|
||||||
|
" assert(type(this_run_win)==bool)\n",
|
||||||
|
" wins += int(this_run_win)\n",
|
||||||
|
" print('do_switch: %s, wins: %d, count: %d'%(do_switch, wins, count))\n",
|
||||||
|
" if do_switch:\n",
|
||||||
|
" assert abs(wins/count - 2/3) < 0.1\n",
|
||||||
|
" else:\n",
|
||||||
|
" assert abs(wins/count - 1/3) < 0.1"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "1d2182a4b2f5530d0df89019ed8f524e",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-5626ba67e0f6f701",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Note the above results. You have numerically simulated the Monty Hall problem."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"checksum": "8448c5d8a31c617b3e8889a0f066412d",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-054774247e7bc87a",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Q3\n",
|
||||||
|
"\n",
|
||||||
|
"Make a new game where there are 100 doors and the host opens 98 of them after the initial guess. Make a new function called `run_game_100`, and any other functions you need, which plays a single round of this game. Again, this function should take an argument `do_switch`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "507b4cfa66e9812169df2e7e6f19d787",
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-718f81e609214623",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# YOUR CODE HERE\n",
|
||||||
|
"raise NotImplementedError()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"deletable": false,
|
||||||
|
"editable": false,
|
||||||
|
"nbgrader": {
|
||||||
|
"cell_type": "code",
|
||||||
|
"checksum": "02dd189fb97c5291858f05eb56d3e022",
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-0b76bb5440f73c22",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"count = 1000\n",
|
||||||
|
"for do_switch in (True, False):\n",
|
||||||
|
" wins = 0\n",
|
||||||
|
" for i in range(count):\n",
|
||||||
|
" this_run_win = run_game_100(do_switch)\n",
|
||||||
|
" assert(type(this_run_win)==bool)\n",
|
||||||
|
" wins += int(this_run_win)\n",
|
||||||
|
" print('do_switch: %s, wins: %d, count: %d'%(do_switch, wins, count))\n",
|
||||||
|
" if do_switch:\n",
|
||||||
|
" assert abs(wins/count - 0.99) < 0.02\n",
|
||||||
|
" else:\n",
|
||||||
|
" assert abs(wins/count - 0.01) < 0.02"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
264
exercises/source/exercise-10/1__Colorblind_simulator.ipynb
Normal file
622
exercises/source/exercise-10/2__Image_color_clustering.ipynb
Normal file
BIN
exercises/source/exercise-10/Ishihara_Plate_3.jpg
Normal file
After Width: | Height: | Size: 52 KiB |
601
exercises/source/exercise-10/RNAseq_data_50genes.csv
Normal file
|
@ -0,0 +1,601 @@
|
||||||
|
gene 0,gene 1,gene 2,gene 3,gene 4,gene 5,gene 6,gene 7,gene 8,gene 9,gene 10,gene 11,gene 12,gene 13,gene 14,gene 15,gene 16,gene 17,gene 18,gene 19,gene 20,gene 21,gene 22,gene 23,gene 24,gene 25,gene 26,gene 27,gene 28,gene 29,gene 30,gene 31,gene 32,gene 33,gene 34,gene 35,gene 36,gene 37,gene 38,gene 39,gene 40,gene 41,gene 42,gene 43,gene 44,gene 45,gene 46,gene 47,gene 48,gene 49
|
||||||
|
2377,2886,1524,2235,2472,1256,1006,1902,911,2285,1915,3021,1387,1515,672,2063,1906,372,1883,502,246,1875,2161,1074,2355,1083,760,709,975,2301,1036,960,1301,40,1085,1014,1824,2769,1494,834,0,1115,1381,2226,1810,2124,1479,719,0,529
|
||||||
|
1251,948,3038,3857,1971,1761,2371,632,1705,2251,572,3221,682,1449,1469,2558,2467,555,1327,2499,0,1112,2482,948,2387,943,891,1109,1368,1219,1963,1428,333,391,2496,1299,1998,1817,1238,859,954,1874,527,1783,1922,1029,173,2267,1078,1343
|
||||||
|
2650,1643,1560,2545,1689,1072,1999,1707,579,1655,335,1450,1844,1124,1671,2190,2571,630,814,203,0,3148,1543,167,2662,1300,1152,1247,2927,673,1563,1299,2474,0,1527,1129,1186,2965,2756,215,589,409,967,1762,1789,2424,494,1680,0,1283
|
||||||
|
1622,1581,1333,2218,2346,342,1534,1571,456,187,871,1732,2152,1083,1901,475,2857,578,2680,1525,0,1967,1681,1159,1602,95,1755,1156,969,1541,2069,1044,2230,113,846,1288,1180,2581,2045,179,2535,1524,236,1343,1089,1429,930,1415,173,1153
|
||||||
|
1863,993,1225,1318,1854,0,1461,634,663,0,1021,1767,351,1417,1188,2006,955,1794,1823,1261,982,1585,2486,1178,2238,803,511,1030,2361,2751,2266,2252,946,1053,253,2130,2397,2250,1561,1565,1882,1072,0,3040,1031,553,1468,2100,0,1001
|
||||||
|
2784,1555,1124,1566,2418,1601,1296,2381,1130,325,582,2152,1601,1302,1898,1046,3404,0,2123,778,464,1108,1472,0,1542,553,996,1838,1853,950,2074,987,1338,1560,1560,984,1746,1352,2195,0,1507,877,1116,2734,1209,1073,2300,1555,997,1219
|
||||||
|
2331,1344,1537,2928,1270,384,2228,2645,803,1378,1257,1930,2526,1463,1475,2006,3535,483,1117,1327,564,1615,2897,497,1983,1187,470,1449,2300,1549,2409,1463,760,426,1085,1092,876,2358,2132,27,1552,892,467,1599,1496,638,1021,2039,942,1972
|
||||||
|
1792,908,769,2674,1194,1762,2207,1703,392,144,1211,938,596,170,1663,888,1591,689,891,764,1207,1602,862,1367,2831,224,817,1085,2366,1281,1294,1444,1895,1141,744,1848,870,1471,917,3247,1770,1551,1207,719,811,583,575,1800,987,266
|
||||||
|
1367,1626,889,2639,4100,2933,2076,879,401,2208,0,2327,1755,225,674,1579,2439,1218,1736,495,341,2265,1380,527,2835,282,670,880,1393,1284,2096,2494,2415,483,2759,1276,1218,3281,1473,1557,0,2246,1470,2374,1654,2080,396,2266,0,1883
|
||||||
|
1817,1159,1942,2854,2781,559,2114,1277,2445,1342,2603,2164,1854,1958,2422,2703,1758,215,1314,1826,769,320,1893,1953,1983,609,876,452,2397,2020,1687,1924,800,0,605,1375,2224,1823,192,177,1783,595,0,3140,1333,1616,1185,2603,1230,525
|
||||||
|
2008,775,2166,3348,1905,971,2204,1843,2318,1639,1607,2308,2575,2207,1812,1816,2545,935,929,1215,0,1235,1563,1954,2311,1035,1752,2287,2724,1794,1265,1436,424,21,531,1720,1274,1580,1968,1194,2332,441,1214,1590,1099,1437,237,2066,1087,1540
|
||||||
|
2019,1216,2073,3762,2664,1589,1892,1475,1895,2727,1408,3392,1455,1672,1193,1244,1254,883,675,470,141,374,2312,983,3051,0,1088,896,1482,2209,1719,778,475,790,889,443,2311,2345,779,1961,837,1885,614,2612,1358,790,568,1341,1021,993
|
||||||
|
2311,1156,849,2738,1715,910,2033,1356,545,1930,2112,440,972,0,3698,1460,2655,889,1510,1385,0,1539,732,1364,3187,2027,2195,395,2569,2231,669,1210,1782,0,1098,1566,961,1655,859,1510,2197,106,1202,1271,801,500,0,2566,2072,1703
|
||||||
|
2734,1121,1907,2131,1830,315,1234,728,2492,1716,1291,2550,1746,1308,2625,1138,2336,3262,2355,1588,571,1512,937,571,1796,216,2029,1601,1903,1776,1423,1574,266,1687,2218,1620,1741,385,252,304,1825,0,451,2650,443,473,1533,1766,1283,1238
|
||||||
|
2797,2424,2140,2971,1799,1557,1183,1663,662,485,1308,1356,1295,170,2144,488,2082,812,1549,1076,116,1218,2520,1004,2799,666,1413,462,1664,2379,836,1650,1548,851,0,7,1205,2289,975,1741,1982,1464,724,838,808,1322,1542,1805,146,0
|
||||||
|
1475,1444,2192,2952,1740,1958,1819,1685,1740,0,1603,1066,1891,1765,2020,1704,39,672,1511,1744,453,892,1351,1360,2228,1235,2092,2032,2643,2865,925,1213,1191,1254,786,986,1538,1418,1507,1683,1971,1337,993,1848,0,1562,1568,2816,298,1533
|
||||||
|
1846,1606,2640,2384,2499,1283,1705,1552,1745,1359,759,2012,2111,1587,2518,1056,2752,1465,1864,500,103,1257,2001,486,2317,1878,2301,2016,2748,1847,371,1865,0,0,714,1895,1852,2067,0,1769,952,417,1023,2789,1618,1519,1746,1305,1654,1658
|
||||||
|
3162,2585,1033,2537,1980,1210,2728,1303,1712,1354,2824,1680,1694,1246,3188,1538,2301,659,413,1369,1249,1365,1099,198,2532,1014,1343,1095,2703,2373,1452,996,2400,0,1413,2253,1855,1451,1551,977,2138,595,302,2370,947,1021,1543,1722,1386,1125
|
||||||
|
1959,966,1389,1906,977,516,2256,1904,663,1323,1026,3923,1356,1390,1579,2336,1725,1261,2245,471,661,1665,3008,474,2439,213,142,1003,2219,1014,1373,1999,961,16,386,1957,2447,2433,2193,1051,607,1759,654,699,2175,1373,937,0,1188,0
|
||||||
|
1234,1278,1216,1563,3088,188,1225,891,1650,1666,468,2511,1337,2089,1521,1322,1193,2285,1747,701,992,2296,2983,589,2392,328,351,989,1596,2350,1117,2055,1694,1578,312,1948,2023,1994,989,930,448,727,663,1801,586,150,727,1459,385,1409
|
||||||
|
1173,2097,3444,2740,2711,1192,2316,1323,2365,1195,2900,2211,3375,2335,2700,48,1235,2477,1180,1862,917,364,1587,1255,2896,1191,1921,2167,3943,2337,945,1670,1541,0,1260,2030,2323,1375,1412,1658,1975,37,123,2757,352,1488,1920,2785,2449,1076
|
||||||
|
2358,1252,2136,2902,2811,294,1314,888,1322,627,2095,1793,1703,2093,1434,1312,1710,843,1131,931,47,1938,2353,1476,2251,573,773,895,1078,2496,2170,1152,1591,1455,336,1825,1427,2249,552,1195,1453,1680,764,1772,1746,744,783,2106,0,1513
|
||||||
|
1505,668,2549,3378,951,955,1219,2123,1229,1863,1779,2410,2168,1534,1723,1859,745,2230,1726,2013,0,1827,1299,565,1541,813,1524,987,2189,2281,1522,310,1148,679,1116,1787,952,1849,3363,0,2128,742,0,2842,1412,1649,1533,2879,161,2645
|
||||||
|
2431,1538,1360,2008,611,1388,1075,1722,678,1267,1258,2028,1640,675,0,1463,1575,1510,1597,186,1015,1695,39,762,1566,526,1081,601,1722,1515,1307,946,1178,934,1321,1512,1256,1149,1070,189,826,0,927,2031,1300,1361,1883,1134,275,594
|
||||||
|
2797,2290,1427,2373,1516,1160,2703,726,2412,1513,1003,1638,1580,2140,3024,1385,1324,1125,0,1044,371,1400,1685,1479,2378,913,1853,1517,2551,2511,844,989,1527,839,1616,1291,1604,771,0,836,2017,0,379,1633,0,859,951,1917,1144,1210
|
||||||
|
2543,1417,1964,2385,3035,0,586,745,1239,2209,1264,2266,1623,1204,2334,1204,1670,1851,2783,1152,0,2245,2424,0,2153,1730,1822,1482,1461,2595,1255,1282,589,23,1724,1067,2259,2802,1044,174,657,309,0,2732,1609,1708,2523,872,755,1501
|
||||||
|
1652,140,1155,1465,2453,0,1583,1634,749,1425,957,1779,1772,1388,2898,931,1818,1780,2488,611,0,824,2714,1728,2464,1344,2170,1437,1790,2950,249,1555,506,236,0,1919,1380,1327,629,2063,1429,995,641,1449,1036,457,733,909,1752,889
|
||||||
|
2112,2106,2052,2052,1306,1041,3404,358,1842,1768,2972,1899,2989,2369,2831,1444,2175,1992,1049,1398,1506,1437,1573,1380,3039,614,1084,1740,3552,2186,1703,1919,1119,0,1419,904,2078,1928,1221,1193,901,718,316,2314,841,680,636,1047,2310,671
|
||||||
|
2017,2313,1451,2071,1278,348,3165,498,641,1258,1871,2497,1986,1212,1814,2160,1753,1538,948,2028,465,702,830,1739,1487,1384,1831,1125,2220,2236,1264,1935,1940,0,1937,640,2730,1506,1358,1543,707,556,0,1779,384,904,0,1484,2100,267
|
||||||
|
2409,1763,1296,2438,2717,1012,1234,496,677,289,649,761,1030,1692,2650,1565,1943,1085,1851,1133,322,2078,2395,680,2733,1510,813,632,1166,1633,2176,1492,1458,908,510,1043,1409,2545,641,598,872,1484,217,1205,837,468,1711,1483,474,1108
|
||||||
|
2822,2576,1470,1623,2718,0,2163,382,1222,2064,2562,2061,1856,1008,1846,1173,2379,751,1604,1499,0,2544,1358,1676,2024,1618,2027,1213,2535,2174,749,965,1883,0,1669,1389,1049,2219,2428,1681,542,426,0,1853,795,1502,652,1521,0,2335
|
||||||
|
2093,1784,2046,1963,1664,919,1773,811,923,1797,1411,2840,1522,1817,2005,530,1966,1434,1195,1107,659,1265,1272,1341,2296,1582,2649,2142,2775,2607,160,1365,996,170,1222,1159,2198,1677,1771,2307,1465,0,582,1718,214,0,1087,736,2626,757
|
||||||
|
2758,1401,1929,2628,2957,973,1611,1422,2423,843,1112,2887,1748,2513,2514,1512,2709,1542,1531,1019,0,2089,1157,944,1807,1343,1527,1818,1583,698,2006,886,768,1777,1036,2993,1969,1065,822,1308,626,941,1000,2047,1511,1120,501,1902,869,1213
|
||||||
|
2363,1399,1104,537,1762,244,2498,1545,1638,971,1271,1898,1804,1086,1890,2265,2144,1274,1307,1111,938,2892,1659,1402,1306,161,765,1591,2017,1956,888,1943,85,381,1151,1355,2002,1469,1796,1114,1215,385,407,1868,1066,1784,980,1398,580,847
|
||||||
|
2076,1812,2496,2678,1647,1190,1559,1769,1297,1197,3115,2062,2209,1977,1320,1393,2387,1051,425,449,1592,2413,2298,56,2234,755,0,1257,3190,1450,1116,1636,1157,1154,0,962,1462,2153,2105,922,198,798,1306,967,2464,1240,1370,1639,931,654
|
||||||
|
2356,1676,1672,590,4140,2368,587,2713,611,818,417,955,2261,1544,2138,0,404,1699,2006,78,298,1446,1859,1295,2300,1213,2727,1903,1368,2576,554,1325,0,556,901,1453,1604,2420,350,2477,224,1272,1257,2704,515,501,1916,2456,868,2288
|
||||||
|
2165,437,1266,2197,2375,1040,1543,581,1482,739,1013,2540,1231,2320,1987,1433,2257,1931,2461,1329,558,1401,1390,471,1848,190,1318,2111,2752,1223,2191,1942,2315,1427,1746,2088,1285,1480,1673,799,1531,1219,533,2289,1276,794,989,1549,0,1291
|
||||||
|
1948,2236,3036,2713,2268,2175,1632,806,2014,1055,2374,2600,1225,2703,2235,0,915,1998,295,1515,828,2200,1686,518,2860,1004,1517,2021,1953,2560,342,1223,0,864,2020,907,1533,2114,719,2194,1162,1165,818,1993,1271,1039,2748,1979,1770,859
|
||||||
|
2526,1829,1137,2809,1459,0,2313,1791,786,2123,2331,1030,2004,1188,3867,1641,2550,1324,867,2909,0,2311,2238,1833,2479,1484,2371,167,1263,2672,1582,635,651,0,918,1567,1012,2571,662,302,1389,320,115,1038,1256,1615,834,2367,258,1047
|
||||||
|
2321,1474,1823,3615,2395,1311,2443,1031,1019,2728,2509,1896,1344,1013,2350,2240,2838,122,848,1265,39,2185,1907,828,2966,1316,386,830,2731,1337,717,1148,1557,0,1294,1120,348,2676,1181,1854,320,1324,1571,711,1831,553,618,1161,1889,1518
|
||||||
|
1539,3149,2355,2622,221,1176,1354,875,1322,1793,2697,911,889,145,266,1989,1510,1049,534,2196,1637,1965,1366,810,1951,707,687,0,1464,2711,1325,1931,1023,583,2186,474,2558,1651,1679,1008,474,437,0,3399,1399,2195,1956,2361,105,1461
|
||||||
|
2289,1105,1141,2086,2898,166,2278,1630,1307,1012,0,1298,1622,2033,2342,1243,3948,682,1077,606,0,2093,1696,1810,2106,1457,1762,1265,1205,1756,2208,946,682,445,413,2246,885,1817,399,812,1893,572,1228,2964,605,0,577,2502,1543,2424
|
||||||
|
3010,1331,2016,3626,683,463,2495,2567,1426,949,2420,1555,2232,0,2501,1393,2000,1600,1534,755,1254,1522,1846,660,2116,0,814,1621,3513,1449,2024,1594,3716,1841,499,2509,2311,1432,1724,2082,2680,955,6,1496,1705,819,0,1896,1070,866
|
||||||
|
1983,731,1450,2421,766,1571,825,3268,1676,1472,823,2537,1799,1996,53,1987,2706,481,1420,364,657,976,2593,557,2408,1164,330,1930,2367,567,1830,2099,568,959,719,2628,1288,1287,1827,0,983,509,1374,1479,2343,986,997,1741,908,1232
|
||||||
|
1513,592,2365,2411,2102,0,1614,722,1725,229,2761,1430,1920,1219,3003,1938,350,1123,2585,2010,0,1693,615,1950,2083,2645,2079,909,3673,1887,518,1461,1513,1825,658,1234,1624,1363,1824,2281,895,540,80,1977,1166,1684,686,2758,976,1669
|
||||||
|
2409,1267,2006,2589,2202,162,2486,1386,2140,2932,2332,1720,2688,2170,2197,2348,2019,1201,1352,0,6,2695,2438,1895,2015,809,1327,1325,2040,2512,1114,1031,1469,1239,1415,987,1788,2002,1441,597,0,291,1017,1982,924,1374,0,1437,453,2032
|
||||||
|
1088,1379,2788,2329,2476,1227,947,821,2120,1263,611,2534,1744,1983,2238,1219,1776,1399,2250,1926,0,1826,2764,623,2500,472,409,1201,1959,1689,701,1916,1589,650,1285,1762,821,1600,2366,0,2287,1452,0,1665,1606,1120,2141,1253,838,1775
|
||||||
|
2421,1618,1467,1607,3096,1851,609,1853,1734,1416,1446,3792,983,796,0,1360,1625,1747,1647,947,706,1326,815,1531,1639,640,1556,695,1781,1557,1265,2460,456,1051,1750,2754,2968,1354,2750,1696,381,710,1410,2637,430,268,63,3370,121,1180
|
||||||
|
2351,1400,1953,2029,2850,2579,1669,1425,1030,1978,2354,1735,1551,1972,1906,1171,2931,1367,2333,1017,353,1314,1603,1334,2757,981,1912,1588,1510,3556,1479,947,0,170,1636,1323,1279,2275,1138,1852,1257,1455,1300,2490,1470,772,1502,1200,211,1844
|
||||||
|
3035,2346,2295,2443,1611,718,2507,1631,2146,2385,2033,4366,1339,1629,1892,1713,1727,2465,1367,1899,214,2300,1853,765,2454,377,912,1157,2102,1395,1707,1079,0,1125,1592,1871,2571,1983,1010,1633,0,839,765,1041,1112,1810,1009,757,164,331
|
||||||
|
2376,1235,529,1591,2441,1221,2488,1245,1587,1712,2487,1570,3308,2176,2568,1320,765,1154,833,0,1265,2789,891,1218,3138,1709,1810,1940,3450,2788,697,1326,1789,467,514,1315,1670,2059,1251,1897,1188,1026,1286,2371,1777,2031,1160,2231,2327,1517
|
||||||
|
2163,774,1708,3668,2241,790,2048,1305,2035,1030,1206,1839,2878,2179,2091,1492,2674,1580,1626,1524,0,1483,1651,1306,2149,1387,1466,2286,2268,1132,2330,1857,974,1241,788,1566,1758,1535,2290,0,2267,719,826,1339,1154,774,769,2703,1191,1319
|
||||||
|
1715,1730,2808,3008,1371,183,1509,1320,1302,18,1831,1697,2378,1507,2067,1441,1565,835,2025,1149,0,685,2283,1170,2269,1565,2056,1742,2051,1695,732,1649,1090,745,1139,1575,1289,2043,1238,1761,1044,990,0,1673,836,888,627,464,1722,660
|
||||||
|
878,1854,2671,2164,2589,783,2693,1021,1788,1730,2526,2840,1455,1876,1250,966,1917,1771,1852,1556,960,1786,1991,1553,2436,0,718,901,2440,2675,1240,1304,1969,1129,1348,710,1831,2317,1550,2400,313,1309,31,2366,1226,1795,1105,1294,361,611
|
||||||
|
1608,1314,1615,2317,1407,1599,1271,0,1312,935,1752,1705,2095,1348,1347,791,1744,1641,1508,719,555,524,1844,634,3520,76,720,1088,2000,1745,1323,1839,492,330,1814,1303,426,1473,725,0,1673,1428,675,2927,1742,1513,2292,1592,1158,935
|
||||||
|
2086,1023,853,100,2480,0,2635,0,1256,1729,1078,2935,0,3946,2186,1556,2421,2374,2244,1852,1357,2989,2196,1539,2342,399,1103,2682,1914,2749,1843,1597,781,622,2161,1724,3174,1959,1266,1929,1147,693,625,2971,466,0,1671,201,1993,317
|
||||||
|
3407,932,2028,3057,1071,1381,2048,2019,1617,2567,2651,3009,1036,387,1226,2355,2007,639,1097,1571,182,1427,1168,1051,2600,1816,2268,1188,1989,3362,687,1301,0,0,1774,1766,2169,1866,1424,2269,1351,1051,1886,2159,711,1152,1048,1770,1180,1701
|
||||||
|
2201,2642,1121,1195,2329,1558,2026,1128,1350,1840,1743,1984,1685,794,2138,558,2588,1538,1934,1249,1139,2092,1125,549,2533,499,2449,2312,2415,1733,796,1604,0,183,919,1539,2461,1377,2471,1672,1299,306,1289,2466,570,1580,2264,1320,1515,1201
|
||||||
|
2131,1512,1759,2265,2074,1134,2128,2346,1439,1695,2175,2292,2748,2676,1437,1690,2408,1411,1106,861,658,1928,3318,1155,2760,1828,1109,1715,1880,2485,904,1991,171,674,0,2695,2272,1801,2160,1140,0,1226,1932,0,526,0,69,794,1540,549
|
||||||
|
1667,1450,1945,2039,2533,623,1865,907,1215,2218,1582,2440,1834,2641,765,1086,934,2331,1686,1349,609,1870,2048,1010,1847,939,1427,739,1470,3811,2021,822,845,852,1328,1445,2346,1858,149,1159,728,894,0,2438,731,629,1894,1549,144,1887
|
||||||
|
1996,2261,748,1734,3448,1663,2146,734,952,3502,1888,1108,1069,1261,2605,735,1960,2999,1433,528,891,2938,1728,1642,3121,0,1427,193,1186,2631,1726,795,2352,977,1735,1791,1742,1762,0,1639,310,128,1159,1458,567,1410,0,2511,0,1624
|
||||||
|
3248,1892,1340,2791,2547,1732,2043,2834,267,1230,1428,2266,2220,1071,1899,752,995,2255,956,583,443,1042,1868,1410,2060,334,1997,1811,1352,1866,1928,1096,1525,1279,849,2164,2493,2101,1856,2747,897,868,891,1503,762,651,160,2765,424,214
|
||||||
|
1373,933,2022,2118,2760,1885,2188,1842,1498,1428,836,1603,2056,1602,416,2796,1356,0,1276,1419,293,3599,1482,1447,1934,437,359,1165,716,1634,1773,912,775,1024,1112,1173,1902,2180,978,1364,0,2282,1320,1649,1648,1682,602,2129,873,2040
|
||||||
|
2575,546,2109,2425,2984,711,1854,2166,1193,1674,2293,2099,1529,1355,1411,2504,1325,1705,1961,1283,109,1586,304,1926,2203,1686,1871,489,2857,2456,1795,1345,759,1230,1126,1667,1978,2589,1150,2511,159,257,1163,2166,673,1138,406,2101,0,1204
|
||||||
|
2457,2230,974,2098,2326,966,2255,62,742,1811,2839,978,1855,281,1557,1424,2441,1007,903,1252,1024,1968,868,2806,2576,216,1312,306,1864,2406,1911,1784,1040,142,1728,440,1896,1904,713,1302,1518,195,1113,586,831,1314,0,2318,771,387
|
||||||
|
2273,2258,1732,3183,2560,0,2898,1739,1293,1367,2321,3444,1382,2246,2245,2846,2150,206,1371,2060,10,1934,1932,1063,1162,645,1327,1821,2400,1005,2192,906,1825,746,702,1545,2708,2231,3242,1875,929,1466,62,2702,1565,1188,661,1902,1403,2210
|
||||||
|
963,1432,1443,2334,1241,1617,2439,168,838,1369,530,1946,1526,950,1760,2318,2199,538,1825,1416,0,0,2100,1602,2363,626,1122,1767,2259,817,1691,2405,771,0,776,1690,1863,1059,1669,0,1871,726,0,1354,1802,1284,63,1181,1180,554
|
||||||
|
2068,2146,1647,1866,3918,506,2006,1265,1475,2095,2399,2136,2710,1676,1634,529,2456,2556,1394,867,1437,2550,1341,1445,2803,0,1102,582,1834,2928,2196,818,1768,493,1882,1636,1408,2812,0,1415,972,308,1622,2479,515,1259,660,2620,585,1406
|
||||||
|
1232,1589,2285,2430,1839,1779,1274,714,1705,959,2674,2627,1617,2488,372,639,940,2327,896,788,1931,1667,2243,5,1840,0,113,456,1232,2457,1749,1317,2362,1071,2032,2589,2241,1300,642,835,543,2317,930,2828,1751,1438,1770,2444,0,1248
|
||||||
|
3129,1503,1297,2158,3706,0,1404,794,1618,2264,1312,2058,994,881,1832,1568,2768,961,1890,1244,0,250,1905,1859,2190,341,1733,1089,924,2633,1425,1492,506,544,1707,281,2135,1497,0,1008,592,885,1223,3207,1418,1837,755,1631,0,592
|
||||||
|
1503,2154,1628,2162,2378,1332,1835,1342,1267,1897,571,2719,1384,1504,1350,2039,1297,1916,1068,1515,397,2281,1363,1002,1562,1105,1695,1116,2615,1812,996,1808,1281,618,1115,1113,1941,2072,2100,1662,993,0,0,1910,991,1577,770,2783,531,2221
|
||||||
|
1929,2913,516,1489,1662,904,2032,2322,1381,2019,1721,2208,1424,1231,1500,2902,236,1265,1505,1501,1338,2450,1178,1326,1972,1663,667,171,2350,1541,1570,1200,1368,573,1050,2905,2536,1447,1508,1201,434,38,0,1467,856,1236,1096,1874,1235,2014
|
||||||
|
1709,1215,1721,2572,1945,673,1540,2310,576,1855,1359,775,2280,787,518,2412,1653,1592,2015,610,804,1469,2425,862,2315,332,498,270,1214,2267,2701,1271,1508,1467,614,1121,2089,1690,36,739,233,1378,564,2278,1500,924,402,2053,239,1312
|
||||||
|
2472,1633,3009,1801,1346,2269,1555,872,1615,0,1248,2094,2001,1004,2365,0,543,1572,1494,1444,10,394,1854,321,2252,742,2498,2937,3288,1782,845,1750,0,1048,1258,1831,1813,650,2106,2878,3655,1641,0,2099,1415,1200,2064,2460,633,1745
|
||||||
|
1906,2383,1171,2801,1381,1763,1764,917,868,2532,397,1538,938,602,1797,2275,2365,1934,925,915,511,0,2714,866,2313,0,783,704,2164,1440,1193,2617,1107,0,900,1069,1430,1313,1064,0,1704,0,0,2451,1091,890,946,1500,357,766
|
||||||
|
1540,2348,2836,2424,2244,1206,2368,1427,2207,704,2257,2475,1827,2694,2307,1143,1060,1406,1184,1456,49,1192,1371,1368,2619,1643,1414,2179,3674,1234,827,1597,52,673,464,1781,1797,1476,1495,1851,863,371,632,1536,1393,1440,1201,1480,1419,725
|
||||||
|
2419,2676,1526,2736,2158,1041,2002,873,1862,2223,2783,1648,2235,1216,3794,264,3209,1699,1446,1825,606,2612,1183,257,2923,909,1937,406,2109,2194,705,1281,1025,792,178,449,969,2256,1994,318,936,338,99,2133,2001,1595,2711,1565,278,1280
|
||||||
|
2880,680,2631,2220,3098,898,1622,1741,2255,1510,1070,1175,1991,2701,2214,943,1385,1783,767,528,0,2358,1431,1141,2840,1554,1579,1452,2404,1952,1493,744,1437,958,1337,1331,1317,2254,0,971,1318,118,962,2662,227,1211,1548,2596,1417,1298
|
||||||
|
2355,1858,1197,1927,1926,258,1408,879,110,863,545,2897,1171,694,1588,599,2050,1348,2254,1693,425,2425,1073,782,1456,0,2044,1243,1264,2281,2296,683,2745,838,1572,1126,2439,1922,2401,1291,2601,1246,636,2578,766,1006,1567,2028,361,1668
|
||||||
|
2269,1033,2038,2012,2271,522,1963,3286,0,2227,2187,2264,2124,677,0,2276,2480,790,1835,792,604,889,1782,1982,2012,930,826,511,1508,3169,2147,794,1037,0,910,1566,1482,2786,611,2110,185,918,1807,2231,1289,1286,0,1316,988,957
|
||||||
|
2588,2036,2676,2795,737,0,2062,2152,2105,1338,1716,2641,1886,2667,1448,2005,1902,605,214,362,596,1678,2822,981,2103,1066,611,1364,2664,1470,1694,1323,576,677,216,884,2148,2235,1802,781,886,379,0,2508,1826,1606,2031,958,1125,1412
|
||||||
|
2035,2737,1863,2126,1654,191,2440,1904,824,840,577,2100,1483,1088,3116,1130,1621,1220,2056,2225,0,1348,1799,1254,1589,1393,2936,1420,923,2684,1508,404,2252,121,919,2541,3102,1513,1092,1512,1399,1360,0,2109,757,1442,201,1342,283,1366
|
||||||
|
1100,1660,2558,2888,1311,2756,1789,2795,869,232,975,1822,2297,1717,1810,288,1939,1510,207,1136,265,1132,443,1007,2255,2273,2090,857,2594,1867,649,1205,275,0,470,1695,734,1707,1130,2164,1344,657,1509,1655,215,1979,1249,2951,1224,1134
|
||||||
|
1124,899,1080,2182,1379,975,1992,2246,1145,855,0,2910,2008,1660,997,1482,2177,438,1069,1101,281,2568,1267,688,1697,1258,1020,754,1559,1408,1804,1285,769,544,1595,2041,1815,1854,1556,506,887,1318,1155,2356,1438,1098,755,2738,654,2291
|
||||||
|
1554,317,2734,3047,2405,2172,292,1936,2060,989,1688,1641,1952,2357,998,1703,876,1741,2096,751,589,1598,2180,81,2595,1031,928,2083,2768,2487,957,1543,1376,2017,1130,2170,1291,1781,2149,1007,905,1670,990,2302,1502,1674,2565,1454,425,1914
|
||||||
|
2302,1730,2198,1950,1076,414,1262,1381,2297,1449,2600,2328,2020,2190,217,1760,1822,1238,1407,549,1243,1138,2967,562,1845,269,230,1386,1596,2329,1341,1976,991,0,1309,1844,1867,1341,910,0,482,1313,352,2709,1506,1600,1949,820,180,1321
|
||||||
|
1831,1106,1978,2465,559,1201,1147,862,2165,2154,1620,2661,1898,1036,0,1935,2740,881,1434,502,342,1533,1201,671,2601,1207,597,711,2181,1733,1207,2651,1174,740,2927,904,1105,1567,2231,121,29,1081,1263,2818,1689,2087,965,1354,0,2084
|
||||||
|
1318,1066,2494,3262,1089,870,1524,1687,2142,165,1969,1218,1805,1864,2219,1013,1506,1893,1689,1180,745,1124,1084,1700,2412,1296,1627,1287,2510,1553,1400,2191,556,2093,0,2095,2338,1235,166,1872,1606,990,648,2058,1205,582,572,2037,1228,579
|
||||||
|
1593,1986,1726,2899,2711,1196,1302,1067,1087,932,366,903,1107,1512,2438,1634,909,469,1961,0,0,439,3356,746,2521,266,2156,970,1228,2064,1814,1378,640,1115,0,1088,3361,2038,1506,430,1351,1532,0,2765,1503,1019,1515,1154,0,1268
|
||||||
|
1992,1467,2032,3002,902,1425,2195,2365,2515,499,1781,2391,2238,1968,1356,2248,1430,275,2128,830,144,1223,2254,853,1511,1384,1343,2549,2539,790,1531,1598,1579,1249,1433,2362,2854,786,2871,792,585,1557,314,884,635,745,0,1482,809,1578
|
||||||
|
713,924,1913,2804,1932,2341,1831,1070,2220,2320,754,1604,1865,1690,1780,1003,2115,1839,1485,425,848,2270,3167,434,3842,1064,871,801,1763,3145,1054,1954,1457,860,0,2005,2468,1999,1202,809,619,1810,729,1095,730,773,595,1267,760,1136
|
||||||
|
2929,2159,2154,1448,3438,722,1709,1140,2154,2497,1668,2960,1640,2004,1518,1111,1126,2350,1246,1096,584,2997,1260,1295,2488,1068,1520,1260,2266,2543,1237,918,512,1451,1507,1212,2122,2230,1069,3220,451,0,169,2662,813,1331,1102,1941,649,1559
|
||||||
|
2473,1655,1982,2721,1767,1431,1754,1439,1564,1477,1375,2967,965,1247,997,2062,1851,1507,1373,1673,0,981,2308,2083,2293,709,760,1107,1639,1728,915,2032,1371,8,583,1690,1587,1389,2041,1583,2215,961,751,112,0,43,0,2136,1055,389
|
||||||
|
2059,2890,2212,2468,2316,1301,1703,1462,1816,1201,1681,1919,1141,1520,2269,2010,473,2040,1225,2290,363,1789,911,1266,1593,725,2169,284,1739,2570,928,1477,895,216,1719,859,2287,2621,2274,1057,1584,0,0,2874,528,1474,1515,2527,0,2242
|
||||||
|
1019,1283,1680,2456,3027,1875,1068,1921,2507,1992,1107,964,2150,1795,1279,1458,2597,1740,1970,698,874,1628,1935,1236,3060,1492,825,1041,1722,2001,1191,2366,392,1206,1817,1851,1435,1625,0,756,0,463,1318,1678,1152,1152,861,1689,553,1441
|
||||||
|
1825,2505,1998,3328,529,1710,2109,1719,0,1681,714,2473,1926,742,2418,1103,1661,1332,499,722,363,2039,1806,474,2608,1076,2200,243,1499,2342,494,960,1554,0,0,1473,2005,2552,623,1520,527,867,1705,496,562,1131,369,496,913,348
|
||||||
|
1511,2513,2432,1298,1630,739,1457,850,1814,2095,2362,2310,1485,1707,1155,1506,341,2541,1915,1268,765,2060,2253,1727,2938,560,1858,838,1460,2615,417,1889,0,511,1373,1977,2449,2318,1143,2055,159,482,0,3181,1202,1709,1346,1218,521,626
|
||||||
|
2230,2404,889,1912,2632,0,1633,683,1131,2139,2377,2624,1811,1588,2639,501,2416,1951,1652,1288,756,1824,1682,1930,2097,903,2288,784,1831,2580,1201,1816,468,0,131,2043,2094,2219,1878,353,2004,0,385,2687,1068,253,1548,1746,1196,1156
|
||||||
|
1016,1836,1911,2303,1750,1089,2141,1629,90,1444,1860,1591,1463,0,1071,2135,515,1444,1499,1486,1316,1609,1420,1488,2354,290,1275,936,2165,2096,1046,1573,1244,429,779,913,2770,1467,1627,3200,247,766,1138,1502,600,1646,790,2083,1633,799
|
||||||
|
2308,1570,2526,2711,702,0,2347,0,1308,354,2291,2949,2886,136,1222,1867,1689,741,2638,2961,0,832,391,1441,1901,2013,2246,184,2701,1849,2227,1005,870,18,2009,635,1559,1524,1425,342,1717,661,0,1644,0,1550,1627,1667,498,1755
|
||||||
|
2699,2368,1450,2309,2920,1740,1901,1483,1300,1369,1494,2638,2331,990,1377,1579,2798,1678,2133,2091,729,2025,283,1434,1698,727,2273,2260,2332,1664,1305,1786,1840,0,1473,2216,1277,2018,1598,1850,2061,299,1162,2467,700,1942,1246,2543,643,2005
|
||||||
|
2303,1889,1963,2409,2040,169,1722,768,1931,273,1067,353,1985,355,1833,2014,2959,489,1561,845,222,1935,1102,353,1742,119,1314,1522,2581,791,1652,2288,2767,1449,2543,978,1235,1815,1553,700,778,920,0,3194,1489,1430,734,1340,19,2513
|
||||||
|
1369,1038,2670,2131,2125,599,671,244,1113,1148,2656,890,1165,1896,2125,1153,342,2018,1919,736,392,1947,2270,1160,2967,1007,2007,802,3222,2113,96,2109,701,379,810,687,1648,2372,819,2647,655,1495,229,1748,1787,1640,931,1588,342,1310
|
||||||
|
1359,2476,2376,2573,1458,1699,2294,1028,1264,1363,2241,879,3012,1482,2722,1867,1173,1274,919,1466,877,1373,1762,1456,1593,1436,1828,1248,2513,2257,245,2542,1491,0,273,1267,2106,1778,728,1691,1413,887,0,1297,1392,1558,225,1457,1589,921
|
||||||
|
1545,2658,1857,1791,2717,1745,1590,0,1406,1831,1894,2172,1397,593,2097,1047,644,1154,2110,0,228,1211,2314,1924,2777,334,1094,639,2011,2949,0,1814,1491,0,639,305,749,2269,1668,1601,1163,436,0,952,266,1147,105,191,176,13
|
||||||
|
2746,1040,3034,2477,2554,1649,944,2292,1497,1904,2013,2420,2248,775,1170,1486,1978,1254,2355,1729,0,705,883,1130,1562,796,2887,1929,1653,2504,1020,904,0,856,1995,0,3118,1186,369,1321,634,114,1596,2331,1641,2601,1324,2367,452,786
|
||||||
|
1712,1930,735,1820,2371,1721,2086,1831,965,2772,2306,995,2539,2241,980,1745,1153,1100,887,0,1310,2251,1149,2514,3340,1380,1110,1277,2340,2870,827,1817,757,74,1014,1050,1024,3052,353,1870,0,430,1453,2381,1665,2137,508,782,777,799
|
||||||
|
990,2214,2645,2615,3139,1246,2187,341,1073,1983,1718,2283,1477,1697,1407,2061,1082,1723,1439,1779,0,1913,1087,1496,2497,1293,681,993,2428,1376,2093,1474,1588,701,2640,1448,2291,2283,929,2101,0,1903,301,3345,1625,1573,525,2617,1625,2670
|
||||||
|
2133,2529,1594,2140,304,2168,2569,2699,1311,859,1749,1924,1272,2152,1356,1747,1889,167,0,1606,1376,1965,1832,683,1542,891,2290,2164,1106,2431,900,1059,809,0,2178,2363,2299,1817,2336,1683,1114,1006,820,2234,0,691,769,1638,1625,1823
|
||||||
|
1069,1618,794,2605,1962,563,2316,676,1039,261,997,597,1514,1943,2706,1910,1350,925,1708,1050,351,653,2196,1958,2339,609,1230,841,2585,2296,1924,1746,1466,1271,0,1108,1260,1675,426,344,2231,524,101,1471,397,254,0,1803,397,594
|
||||||
|
2374,2105,1551,2502,1189,1218,1187,2194,1063,1682,1581,1286,1363,1736,1749,1111,2923,745,904,705,347,1990,1731,1013,2290,458,1381,1212,922,1863,1653,946,1114,744,1588,933,1743,1996,621,143,795,646,1697,2232,1900,1776,292,1568,439,692
|
||||||
|
3134,1056,1915,2000,2302,886,2068,1510,1383,709,1253,2565,2407,2110,1028,1580,1854,1304,1930,381,239,1347,1600,380,2233,1455,1260,2001,2467,1700,2662,587,1235,1716,1268,1781,2547,1180,1180,1212,442,1413,653,1742,618,884,1556,982,1211,1119
|
||||||
|
2656,2375,2681,2710,2028,1162,2235,1159,1873,1400,2243,2342,1121,1420,1339,1591,624,2024,626,1385,53,2022,2125,1428,2695,0,666,1284,2108,1638,1151,1750,1182,1330,1932,1352,1344,2212,1465,2718,772,1758,211,1857,1592,1766,511,1891,0,1363
|
||||||
|
2070,3063,1735,1019,1454,891,2301,1296,1483,1084,3114,2529,2639,2132,2221,147,1503,1521,1534,698,1490,1716,843,1555,1581,803,2268,1168,2069,2672,1277,920,0,726,1077,773,2869,1281,798,2141,343,798,193,2365,686,1539,1406,840,1349,863
|
||||||
|
2901,1549,1638,2500,1655,1062,2517,1855,1999,1864,1569,2186,1036,1230,2591,2149,1298,1525,1418,2150,63,1487,1143,1880,2231,1686,2250,963,2313,2405,1695,1380,423,571,1621,2635,2469,1430,2042,2175,2495,31,0,2374,0,368,506,2627,603,1940
|
||||||
|
2424,2362,1461,1962,884,284,2791,655,1071,1888,1889,1365,1098,1165,2228,1484,2393,1834,1495,1988,506,987,1922,1670,2709,725,2326,2056,2206,2213,1597,1558,0,0,1293,1378,2400,880,1203,2188,1458,24,353,1892,474,371,306,1178,1354,1014
|
||||||
|
2733,2647,1705,1896,2534,914,2370,1605,1747,2095,1207,3490,2067,1960,2253,1071,1721,1515,1340,1082,41,1082,1527,1615,1230,0,1353,1442,1982,1403,1610,677,498,540,1467,691,1667,1663,638,1347,880,139,0,1905,658,1322,313,782,414,362
|
||||||
|
2462,549,1698,1714,2917,875,2179,1275,1182,2212,468,2951,336,1302,0,2714,1244,1826,1684,1970,485,2626,1583,743,1733,429,285,1277,1537,2622,2602,732,587,511,2272,1647,2756,1955,212,2111,810,1423,464,2563,1256,1563,2044,2079,674,1369
|
||||||
|
1954,1217,2279,3279,1352,1552,1557,1617,0,749,457,1640,1276,118,1650,970,2124,1409,1267,1270,0,1362,1766,383,2394,662,1611,1072,1796,1802,1413,804,1366,546,1748,1460,638,2079,1928,1427,2113,876,525,1389,941,536,1000,2111,1103,1212
|
||||||
|
3299,1864,1244,1556,4413,2628,1573,2386,451,3725,378,2414,811,1321,1550,284,3107,1341,1836,889,0,1603,2889,1545,2928,150,1400,1652,624,1670,2280,916,1310,0,2233,2346,1426,2787,0,1411,523,770,1800,2003,1619,971,653,2645,31,976
|
||||||
|
1858,1556,1974,1867,3576,260,2014,870,1469,1313,1226,2241,1856,1272,848,2930,1084,313,2180,1456,527,1718,1160,1635,1669,1380,1405,1426,3031,1958,1730,1816,1299,470,1007,334,2738,2033,1068,2014,946,599,282,2157,746,1952,1037,1649,699,1866
|
||||||
|
2581,1622,1850,2541,2286,880,854,869,2246,1259,2173,2915,161,627,2183,1666,2025,307,2685,2051,0,0,1010,1515,2573,700,2148,1861,2277,1464,431,1274,0,1164,702,256,1534,609,1777,1974,1801,959,769,2432,1366,2345,1708,1015,378,722
|
||||||
|
1352,811,2153,3092,1656,420,1946,1099,1754,2068,2399,2874,2010,2201,1553,2100,1662,1650,1461,1037,460,3167,2495,395,2394,979,0,563,2732,1534,671,2078,2550,94,884,1748,634,2815,2481,481,916,1756,212,1405,2495,1686,933,1515,779,1518
|
||||||
|
1654,1868,1698,2682,1317,602,2000,609,1000,1985,1083,2460,988,495,1471,1480,2182,1404,1531,1556,68,1592,532,1164,1675,0,2001,648,1928,1581,1813,718,2937,508,2809,1813,2038,1796,1287,734,1876,187,0,3476,1222,1640,0,2202,648,1844
|
||||||
|
2361,1886,984,1943,2306,648,2018,1559,1525,1412,1020,1128,2691,1231,2466,1700,1968,1168,1685,845,0,3716,741,1762,2176,2283,1577,986,2251,714,1117,2102,853,5,820,1528,784,2945,2032,998,901,346,720,1967,1532,1641,417,2939,480,2448
|
||||||
|
2903,2150,1000,1339,1192,1137,2191,2501,1219,1305,2030,2294,1754,1547,1594,1172,1807,2556,1045,1405,1066,1043,1687,1670,2002,257,2528,1212,1603,3371,958,2330,0,268,1630,1149,2345,2091,1468,1763,1062,173,1022,1637,736,1273,514,1867,0,481
|
||||||
|
2903,1168,2492,2921,3149,1702,650,2125,2273,1588,3256,2350,2613,1787,1131,285,2229,1832,1041,1143,342,580,1040,1504,2395,1157,1817,1116,2604,1967,1269,1848,108,1227,312,1466,1148,1431,1884,1606,1460,553,1476,2244,993,1186,1331,3633,97,1195
|
||||||
|
2414,1833,551,1827,3113,2266,1401,1804,887,2361,0,1821,1802,785,778,1163,1868,932,835,0,237,2443,1594,910,2506,978,1543,952,2041,1427,655,2420,2725,360,1881,2281,1372,2473,1115,1700,0,1044,1764,2127,1275,1087,0,2220,0,2416
|
||||||
|
1997,1797,1180,1859,68,0,2078,396,1695,1372,2036,2040,2086,1800,1593,1911,1046,1135,1853,542,1425,2638,2190,710,2022,523,500,527,1918,2420,1968,1246,1671,2148,1260,1181,1704,1808,655,419,1155,689,0,1603,2024,1662,1754,0,204,1479
|
||||||
|
1924,1191,1429,2567,1940,784,1191,2102,1138,767,1104,2567,2027,1360,1932,1045,1880,1416,818,1173,1153,1576,1741,0,1769,1113,1573,895,2032,2592,1824,1150,144,754,723,1115,2465,1753,1401,1257,948,1379,1141,2323,177,1145,1953,2319,860,1317
|
||||||
|
2082,1244,2356,1753,2243,769,1738,1764,1330,1355,1914,1814,2729,620,1333,1164,1883,1218,2506,240,388,1844,1961,971,3062,1546,1060,1419,2722,2063,943,1607,1624,685,1168,1534,1996,1933,1390,1954,421,979,778,1551,1770,1596,863,1262,1656,1047
|
||||||
|
2522,818,2364,2136,3026,656,2074,992,783,1386,2466,3365,2500,1333,865,1336,1937,2015,1781,850,546,2207,932,975,1493,0,718,1480,1731,2766,1643,1121,1653,529,1501,1521,1501,2751,2013,1592,1004,939,1028,2295,1663,1354,594,1313,77,746
|
||||||
|
2429,1979,1742,1800,2760,1227,1680,1661,1663,1382,1607,2535,1078,1864,1659,849,875,1986,1615,1735,679,2140,1878,844,1915,350,1037,1715,1864,1833,1226,1479,1934,653,2291,2005,1527,1772,1029,2181,1298,1408,497,2986,890,1209,1353,3021,388,1345
|
||||||
|
1763,1362,2389,2202,2871,0,1144,1689,1198,1330,1163,2919,1243,1813,759,2990,1259,988,2261,911,0,2206,2274,1037,2432,1518,0,917,2244,1626,1122,654,1208,473,486,1186,1310,2618,2005,1896,0,644,99,1410,1309,2084,1180,506,690,1195
|
||||||
|
1739,1574,1903,1570,2215,1652,2400,2030,2298,2454,1266,1305,2733,2302,2470,2332,1756,1479,1755,921,345,1286,2393,1041,2452,666,1529,2365,3377,1311,1577,1284,810,217,1504,1568,2529,856,2051,0,913,114,169,2064,522,1606,1123,1712,1945,2202
|
||||||
|
3808,888,2241,2379,2897,219,1488,2284,1965,1563,1780,2460,1547,2020,1299,1817,2470,1027,1987,1249,0,325,2332,2072,1706,0,1426,2045,1558,2114,1928,1339,1587,560,1515,2618,1586,1840,0,491,2138,599,775,2552,1109,866,340,1003,0,0
|
||||||
|
2439,1134,1595,2010,882,1241,2152,1326,1104,1478,1398,2737,1949,1955,1485,1436,1841,1902,988,529,457,1681,1305,457,2015,707,1661,2903,2670,1939,1476,1078,531,37,290,2520,2047,1591,2172,1575,1576,1016,926,3222,1903,1333,1007,1512,1328,1202
|
||||||
|
2820,2774,1683,2538,2829,783,1685,894,1441,2374,1534,1888,1024,55,1216,1515,2300,1601,2152,2046,0,1719,808,1950,2583,915,1895,0,1450,1993,1271,1646,1412,163,1505,375,1121,2385,2224,883,1201,314,0,2388,514,1792,796,2174,0,1148
|
||||||
|
2180,1575,1294,1839,2783,475,1224,869,1018,1879,1133,1088,1677,2526,1797,757,2371,2269,2219,308,452,2011,2683,880,2694,394,1706,1792,1335,2362,2215,1119,1494,1648,294,2101,2272,1699,30,859,324,1038,1164,1854,1443,799,976,623,0,1366
|
||||||
|
940,1855,1518,2575,1664,673,2281,1260,1269,373,1689,1206,1630,1475,2010,1619,3353,160,1726,1599,644,1391,903,1763,2259,904,1277,1636,2976,368,1687,2104,855,115,1452,604,509,1650,1236,944,881,594,1483,1305,787,1082,333,1636,1081,1242
|
||||||
|
2038,0,2107,2729,2151,814,2430,817,1086,2589,419,2523,861,2067,2962,1840,2323,1118,1584,1642,0,1860,2033,890,3095,1442,1546,1904,2357,2981,1255,717,1865,0,1794,1481,1896,2273,1041,1000,2136,1707,850,2491,1427,773,945,1185,2180,1586
|
||||||
|
1992,2394,2414,2800,1197,1151,2543,759,2351,2604,2422,1912,2010,1024,2865,1948,1726,375,984,1833,413,1650,1872,250,2650,825,1145,1722,3356,1126,599,1545,1067,0,1954,761,1911,1449,2317,673,1212,1002,0,2622,1674,1778,1660,1141,2114,2445
|
||||||
|
704,882,2928,2947,1023,1761,2541,268,2272,2033,1010,1981,2083,1709,1144,2220,1714,1802,817,1365,964,2053,1341,207,2860,965,1385,1546,2864,2052,1043,958,30,0,1894,950,1396,1504,1089,1399,1003,479,547,1862,0,1440,1298,1103,1766,2667
|
||||||
|
1313,1626,496,1521,1105,0,1891,1024,365,1748,1455,1817,1292,1857,2854,1745,2198,1627,1694,2034,295,1184,1427,799,2704,2128,2235,570,2514,2110,1834,1549,822,487,787,1425,2544,1846,2227,496,893,371,0,2549,1787,1013,1552,1117,2035,1662
|
||||||
|
2520,2348,2862,3140,1712,1175,1164,1345,1845,1251,2332,2239,1973,1571,1051,1652,2063,743,1114,1500,0,67,1903,1653,2184,1362,2050,1464,2540,2360,880,2114,375,833,1534,966,1632,1541,1585,1281,1350,631,674,2439,1182,859,1095,1929,749,1383
|
||||||
|
1953,1990,1274,1659,2427,0,1594,1068,1874,576,1304,1712,2615,1855,1436,1025,2649,1692,561,895,1969,2157,2020,618,1833,726,967,211,1871,2365,1496,3135,1578,126,972,1343,2152,2391,1159,589,1697,746,0,2184,778,337,1463,1666,945,1497
|
||||||
|
2593,1377,2827,2579,1865,241,844,1244,1251,597,3161,1573,2500,780,1303,1659,1878,770,2935,2323,0,938,1305,1239,1448,1117,2253,1058,1643,2085,2291,1685,988,790,1601,1163,1898,2333,1514,890,1153,1368,0,3026,1988,2366,1572,2072,0,1261
|
||||||
|
2249,2345,2806,3723,1736,1317,1581,1347,2474,557,1900,2089,2071,1660,2566,610,3340,743,1023,2208,0,1071,2415,105,2377,1069,1431,1269,1308,1689,600,1514,1288,810,1721,287,558,1586,2306,0,1161,1658,230,1352,921,1169,2081,1804,431,1739
|
||||||
|
1049,2259,1418,2619,3266,2322,1505,763,2503,2645,1148,1644,1319,1515,2471,1671,2641,328,1794,1105,0,1529,1449,1560,3602,949,1527,899,2185,334,1056,1841,277,60,1586,1269,1245,1800,722,356,445,209,1072,1159,879,1767,545,1245,1053,1573
|
||||||
|
1206,1742,2694,2248,2107,1551,1112,990,1410,1319,1116,2502,2714,885,1235,1646,2649,915,2578,839,306,852,3139,0,2646,599,0,1393,2446,1559,1143,2104,2060,0,1267,1551,1480,1341,2765,0,1588,1624,6,1469,1618,1153,977,715,1558,1282
|
||||||
|
2380,142,2170,2170,749,284,2126,1661,2243,1285,1799,1502,2430,2238,2020,2320,0,1717,1074,599,748,2848,1974,663,2416,1717,1234,1997,2933,2785,1146,1215,970,1522,1194,1546,2330,1956,2077,1750,846,1108,0,2763,954,521,627,1928,1468,2000
|
||||||
|
1415,2435,1720,2064,1151,2177,2325,834,732,2169,799,1726,1781,1159,511,1232,1638,2729,129,1185,1654,3770,917,687,2452,864,1517,996,1850,2352,1406,1822,1635,0,1831,1211,2217,2602,1748,2113,1058,451,348,2141,914,1545,1111,3020,1174,2223
|
||||||
|
2283,2340,2089,2670,1066,1731,2062,458,655,3170,1580,1994,1604,562,1427,2436,1755,1246,772,1501,0,1649,940,1572,2451,1550,1434,932,2445,1778,1295,1439,825,0,1423,1247,2159,1339,1717,1401,1411,217,471,1686,1436,1975,56,1685,1353,1616
|
||||||
|
1532,2284,2061,2377,3430,809,2236,645,2441,1825,829,3929,1087,3027,2159,1445,1354,2280,1108,1390,797,2918,2918,541,2497,0,313,1113,1728,1659,2161,1460,1843,662,1018,1346,4174,2760,1548,663,60,1636,339,1426,692,2124,1374,1376,347,651
|
||||||
|
3635,2277,924,1048,3744,0,2587,650,1321,1739,2133,2389,2784,2897,2164,1544,1252,2262,1324,1507,94,3057,912,1292,538,1599,2914,1923,1899,2661,1786,1139,951,694,1425,1574,2708,2407,1631,1138,94,0,0,2391,734,926,1305,1752,0,1204
|
||||||
|
2076,2035,2252,3235,2072,1942,1445,1976,1388,1185,2561,200,2122,2368,1624,765,2942,1895,798,1339,608,2768,1686,184,2757,1392,1228,1795,2741,1700,1788,1206,1590,542,2095,1738,138,2653,2184,714,814,641,542,1768,1748,1760,2066,2793,0,2437
|
||||||
|
998,2467,1517,2436,2153,1407,2284,242,1615,2137,2050,2035,2365,1628,1754,396,2464,1938,553,1191,1633,3438,1061,0,3084,871,904,1066,2313,2443,1064,1718,1251,740,1831,911,1768,2384,1730,1425,131,1086,866,2516,1649,1908,1821,1701,1012,2324
|
||||||
|
1082,2043,2921,3184,208,388,940,2727,1391,374,450,2175,1271,1296,1293,1683,479,498,826,1607,317,1959,2129,437,1365,1571,1841,669,1251,1293,113,1753,1383,0,236,1155,2033,2129,2455,391,1823,421,368,2179,352,584,1963,2586,1756,2465
|
||||||
|
3167,268,1287,2254,3200,1053,2282,1975,1538,2235,1089,2188,2248,2982,2212,1542,2032,2079,1128,904,177,2366,1250,1280,2269,1300,1471,1977,1995,3237,2107,1220,1409,647,1502,1980,1110,3039,520,1493,1805,1138,1215,3359,1311,450,765,1899,1246,1656
|
||||||
|
2369,1503,1118,2238,1400,506,1379,784,1840,2246,2132,2569,1289,1249,1587,2215,2584,774,2559,638,390,1829,2628,759,3281,1689,534,269,2557,1007,948,2759,1387,83,1126,1948,1221,2337,2224,359,585,1137,44,781,1937,1671,921,0,142,414
|
||||||
|
882,1533,2775,2385,2081,2069,1792,935,1643,2260,1452,2847,1758,1761,644,1909,1796,2009,2180,1499,25,484,1720,1521,3564,1747,1597,997,2462,2565,1481,2102,0,0,1991,887,1960,2664,2519,1059,103,412,0,2539,450,1922,1316,1225,772,1575
|
||||||
|
2810,1047,2084,2720,1910,1063,1206,1923,1239,1834,819,1093,2403,726,1385,731,2442,1656,783,1102,498,1642,926,1418,2356,686,2742,1017,1411,2381,1419,1870,676,164,1167,898,1206,2096,797,1052,2488,0,1122,2409,172,582,1483,2327,891,1638
|
||||||
|
3050,372,1823,1140,3043,1159,416,637,747,1539,712,966,710,143,1064,1152,2036,884,1969,932,0,1260,1418,1407,2346,1381,2481,1614,1332,2593,560,2178,297,160,2810,1301,1655,1361,452,1734,1062,530,1858,2781,794,477,1150,2427,624,1312
|
||||||
|
1242,2177,2427,1991,2375,1759,1013,1050,1525,1973,539,1871,1738,179,1183,703,1749,2054,2721,920,449,1898,1799,450,2395,1087,2262,1166,1336,2415,454,1580,15,770,925,1961,2501,783,0,2611,835,833,1304,1755,537,1323,1333,1263,886,1853
|
||||||
|
1889,783,928,2079,2284,1395,1756,2233,2277,3292,1144,2808,1024,1429,2403,1464,3872,2423,1840,1766,15,1439,1945,0,4008,1104,1193,2046,3692,744,1606,1799,535,132,2164,2914,1169,1019,2676,1117,1102,841,1265,2990,1939,2153,1734,2663,1142,2496
|
||||||
|
1847,1985,2722,2763,2426,836,1194,1703,2163,2355,1918,3048,2140,2081,828,1030,1508,1498,1303,951,498,1330,3038,942,2710,566,360,1107,1901,2541,1228,2078,1401,487,1294,643,2301,2740,1652,680,339,1293,365,2102,1690,1360,1208,1390,159,1086
|
||||||
|
2836,2172,1921,2588,1375,1087,2881,1033,1044,2490,2271,1956,872,737,1186,1893,1504,1510,744,1513,995,2959,1046,651,1970,341,1579,1707,1805,3014,1389,56,0,347,1829,569,1728,2316,897,2756,1017,533,531,3518,976,2063,2147,1850,1013,2293
|
||||||
|
2410,2708,1320,1839,2767,952,1184,1176,409,1557,2309,1506,873,0,1685,1270,2399,442,2134,1750,94,604,2452,1928,2092,178,1262,448,1668,1392,943,2386,1151,0,1278,1417,1191,1733,1291,1334,1554,791,299,1679,1735,1367,565,2626,203,397
|
||||||
|
2049,901,1077,1695,2569,466,1246,1775,2229,474,2448,3498,1308,1227,1448,482,2287,1429,2787,1524,2082,1424,1552,302,2571,0,578,1717,2618,1250,1545,1891,1305,1404,1151,2530,1786,1031,652,2363,848,1672,1672,1841,901,1257,1517,1340,588,16
|
||||||
|
2445,663,2591,2465,2029,1077,1027,497,2453,1619,3125,736,2487,1167,1593,2123,1649,1117,1451,413,807,1983,1774,737,2906,1762,1006,1431,3091,1705,820,2382,0,1577,1344,926,1860,1186,1047,2112,64,1176,1063,1357,1797,728,580,1413,1508,1809
|
||||||
|
1307,1597,2406,1320,1992,688,1407,1008,225,669,841,984,1820,780,872,2849,929,150,2115,1067,0,1426,624,849,1951,2419,1842,1439,4004,750,1106,930,1835,186,606,1978,1567,1008,1998,1342,0,12,240,2205,1381,2440,1316,1685,789,2658
|
||||||
|
1251,3100,1084,2009,3847,1609,2116,734,1988,3296,1541,2428,1255,1810,1845,2177,1731,924,2046,373,467,3015,2074,1200,3175,1056,825,265,2366,2006,995,2029,1537,322,1596,544,2447,3083,706,1586,0,1644,1053,2856,2001,2280,549,1706,368,2193
|
||||||
|
868,2007,2013,2370,2449,876,1665,453,578,383,2043,1279,1071,953,2605,1258,2668,1476,2072,2365,508,991,2053,245,2751,413,740,685,2630,2301,1945,1365,2411,843,573,1546,1626,1905,1677,961,1500,1702,0,2336,2003,1771,1482,1999,443,574
|
||||||
|
2081,2171,2561,3191,1397,1024,1184,1494,1706,1602,945,1381,2025,2632,1481,1647,619,871,799,3,0,1268,2923,1173,1771,356,1528,2505,2424,323,899,975,2226,1324,1106,2297,1229,1192,265,865,432,522,432,2306,1551,1657,417,1433,530,1876
|
||||||
|
1430,1547,2197,2572,2905,1155,1878,1606,85,1960,1102,854,1698,1289,1659,2530,1667,322,1876,1258,0,2300,1886,1608,1921,1636,1808,759,896,2736,1844,517,1147,403,889,1109,1773,2956,1138,1682,551,1290,458,2815,1336,1135,272,2164,878,2195
|
||||||
|
1574,427,619,1439,2804,1372,1526,2058,560,297,130,1280,2090,1289,1159,1980,3404,0,1338,0,0,1694,1619,739,2399,997,700,893,2698,283,1769,2394,1916,68,1659,2224,657,2379,2279,0,434,1721,2242,1713,1687,1128,140,1825,437,1765
|
||||||
|
1754,2070,2188,2338,2436,1288,1459,318,0,1051,1176,2247,1057,0,0,1823,1688,1290,2160,2390,0,626,1500,2004,2450,793,1752,809,1565,2701,1270,2536,1379,52,1963,1096,1928,2498,2341,1765,1050,1387,756,1600,747,1277,406,1996,0,736
|
||||||
|
3006,0,2009,2367,3811,30,1438,1264,2040,589,561,2821,2691,2485,1466,2564,2737,785,1928,1721,0,1543,1531,1687,1787,2067,1803,1869,2435,674,2604,2558,531,272,1505,1734,1761,2874,2727,0,1429,1294,989,2992,902,1023,549,3317,395,1895
|
||||||
|
2565,1121,1391,2538,2949,1402,1953,2515,784,1274,1884,3375,1909,414,1479,1563,2591,1468,1768,1255,1134,363,1769,704,1842,290,1737,1206,2431,2013,1729,2138,0,756,397,1260,2724,1791,1863,2623,644,1453,1676,1393,749,431,1234,1905,999,1156
|
||||||
|
1664,818,1549,3178,1565,587,1569,2354,1525,1848,1280,853,1720,2639,3381,1510,497,2211,1542,356,0,1355,3063,1123,3174,1602,2152,2533,2280,2421,684,1362,864,1568,0,1956,2365,1711,670,1940,615,938,754,1706,1291,1231,0,1089,1197,902
|
||||||
|
1213,841,1909,2536,2577,1701,646,816,1821,996,86,928,1184,1202,971,2283,2047,1132,2044,825,0,1035,1676,958,2874,1236,1710,1175,853,1431,962,2632,0,204,1072,959,1559,2362,2121,0,796,726,639,2370,1093,941,831,1353,559,1668
|
||||||
|
2362,458,2394,1967,3153,2433,1734,1445,2052,2973,1454,1881,1213,1176,1046,2123,1566,1296,1500,439,651,1838,1384,1189,3158,1237,1467,1393,2145,2856,1082,1334,0,1063,1511,1153,2906,1623,439,2748,216,672,1579,2749,1117,1188,558,1948,1511,1425
|
||||||
|
2711,1844,1915,2180,3206,543,1871,1302,1468,395,1632,2525,2679,1733,1918,924,1924,1187,1039,743,0,2270,1823,950,1778,1083,1214,793,1465,2127,1555,806,2097,1780,1464,1481,1349,2115,896,1358,518,1832,612,986,598,712,163,2225,494,1936
|
||||||
|
2165,1944,1625,3331,1116,1213,1800,1653,1292,1841,2160,1689,2455,505,2013,1079,1946,1708,297,1087,1036,481,1826,983,2507,172,2138,565,1276,2260,1619,1662,476,0,949,1410,2711,2065,1178,243,1637,267,0,2087,1080,911,624,2196,1444,787
|
||||||
|
2333,1496,420,1421,3473,640,2446,174,1094,2126,650,1859,1475,666,3112,1436,2918,1999,2766,1756,0,2314,0,1729,2496,700,2621,2079,2947,1831,1612,834,1282,0,1310,1432,1194,1265,873,1150,2551,0,1030,2763,963,2260,793,2323,973,1610
|
||||||
|
2720,1079,3268,2186,1412,1314,1353,2260,1909,2324,2987,1896,1930,1711,0,2257,1816,1731,1718,208,1907,1806,1933,867,1484,0,558,1649,1919,3328,1958,1094,513,1064,1935,412,2883,1616,376,1986,400,895,1424,3477,1390,2085,1587,1517,291,1326
|
||||||
|
1934,1617,1075,2125,2559,337,1516,1495,1696,2046,1642,1178,1415,1514,1591,2206,2343,1002,2043,364,612,2152,1399,1570,2788,1279,1348,546,1809,2308,1677,1870,66,365,1756,1034,1961,2799,311,1338,189,700,912,3228,1941,1914,633,1172,183,1776
|
||||||
|
1648,1365,1280,1693,1790,597,1433,2505,1926,480,0,898,1618,1545,2079,1822,2222,0,1799,32,0,1119,2300,1607,1806,2161,2789,1230,1208,1305,0,2767,783,852,0,2141,2215,1501,1778,884,920,685,692,2322,1315,899,0,1232,144,1529
|
||||||
|
1534,1178,1808,3093,2603,643,1654,819,2431,1449,1455,1173,1804,721,3097,1888,2053,0,2335,1041,0,1145,1392,2265,3005,1385,1476,1487,2118,1366,180,1931,3006,582,943,1726,654,1376,705,1138,1439,451,583,1714,1481,1608,0,1387,1120,838
|
||||||
|
2583,1781,510,1481,2399,1429,1304,1578,1379,2844,1271,1196,1435,1760,1238,882,2865,1463,1855,269,646,709,1236,1928,2822,549,2117,1249,796,2156,1887,1165,939,911,2315,1332,1453,1112,0,346,300,0,1383,3408,811,647,725,1709,1203,1210
|
||||||
|
2194,227,1312,2459,2028,883,1351,2219,1847,3,609,1454,1805,2488,3062,784,2598,1808,2238,789,233,1157,1432,617,2490,1218,1634,1921,1609,1268,2272,878,985,2247,309,2050,1451,1066,551,981,1336,1348,1353,2293,658,6,956,1827,1502,834
|
||||||
|
2191,822,1363,2109,2137,984,2347,1398,2873,1543,1697,1452,2297,2152,2555,1826,1558,0,930,0,639,1437,2204,519,2852,849,1621,1754,2881,2539,1332,1761,950,1176,556,1772,3140,1289,1022,1366,849,1934,1284,2783,1523,1176,609,770,842,1666
|
||||||
|
2956,1678,2570,1847,3206,1474,1422,1250,1792,2730,2022,2383,2554,2851,1450,957,1590,1124,1815,1435,233,1735,2779,1268,2243,1739,1828,2259,2032,4086,997,1282,574,150,1422,831,1546,2473,1512,923,1314,667,0,2336,483,633,2931,854,879,2052
|
||||||
|
1427,1530,2256,2071,2301,705,2355,679,932,2230,401,2123,2109,1816,1769,2198,1280,969,880,118,0,1848,2794,1034,3081,727,445,859,1911,2697,1566,798,1330,0,676,1228,1515,2886,1022,584,628,1134,150,2660,1831,1160,789,607,1360,1804
|
||||||
|
2035,2130,2127,2662,734,562,1066,1731,2195,1348,1966,2674,1549,1689,1697,518,1757,2212,1355,690,1195,2109,1910,0,1648,0,1399,1527,1372,1856,539,1280,1679,1126,1124,2650,1970,1560,882,775,846,733,665,2570,1634,1731,1337,597,104,866
|
||||||
|
1769,133,2648,3552,91,895,2453,0,1495,1749,2403,1779,2800,1569,1670,1119,2059,2238,1569,1716,491,1426,285,984,2938,0,1966,1512,3050,1655,2388,1064,2042,995,2702,1023,1103,1319,1633,365,2673,581,59,2516,856,805,439,1522,1527,1308
|
||||||
|
1633,2347,170,2266,2325,1106,2272,1398,1660,1483,661,1197,856,1968,2436,757,2030,1898,1242,1315,1279,1221,1727,800,1955,203,1709,911,1057,2090,2210,2031,2004,560,1802,2262,2455,1605,0,1078,1575,931,222,3289,800,959,1061,2240,142,1502
|
||||||
|
2430,1433,1217,1965,1139,0,2583,1269,1166,1795,437,3021,1319,1811,1371,1265,3620,926,1118,1152,353,2616,828,1257,1038,122,1875,1693,1960,1708,2882,789,1555,1424,1779,1064,3194,1504,2578,651,1557,103,471,2290,1228,1339,706,1015,176,1499
|
||||||
|
2604,1182,1488,2195,1465,993,1807,1130,1251,2227,21,2422,1877,1719,2591,1387,1722,2338,1872,1227,0,3403,1693,0,2314,1668,2266,1782,2062,2024,1486,1270,919,1553,876,1659,2557,2027,1894,1171,1192,889,201,2249,2075,1680,1703,1523,474,2177
|
||||||
|
1993,1655,3131,3054,2011,2120,2196,1578,1808,2154,1720,1459,2301,1840,1525,1562,1776,1601,0,0,950,1887,2853,666,2504,0,253,2532,2808,1692,595,1910,2103,0,1035,1112,1570,2552,1406,2305,1172,1175,1053,2355,2009,1523,0,1364,1532,1113
|
||||||
|
710,1022,1456,1748,607,2045,2514,1888,1568,0,1389,1350,1316,0,1909,1200,1621,851,2092,1645,2244,1308,1564,1142,875,2143,1697,999,2796,1184,1675,672,1161,1466,1179,261,1087,533,1797,570,1054,640,865,1051,1512,413,1701,1261,778,1383
|
||||||
|
1472,1258,491,960,903,2124,3078,1431,2613,343,1506,1919,2216,1400,1010,570,518,1423,1877,1512,2505,646,1857,1675,1829,605,2450,0,2444,542,776,728,965,1019,2169,0,1693,483,738,987,523,2039,969,2295,1144,2197,1298,1255,1799,954
|
||||||
|
968,434,1841,1379,274,646,2804,1885,1341,845,1323,1184,1722,243,2667,1056,1137,0,1217,2431,1664,1539,2503,2147,1264,0,1451,0,1693,1110,2222,743,1268,1413,1007,0,2251,463,348,1228,1687,595,1902,1158,1576,308,0,1547,1133,1909
|
||||||
|
1098,1245,948,894,1089,1420,1434,968,1765,0,1357,1021,2198,0,1639,1620,967,304,1356,1070,1956,1854,370,1071,1408,1767,3339,568,3024,788,1267,15,1310,1159,1518,422,1866,878,1257,971,1116,1536,1629,1620,1396,1266,2367,1131,460,845
|
||||||
|
380,734,1317,1423,1032,2129,2070,2014,1710,757,1745,2662,2513,0,2297,2111,0,527,2704,1327,1761,669,2600,1108,2486,0,2998,408,874,85,1647,1136,1327,1499,1004,0,788,2214,1510,1922,1486,1972,2197,1317,1164,1135,0,2593,304,1383
|
||||||
|
2152,828,586,1649,918,2172,3130,1139,1421,1960,1692,2865,1429,2385,1218,2708,482,2324,2753,1172,1422,1286,102,1726,960,2619,1458,0,1774,193,1513,1056,882,2481,3974,0,906,0,1683,0,1158,1128,2408,475,1073,2399,242,1400,1762,1516
|
||||||
|
1598,1651,852,1911,0,88,2141,2299,2116,1860,949,2028,827,2573,713,826,47,0,367,2298,2644,1486,2198,2646,1199,1222,1940,1469,800,213,1389,553,343,3256,1861,263,1478,605,370,230,1256,407,2358,771,866,1273,1089,966,2277,906
|
||||||
|
1022,747,1859,1026,796,2295,3607,1809,1317,613,1739,430,2664,425,2644,1836,334,1070,1794,1659,1304,2503,2313,1065,1627,553,1962,978,830,0,1115,849,432,1731,1122,1224,622,1113,1255,272,2077,1476,2500,1037,1842,1261,1095,1597,720,2420
|
||||||
|
1364,2682,805,1686,1732,854,3620,2189,2331,0,1754,1172,1486,1097,1218,491,1326,0,927,346,2270,982,2256,1232,1023,222,1830,1797,1596,1532,1204,0,1839,2285,761,861,1530,1335,479,0,1187,1380,1585,2127,2627,613,2487,1538,553,580
|
||||||
|
918,1207,667,2678,0,777,2975,1827,958,1438,1587,2107,1878,1354,1466,1088,1635,0,1735,1591,1631,2132,1623,2190,1329,1283,1437,222,1385,667,1937,1063,1425,1039,1470,440,519,621,485,0,2558,670,2349,993,1375,1981,331,2932,1187,1535
|
||||||
|
650,1422,1785,515,0,1027,965,1469,390,2501,697,1596,1450,2332,1865,2067,696,2157,1061,1847,3446,2135,1421,1513,566,1198,1905,522,1035,674,317,1374,1509,2702,2652,342,710,976,1229,651,2312,1090,1153,1215,2434,1673,707,728,1974,935
|
||||||
|
2422,2937,1097,1288,1025,715,2073,977,1264,770,855,2014,600,833,339,679,1015,0,2007,1928,1369,1911,1659,2231,2610,456,589,362,2130,1352,1415,1981,2487,613,2246,729,2697,2471,686,1631,878,2227,1442,544,1724,951,1495,1042,1424,44
|
||||||
|
1417,2122,1869,1164,1779,1251,1558,1058,2531,1010,1229,1473,3408,0,1784,1009,469,687,1500,993,2505,482,2809,2252,2297,0,2097,0,1876,84,962,1559,598,2852,1507,394,2320,1861,663,2545,0,1053,1220,1164,1707,1492,1971,1771,1169,1438
|
||||||
|
851,1550,1497,1725,0,404,1722,712,754,1434,891,1714,2277,1318,1665,2092,1108,0,1561,1683,1769,1180,1999,1861,1519,1114,1209,1445,1940,1544,946,1199,1754,1630,1518,1332,1806,2485,1464,0,1294,540,2287,1205,2199,430,992,1936,1239,1796
|
||||||
|
2507,2925,1286,2035,2342,0,2806,2109,1699,405,348,1294,1896,1982,1483,878,33,862,1126,390,868,943,2066,2063,2572,0,1774,1021,1543,668,904,1778,2318,1648,2748,1010,757,1676,1146,1050,604,566,1165,3105,1978,1309,1498,1557,1460,1079
|
||||||
|
926,372,505,1940,20,2237,1610,1298,1747,192,460,1742,1531,532,2300,996,1080,1679,3102,1774,1929,2698,1638,2451,1383,1481,2193,0,2218,1146,895,497,536,1207,3142,0,1298,815,1651,1530,1351,1432,725,752,933,978,1155,1513,1653,1412
|
||||||
|
1091,1067,2242,1390,729,1049,2108,2280,1424,906,1532,1989,1906,1537,1785,2201,0,554,356,1949,3371,1694,1775,1648,0,798,1992,0,1605,192,1549,568,864,1676,2255,186,2128,1325,271,975,929,1038,1666,1597,973,2785,141,1220,1457,874
|
||||||
|
1878,1519,575,945,1451,0,1513,1156,533,2775,1242,2096,1834,1401,240,2215,1212,0,1195,1128,1517,648,1523,1691,584,699,2387,0,1818,1036,2058,2469,1230,2498,1373,603,1260,1058,1284,1593,1898,86,2277,499,1875,801,591,1113,1924,0
|
||||||
|
0,1936,1816,2252,1322,678,2566,1442,1000,931,2013,357,3648,852,1172,1170,525,201,1103,1319,2009,582,1973,1036,642,329,1957,0,1691,1148,973,1536,1994,1613,2369,591,1634,2129,1196,1219,1943,1630,1856,704,1200,2691,1508,2056,1300,1565
|
||||||
|
0,1857,1461,934,903,0,2311,2254,805,1138,2036,1472,2571,1392,344,1214,1239,0,886,1119,2392,0,2771,1523,1059,435,3498,451,2192,1740,2106,962,1806,2092,1341,740,2773,1079,939,550,544,1656,1808,2147,2767,648,923,1838,781,762
|
||||||
|
914,2004,2064,1161,427,1166,1991,1778,890,86,1174,1061,1978,781,2031,865,2037,256,907,687,2900,1700,1712,1963,514,1099,1212,0,3195,1858,1322,1036,1872,1450,813,439,1367,608,1307,0,2002,503,879,2290,2663,495,2028,1197,1381,1872
|
||||||
|
2004,1073,366,136,568,137,1692,1735,78,818,931,2098,2013,824,2488,2308,504,1039,1220,1311,657,1217,1786,1552,930,0,2392,0,1847,1701,1767,1860,1883,924,2047,718,1581,525,902,1343,705,747,120,1933,1808,656,0,2076,1682,1086
|
||||||
|
783,1241,864,1446,0,498,344,1928,550,1568,1756,2496,1709,1628,1207,1799,683,664,1251,2493,2413,2333,1849,1941,1309,1149,2202,580,1031,734,1034,781,930,1295,1447,1200,2658,1719,831,1257,66,375,1479,657,1677,1944,467,2206,1453,1806
|
||||||
|
1022,2480,332,1469,299,1554,2561,1218,2651,866,1215,565,1894,1737,921,125,1838,533,1383,2088,1257,1700,705,1999,1982,2133,2409,865,2376,1907,1896,370,1733,1809,1324,561,1182,669,1381,108,836,797,2027,41,702,780,2746,1675,646,975
|
||||||
|
374,1439,619,1201,483,0,1526,2430,957,0,1717,1600,1727,1763,688,688,506,390,848,1848,2640,0,1739,909,529,361,1953,1752,1723,708,689,1292,1748,2249,0,1027,2366,937,1156,988,0,180,0,2828,2040,739,947,1473,1186,1630
|
||||||
|
2194,2177,2646,1271,1697,1396,3298,1586,1234,1455,1771,2250,2518,2121,2521,0,0,1022,1477,757,1309,455,1268,921,1354,599,1906,1555,1267,105,624,1081,1200,1782,2511,474,163,1759,1313,0,145,819,1711,2130,2103,2511,582,1467,1136,313
|
||||||
|
1635,1135,1517,572,1188,1248,935,726,1138,65,1480,589,2936,167,2475,1424,0,319,1449,1617,831,1798,806,630,543,582,3045,731,1673,0,136,885,596,1467,2188,841,2008,1739,1364,15,0,1002,2037,875,0,1961,1070,1157,1437,1359
|
||||||
|
1126,2034,3338,0,1161,333,4050,972,433,469,1649,664,1697,2012,2822,2664,0,332,505,2320,251,17,1478,1579,945,0,1160,0,1032,959,736,1025,2257,786,2502,2052,2121,779,1040,0,1223,1460,1854,2797,1935,554,0,1293,513,1516
|
||||||
|
687,2495,1939,219,316,1093,4652,1320,1581,536,2175,1594,2115,1436,1374,2517,977,1833,406,2365,1532,0,1752,1695,1779,824,1790,1023,737,892,2218,1161,1513,1180,991,1159,457,0,181,1607,2318,1379,541,2101,1650,1012,648,1417,985,617
|
||||||
|
433,1584,1979,438,0,1456,1261,339,1522,1589,954,1707,2672,927,2554,1335,53,0,1564,463,2165,961,1724,1561,545,856,2198,184,1761,1214,191,448,822,3152,1231,1131,929,1879,1678,119,1659,469,1938,858,1525,863,2079,1665,926,1118
|
||||||
|
1558,1887,907,1807,2444,1263,1551,2137,1786,0,1968,2215,1298,1911,903,1540,841,1280,782,745,3317,666,2096,1082,1451,862,2687,1128,868,0,2077,790,2158,3329,2668,590,2579,1353,1401,2398,0,1437,1824,1568,306,536,660,1189,1225,1994
|
||||||
|
1766,1818,1881,1618,1239,911,3201,1033,438,0,1809,1096,2045,1095,1668,1017,762,0,1341,1678,883,1501,2241,1129,1575,795,1595,2275,2105,2503,1748,1213,1102,474,1085,1774,2607,1854,899,1664,1269,1037,152,477,2161,0,1488,1021,1753,350
|
||||||
|
1335,1136,1630,2067,738,1924,2551,2508,1182,588,1391,1766,1960,1458,1959,1502,152,1923,1847,2224,2823,1698,1635,1582,852,1583,401,1399,1453,586,538,516,277,1629,1456,0,1519,352,1087,985,1869,887,687,1076,1844,2622,1421,1216,1540,2088
|
||||||
|
1095,1354,1862,976,315,1212,2815,2119,1252,1433,1140,1467,1399,795,1155,1788,1429,361,202,1959,2335,1300,1629,868,1095,805,1824,711,2294,1860,1730,422,710,1541,482,987,720,737,1197,449,2654,522,1020,1208,2992,1373,737,1553,863,1442
|
||||||
|
1668,1113,2668,1285,992,1202,2820,2184,1053,2370,633,831,3402,2022,2548,1900,0,1015,1076,2249,907,1412,1968,1320,2292,1095,2481,745,918,958,1455,1757,584,1771,2470,1209,1687,875,1001,1575,856,828,935,1197,1550,1721,1285,729,1852,1506
|
||||||
|
2710,1457,850,1356,309,1181,595,2149,1348,432,1691,2211,2682,2098,2029,1301,0,2597,1720,1676,3261,2895,1626,1442,1805,954,1132,1173,869,0,600,1408,1251,1099,1750,832,2310,1878,247,1798,0,1010,0,2511,1175,2528,1991,1034,1886,1521
|
||||||
|
630,2267,3105,1413,42,1062,1607,2648,577,2141,1724,2250,1678,1629,2325,372,403,0,610,2415,3568,1835,3408,2787,1806,1310,1581,1394,996,525,1335,1232,1203,1749,1954,1302,1985,2129,1247,71,984,996,2606,1527,2543,1473,1517,1616,1315,497
|
||||||
|
1179,2025,1396,1537,977,1303,2740,253,1560,642,2420,1218,1395,1868,2370,504,363,1405,539,1730,2816,2095,1581,994,0,986,1587,895,1439,1321,441,0,2013,1902,1844,316,1117,1817,1457,0,1146,1207,1899,899,2015,1880,1491,868,1953,588
|
||||||
|
680,1488,1589,597,1452,1598,2826,724,2186,1308,1092,1078,2421,1708,2460,2051,692,1324,1291,982,1328,2476,2219,2078,1505,0,1645,269,1249,812,1467,927,1823,2436,2676,0,1783,2067,986,336,718,1240,1573,1455,1275,969,555,1323,1063,1145
|
||||||
|
358,1193,1555,963,1064,1709,1770,1800,1379,781,2280,0,2155,1598,1281,872,596,1254,495,3513,3172,650,2489,1102,696,254,2114,0,1259,1111,1477,626,869,1894,1932,1120,2984,781,1732,1609,0,2186,1263,521,1477,1449,1612,519,1489,1269
|
||||||
|
822,880,1109,1522,34,1959,2862,961,1524,1052,1061,709,2715,1840,1728,303,1042,1233,1122,1930,1705,1067,1632,898,0,98,1269,103,1642,1727,0,802,508,2164,1805,522,1205,1475,1162,683,0,1237,0,545,1294,2441,1675,1176,2672,2523
|
||||||
|
1862,1437,1736,2021,392,1406,3752,1338,1279,1720,1001,1977,1927,1232,1475,2165,0,0,2493,2506,584,257,729,1537,2866,1641,2329,1418,1450,100,498,2493,1828,1527,2464,184,764,2300,740,898,1281,1353,1475,683,1729,1217,198,1884,934,1258
|
||||||
|
1888,1179,1770,537,1626,724,2071,931,304,2137,351,1067,1543,1999,2590,2245,369,455,1665,590,999,1774,2473,690,445,1268,2238,0,1165,1273,1489,2170,2918,1871,3254,999,1225,2528,959,0,1438,1226,1937,945,911,1213,0,1050,1836,861
|
||||||
|
920,1981,2367,447,1769,930,1601,1304,218,797,1896,1186,1209,1387,1136,1230,0,1000,1415,1622,1283,257,1945,154,897,1071,2768,1099,1324,2159,852,1962,2848,1168,2053,1294,2344,2466,2229,1522,833,1932,590,1492,1897,709,2068,71,1309,493
|
||||||
|
2282,1227,367,395,1536,957,1818,1655,1651,580,745,1278,2183,11,1467,3607,370,977,1807,1270,1972,1976,1392,1336,1613,1551,1769,0,2497,509,1715,2109,553,1981,2424,1510,1307,813,1716,103,262,1045,781,1152,1688,836,1796,1706,1763,1157
|
||||||
|
2164,337,1591,1793,755,1335,2120,3102,928,432,984,840,1446,878,1775,837,330,1240,1439,2302,2885,1462,2090,336,878,2279,1803,489,2423,948,1288,2061,896,1132,1586,1232,1158,1174,2316,0,1418,1405,876,1383,1608,1022,2466,345,2306,1645
|
||||||
|
2678,1437,1300,2256,770,2703,2996,2293,1454,715,2149,1886,1845,1527,911,1975,147,2117,1617,2698,2381,454,1710,821,1810,1634,1043,2205,1403,1315,2186,1532,1126,2180,2410,602,2645,0,1542,2294,0,1499,385,517,1384,1191,2667,0,1848,2247
|
||||||
|
551,2913,2289,2424,417,1189,2718,772,1330,1823,2781,1912,2852,1487,1978,142,372,540,1492,685,4309,875,2500,3021,730,877,1819,0,949,1229,1611,912,2120,2615,2578,174,1263,1208,0,1456,2116,1286,3008,2164,951,2156,1536,1761,2132,307
|
||||||
|
1086,1156,2393,624,0,952,3554,1558,0,1020,1193,2090,1422,2130,2395,981,501,271,1941,1397,459,1275,758,1571,1413,1570,1641,255,1493,1320,333,913,1517,694,2438,1973,299,1357,1302,0,2139,1326,2245,964,2264,1949,137,2174,1572,1382
|
||||||
|
415,1643,1027,703,991,809,1224,1780,2006,0,1405,1083,1018,1205,1464,595,1357,1543,1062,2146,2461,2792,2406,1490,1277,1811,2659,17,1881,886,2697,746,1699,2056,1585,1118,1968,642,1484,1422,243,680,1129,794,1641,540,1896,931,690,0
|
||||||
|
1380,2605,1788,559,0,1009,1465,963,0,79,2443,1688,698,324,1728,0,770,699,395,1754,2290,1725,2336,829,0,1270,2140,2109,1609,2471,28,421,1282,1002,701,2310,2011,1510,1153,441,431,33,1122,1124,2333,1503,2176,627,2213,724
|
||||||
|
1542,1063,997,895,0,1347,2064,1654,712,572,1835,1235,1930,411,1347,2056,440,0,2203,3317,1004,1500,939,1419,2586,1221,1408,204,2150,1026,2174,1414,1994,0,2545,976,2924,1257,1303,898,199,2334,1818,0,1227,1105,706,1559,756,1234
|
||||||
|
947,982,887,1819,0,2194,3858,1308,2254,2281,761,2667,1939,2222,1242,1260,808,688,1837,2051,1839,1737,1382,1650,1331,1021,1949,0,1623,1378,1408,639,977,2121,1455,21,1612,844,306,1715,1479,1010,1224,179,1515,1463,1569,906,1100,963
|
||||||
|
1972,1277,1273,978,1314,0,545,1672,1223,1265,412,1489,3904,1227,2772,616,0,1244,1931,570,839,968,3329,875,2604,0,2966,710,1115,754,1221,2083,1977,2025,2807,824,1222,2331,1258,1687,0,874,1038,1340,1038,1990,524,2253,1657,354
|
||||||
|
1492,1911,852,1073,1601,861,1897,2250,740,60,1343,2921,2307,159,1442,1834,1403,380,1387,0,3200,717,2979,1068,426,0,1252,295,2152,92,1695,1607,2143,1844,1440,894,1182,1933,980,731,779,1625,1059,2109,3039,1484,1573,1990,703,1205
|
||||||
|
1735,1337,1254,1214,0,1978,1617,1626,1375,0,2439,2226,0,855,1539,0,563,0,1752,2703,1905,1690,2268,2235,1971,1866,2808,1150,1157,586,1750,1114,2296,480,2100,1040,1997,2340,1312,788,228,1423,2504,744,1028,264,750,1322,1643,2006
|
||||||
|
1174,733,1378,1444,0,2112,966,2551,1022,1416,592,1311,2471,1330,2193,640,867,2164,2090,913,2995,2025,2433,609,1140,713,2524,683,1351,1423,298,419,385,2143,1999,788,956,1648,1388,1119,1001,1457,195,1905,2779,2086,2035,959,1815,1261
|
||||||
|
1807,2164,2370,402,498,919,124,1990,241,1006,588,1377,1898,505,3011,1034,160,1066,2150,839,2424,1178,2570,1848,1924,439,2313,0,1139,1262,729,1645,2311,1435,2287,1041,1123,1862,1720,1563,1459,1651,1480,2476,2249,175,1120,816,1808,1281
|
||||||
|
743,929,1802,778,0,1717,1451,933,2521,1081,774,2627,1995,497,2133,1134,152,1129,2044,2346,1613,789,2225,1498,1466,850,1549,0,2611,1607,1503,1799,2500,1489,1844,639,1403,3399,1959,0,816,137,1340,596,1381,727,1223,2720,0,1999
|
||||||
|
1288,1028,2123,1415,582,1153,3010,3148,1102,839,1076,1305,2229,1740,2272,464,834,1242,1042,2529,1646,289,3650,1074,2012,594,2209,127,2037,1657,2405,1159,1501,685,1576,1257,1955,765,1741,888,11,1088,604,1576,2407,459,397,1549,817,2002
|
||||||
|
1578,1475,194,1803,258,1579,1593,1048,1525,0,1584,973,1781,0,2162,1112,0,429,1590,1808,2720,1650,2227,1238,949,1211,1746,582,1612,0,1068,729,985,1404,1345,955,1457,1082,1161,590,493,1864,2110,1319,497,1401,1331,1371,1426,2227
|
||||||
|
1312,2220,2342,2347,1175,887,3967,2417,1000,1945,850,1843,3715,2850,773,1679,1655,0,737,39,2135,0,2111,847,1456,145,2011,1627,1222,1629,922,1244,1947,2504,1454,880,929,787,169,82,2274,422,1752,2499,2159,1930,1796,1616,1380,2552
|
||||||
|
536,1936,1532,1410,1431,1728,1944,2395,1119,325,787,1150,2076,1861,1719,560,0,797,2147,640,1011,191,2052,0,2082,156,1561,1052,1476,800,577,1054,3406,1482,1377,333,1583,2385,2027,224,1091,2265,1804,1842,864,1321,1247,1274,221,2590
|
||||||
|
1596,2262,1647,1243,512,1607,535,819,542,240,455,1304,1245,1192,1293,568,1522,893,1354,1475,2291,1157,2465,876,1319,1046,985,2046,2929,1388,912,753,1862,2,1175,892,2540,1785,1631,635,1371,1127,802,1756,2021,755,1503,393,636,1584
|
||||||
|
184,542,1538,549,990,677,2688,1980,1678,1216,1820,398,3052,213,2185,1213,888,582,1148,893,2898,899,1909,1269,1344,0,3691,0,1808,1408,1302,938,766,3699,1071,827,1121,0,777,2338,669,649,1175,1699,2522,1329,1561,1732,2118,1113
|
||||||
|
1936,1468,1173,2318,855,1281,2033,2521,1237,1003,1374,2414,2547,1811,1238,830,1387,1594,1215,1000,1748,775,1703,1113,1621,1107,1926,1067,1486,1909,1479,477,1150,1468,1634,1199,1046,632,1628,1419,521,0,635,1838,1843,1692,2403,1240,1329,2578
|
||||||
|
2375,2284,883,694,175,135,1837,762,587,167,1780,2941,1150,1696,289,1517,952,237,843,1633,1780,472,2270,1279,1456,1117,971,1529,1926,1011,1827,1563,2156,622,1114,2033,2698,1960,782,471,289,999,794,1299,1292,406,1093,1649,1072,1247
|
||||||
|
1403,1257,816,1696,1008,1560,0,1265,1227,7,936,645,3072,0,2417,2744,0,1228,2064,1076,2452,2073,2355,174,631,585,2158,0,2144,0,1536,1560,1662,1055,1456,383,1618,1846,1863,1778,854,2186,1964,1164,439,2257,888,1531,1144,2585
|
||||||
|
2820,1670,632,1359,233,1852,1398,1449,1916,0,627,1716,1490,1184,2199,1026,1246,2563,771,2571,3090,2433,1137,1049,151,912,977,68,1475,276,565,0,539,1763,2109,766,1706,1370,402,549,141,1700,437,802,1281,2227,1056,1057,1601,1455
|
||||||
|
2284,2598,0,1068,889,1258,1249,1418,2056,75,1394,1918,1134,1096,1047,2276,498,2295,1618,1457,2862,891,1347,1307,1070,1095,1577,188,1417,636,878,527,1244,2328,1172,0,1439,1273,1102,863,647,1924,498,1289,1404,456,1119,1173,1737,1456
|
||||||
|
151,1065,1916,1907,0,665,3224,2434,241,1185,2624,1199,2331,980,1229,998,822,0,1279,2942,2599,0,1212,2212,840,1216,1288,997,1639,2557,1668,1335,1331,1371,1879,1627,1956,799,1175,169,1630,818,1353,17,2379,426,1571,1847,1906,2476
|
||||||
|
2276,2100,1051,0,964,515,1554,497,786,856,1521,1620,1924,631,1507,2235,466,2067,1252,1421,2845,792,1200,1892,306,352,1519,0,2036,529,0,1337,799,1536,2398,1618,1135,1273,1452,0,1133,861,1827,1708,2513,1321,1112,1475,1955,1128
|
||||||
|
1037,1558,2365,698,376,645,2015,1916,1441,1517,1160,1803,2694,656,2285,1758,0,202,1418,893,2723,1894,1904,1299,1257,523,2606,337,1551,457,1473,1529,1482,2576,943,414,1551,1254,310,622,1329,1464,2056,2313,1328,1502,1294,1372,1421,251
|
||||||
|
1410,269,425,1386,956,411,2198,1615,155,1266,1584,2184,1302,799,971,2480,990,483,2079,1396,2185,1230,2699,1544,516,1725,1838,489,1632,721,1414,1667,209,2155,2263,1549,1154,1282,2515,0,615,740,1775,382,2354,206,1216,1259,2305,954
|
||||||
|
1480,1859,2407,488,1300,2315,1603,759,1854,922,3083,1468,1395,137,2031,1309,0,1336,1218,2678,2948,1602,1139,1841,1063,850,1862,0,1216,76,1151,593,911,1915,2533,578,3407,2539,1509,1631,0,1733,2716,327,955,1377,772,388,1331,1221
|
||||||
|
1310,1927,1518,1485,0,2057,2837,572,1261,1657,1215,2509,2001,1869,1701,420,1114,934,1398,1639,2173,1381,1028,2180,621,858,2109,0,1883,82,1283,918,324,1949,2629,148,1821,9,358,1170,1037,1973,1601,1154,958,2079,135,1352,1805,797
|
||||||
|
223,511,1426,0,467,933,1633,1560,2315,1140,79,1887,1887,993,1915,2024,860,1043,2315,731,1265,1347,533,1945,1254,18,1725,0,2155,1163,658,203,645,2531,1902,0,1118,542,1131,96,1281,1239,257,1994,1720,1339,1253,1719,637,881
|
||||||
|
0,99,1305,1271,0,586,2850,2689,152,1625,852,303,3071,877,1759,1166,863,0,1624,1426,1079,0,2271,295,1568,0,3038,0,2195,2913,1235,1727,2677,937,1383,781,1002,1251,1145,695,2167,2246,436,1654,2868,1192,224,2455,1034,2612
|
||||||
|
2772,1833,1288,1543,1508,1173,2923,678,1830,1479,851,2710,1771,2241,1119,2831,1188,881,2006,0,2214,2511,1105,2694,1510,493,819,0,1642,131,1701,790,983,2662,2655,96,1393,759,8,1156,2425,822,2032,1331,1909,1486,941,1501,1225,1328
|
||||||
|
2180,2017,1107,79,1397,651,589,1649,1075,993,1033,1288,2515,505,1674,3462,0,2533,918,526,1853,1485,875,0,950,0,1287,539,1343,0,1391,876,701,2246,722,1556,1821,806,1949,1244,995,1364,963,2221,1521,979,1665,402,671,1956
|
||||||
|
1144,2373,1092,596,1593,1329,2794,738,2206,0,1681,1380,2343,491,810,2152,144,0,1736,406,1144,888,167,1443,1806,1507,2504,0,2885,674,1340,1697,2006,1279,1181,478,2415,2238,239,1631,892,1780,258,1409,526,922,1619,1878,808,1385
|
||||||
|
1098,1607,1963,900,115,1512,639,4303,149,1107,2204,2259,1309,1350,1654,2066,280,1474,1147,2335,3813,2007,2880,1950,2701,2339,1538,1466,1482,482,2209,2232,1684,1753,981,1755,2242,1386,2168,1398,421,343,1381,1652,2505,487,1970,1592,902,2208
|
||||||
|
750,1506,1460,1384,861,938,1377,1751,1137,1856,889,1092,2846,677,2139,399,220,0,1083,1507,819,1650,2437,1199,2037,0,2920,108,1568,1566,927,1236,1621,2034,1585,1623,2159,2711,1374,1739,0,311,944,1256,2271,943,2048,1674,438,1531
|
||||||
|
1316,1784,2103,1025,1102,1008,1901,1902,1278,0,844,714,3229,1027,1730,1515,634,32,710,124,1574,1350,2165,634,1015,728,2570,1391,1786,0,1600,1680,765,1787,1216,810,993,1573,759,396,1677,1216,865,2442,185,1249,851,1408,1637,1271
|
||||||
|
1059,1230,671,1640,12,475,1782,202,1197,1538,2527,2055,1442,198,869,1697,981,173,1812,1392,2950,548,1538,1476,28,911,774,0,1529,963,1979,0,487,2189,1998,841,861,27,1559,84,2261,948,2341,747,2028,1685,521,2075,1072,751
|
||||||
|
2163,1250,484,1714,1201,665,4800,0,2072,775,1101,1768,2050,1688,779,2454,486,0,1322,1442,0,173,293,918,1367,0,907,1337,1781,880,875,461,1567,1786,2613,370,965,0,937,62,2432,933,2167,527,1155,1448,950,1250,1233,1741
|
||||||
|
611,674,1727,1241,1455,1141,3254,3537,1324,262,671,273,3687,1376,2369,2935,0,1139,857,1655,2458,1680,2230,1445,1092,0,2700,0,1595,71,1049,1850,486,1999,2173,178,974,722,245,1110,2004,2230,58,2842,1605,2650,493,2270,1797,1497
|
||||||
|
268,0,1148,0,0,1815,3161,1800,889,879,2721,1399,1407,1239,3545,2420,0,863,1630,3648,2506,1796,2485,3965,1142,1844,3446,0,876,0,851,1521,173,1072,2484,552,1614,632,557,1076,428,1219,1673,1378,1523,1021,0,2397,2303,1265
|
||||||
|
1033,2204,2049,644,587,840,1366,1309,302,894,1978,1362,1817,890,1947,1440,546,689,1687,1259,2595,2511,2586,3753,1476,0,2306,0,1865,1465,787,1159,1537,532,3170,1370,1581,2435,1019,508,0,805,2194,2076,2514,1312,810,2320,1507,990
|
||||||
|
1624,2464,839,1112,0,0,765,1269,1060,0,981,1857,3217,0,1213,1754,846,470,2075,1043,1458,661,1540,839,2218,259,790,1767,1920,166,1087,1587,2671,687,1354,1562,1027,2427,1125,0,738,1490,1619,1116,875,1041,1796,2643,389,1278
|
||||||
|
2250,1130,59,1194,682,0,565,1292,808,0,1757,1004,1150,2513,950,1558,1109,1470,1124,1749,2543,2003,1577,1559,845,535,1073,2694,1322,253,409,767,1843,1811,2232,327,1478,977,1564,98,0,0,1257,1193,1374,871,1044,706,2501,1343
|
||||||
|
1418,823,1742,2335,2572,950,2296,1944,2196,2437,1608,983,3372,1636,1802,1540,727,53,1655,1678,2169,428,1555,1193,2918,1259,1832,1291,1124,1309,1839,1780,2946,3116,3041,0,1222,2088,1498,2107,614,23,1462,168,1364,1815,1883,1575,978,1358
|
||||||
|
934,1274,1727,1844,1338,1916,2899,2506,1797,940,311,725,1310,1123,2008,519,67,1114,1726,2072,1083,959,1396,802,2151,2114,1565,0,2494,1762,2071,1676,1239,2251,1470,617,1484,524,2363,796,1806,650,515,960,585,0,1393,982,841,1752
|
||||||
|
1574,1864,2056,823,1221,1292,3530,2662,2131,1444,789,983,1679,3024,1326,1048,1028,993,659,1574,1817,828,2778,1686,1725,1083,2191,0,1429,1274,1175,818,1612,1882,1382,848,541,768,827,764,1809,914,1001,1593,1679,1618,1239,1659,1327,2333
|
||||||
|
264,1321,2324,0,640,1490,1579,646,2614,588,2266,862,2972,1498,2048,3384,0,1147,1090,1452,1779,2035,1844,2133,2097,899,3412,0,1078,920,2576,420,1130,1510,2088,913,1770,631,620,850,1457,77,2442,2054,0,1218,375,2022,1034,1383
|
||||||
|
352,1505,2228,2673,1553,685,3004,893,923,1294,1882,1493,3178,796,1714,938,698,0,1867,374,1843,866,1755,968,776,457,1607,1030,1123,1553,217,1301,1825,2176,1743,1580,981,3528,1286,216,1198,0,1387,1321,2336,1601,1698,2328,971,1856
|
||||||
|
1873,2133,1413,518,1030,1581,1950,1801,3136,92,326,719,2328,1222,1661,1418,686,699,695,1006,2215,2112,727,928,1366,1812,3248,0,3226,1028,1530,1061,2142,2249,1515,0,908,1504,432,419,1032,1967,753,1340,966,2224,2244,1819,702,716
|
||||||
|
1372,851,1922,1689,1893,598,3840,1558,168,129,2002,1664,1784,380,2344,1218,158,0,2303,725,1493,235,1703,339,806,46,1419,472,1510,921,926,2137,2774,1054,1492,0,1028,1635,1046,0,3132,1920,2233,1773,1375,971,0,1789,2254,1771
|
||||||
|
2026,1872,457,467,1204,1057,1698,1062,518,0,0,1006,1302,2047,1342,1202,1415,1494,1239,193,331,1853,1823,724,429,749,2567,0,2574,1296,733,496,349,556,1951,1349,685,0,1457,206,1600,1133,671,1992,1130,1815,677,1059,2099,1011
|
||||||
|
451,2550,1412,2528,798,541,3246,2299,842,1642,2655,2592,2084,2127,343,1169,633,0,426,1777,2765,1047,201,1834,1280,1572,2581,1628,1156,0,2134,1172,1783,2103,961,650,2125,1912,58,1315,1641,694,2768,1101,1085,1119,970,1538,10,401
|
||||||
|
1894,1126,1197,1103,895,144,1622,1076,2092,29,998,1369,2866,420,2740,1031,254,1022,1523,682,1910,1347,1500,469,1220,643,2715,674,1901,205,1384,975,1833,2000,1267,636,766,446,698,462,1349,360,1531,2624,1089,1383,1463,1696,978,429
|
||||||
|
1649,1599,1044,1050,1635,1140,1744,1402,1469,565,1645,1621,1041,2636,642,1754,648,1290,1045,1467,1997,1180,902,637,1453,1188,1934,2449,1369,629,1574,1366,2411,1995,1895,0,2033,1416,1318,1181,1452,909,904,1360,1005,605,1391,96,1275,885
|
||||||
|
473,2493,1695,509,1515,573,824,1614,1394,1072,1028,1012,2128,1483,1604,389,417,876,1428,76,2665,1639,1986,1536,679,22,2215,940,1889,781,52,686,926,2882,716,0,2289,1759,1105,916,609,1625,0,2664,1902,921,2006,1023,1266,175
|
||||||
|
461,861,2192,2236,1440,1029,3227,1824,1847,1455,788,1579,3478,1883,971,2205,333,930,1293,1354,1691,74,1786,231,1255,189,1699,571,1805,2310,880,956,1392,2039,2178,366,1746,1786,859,1182,1529,529,470,1329,1493,3112,1243,1733,1247,1553
|
||||||
|
905,955,956,1118,9,701,734,2949,244,41,2440,1752,1210,745,1726,304,1239,984,1054,2091,3209,1808,2108,75,657,1577,1734,2825,986,1116,2030,1151,2476,1545,551,956,2814,1425,1309,1560,0,1367,318,1430,1373,684,1772,353,1816,793
|
||||||
|
2318,1834,1160,193,383,0,696,997,330,2388,349,2309,1794,1308,1311,587,997,0,800,1651,865,1789,1433,2087,1420,0,1614,0,2159,153,847,2402,2562,1387,1820,356,1825,1441,740,1310,1417,475,2624,664,1890,1896,926,1075,1038,821
|
||||||
|
833,309,2753,509,1465,685,3005,2274,1557,428,2146,654,2263,2077,1759,803,517,801,980,2297,1860,896,475,1700,1332,1220,2911,107,1467,677,498,523,0,2177,2945,865,1609,804,1533,204,782,658,1668,956,1537,1698,578,1182,2342,746
|
||||||
|
408,1887,1659,772,605,833,3091,1789,967,436,2553,1767,1420,1071,1780,1053,802,0,423,0,3529,2370,1989,2006,562,475,885,1550,2084,1340,843,1821,2963,2638,1228,1018,1512,2414,590,107,1699,335,850,2361,3004,1093,2342,1875,1723,1754
|
||||||
|
932,1339,1668,0,582,1629,329,2622,869,1502,1732,1755,1794,2361,2620,2006,817,2319,821,1368,2428,3335,2221,2493,1998,866,3673,85,387,0,1679,1514,1756,2058,2268,661,2257,1638,914,1383,705,794,2071,2707,1559,634,333,958,1181,1351
|
||||||
|
1145,1751,1389,1368,1337,1847,2873,2057,313,0,1233,174,2629,1047,1954,1484,546,254,1081,1002,1419,2114,1911,357,998,1593,2463,1920,2323,1031,1116,1630,1171,978,1018,1202,1668,1046,920,1175,952,1421,0,1432,1141,839,1727,1056,1876,1608
|
||||||
|
1891,338,1637,913,1539,572,2155,1511,1559,1505,962,1520,2868,1923,1309,2998,692,438,1912,339,1238,494,1455,1767,1083,665,2615,224,2384,379,1396,1619,787,1810,3050,0,1418,413,1300,277,1268,620,1750,2070,1292,1945,347,1192,1991,1339
|
||||||
|
2890,2715,2316,1337,2855,595,2013,2319,766,1354,1245,1338,1921,2585,1147,3094,238,1470,1245,912,2273,1344,1657,1512,2699,1684,1278,1524,1186,118,2034,2505,1748,2304,2015,1002,1971,2400,1526,169,970,1135,1700,2350,1516,0,903,383,1682,1238
|
||||||
|
559,1418,1787,3151,719,1485,2938,2168,1223,876,1672,1877,1621,508,1882,627,624,998,1844,1904,4305,1028,3311,3016,745,298,1054,0,1871,306,493,1119,1946,2051,2463,0,969,1709,1506,851,1566,999,2861,2038,3090,1662,1280,1829,1075,2753
|
||||||
|
1916,939,553,854,1910,638,1927,1378,2259,220,285,910,2515,91,997,2645,1014,723,2273,1099,1671,1663,2025,1692,2332,223,1967,0,2942,701,1756,2095,1293,2024,2322,533,2144,2014,805,1876,58,480,4,1686,2031,494,1043,1853,596,727
|
||||||
|
2295,1636,1418,1134,1062,576,1442,1482,2343,122,634,2143,1999,1484,2553,2042,0,677,1246,823,1685,1584,1631,1023,1374,197,1128,1277,1237,513,646,635,1718,2125,1913,334,688,1428,1480,0,495,593,658,2785,1172,1528,1702,1169,1409,958
|
||||||
|
988,1181,1337,1667,481,1811,1950,2033,1341,527,1620,1349,2925,2066,1480,1851,0,1152,1885,1641,1719,1355,2289,970,1879,860,817,788,2007,1534,1676,1379,2109,711,1719,575,1843,1836,1989,634,641,1460,913,810,967,1848,2215,1405,820,2277
|
||||||
|
1282,1777,2002,490,1745,524,4165,1363,1852,573,1784,2619,1778,2205,2015,2489,32,524,1316,1096,706,0,1161,2542,1539,0,860,689,807,0,884,1112,1871,1764,2008,5,1834,1281,844,0,965,556,1947,2654,1346,424,0,1444,705,1855
|
||||||
|
1073,1126,1135,949,1674,180,2254,2512,1902,1755,1345,1536,2088,3126,585,1963,0,164,2018,921,1218,95,931,1534,2927,1761,2566,0,1569,693,1675,2476,3328,2342,2868,0,1509,1350,1340,1163,1589,1134,2144,817,610,1630,1822,1349,1431,1129
|
||||||
|
958,1523,1492,688,2063,1202,2442,491,1713,544,1158,375,2055,1337,1394,2744,81,0,830,1819,949,2965,1923,1757,1665,512,1739,804,2037,0,1282,1743,654,791,1938,497,2060,1509,884,829,927,1038,617,1704,525,1795,845,1307,1300,361
|
||||||
|
787,450,1325,906,2033,146,1698,1405,2201,2130,2330,2452,1111,2551,869,1894,0,2379,1646,1955,3610,0,1048,841,688,2539,1839,521,1114,851,2338,1675,1706,3961,3385,0,1607,735,2531,0,14,0,1565,1566,898,1123,865,327,1805,0
|
||||||
|
1187,2147,1625,768,619,188,2999,365,786,1087,1831,1671,1299,88,1984,864,562,0,339,1502,1024,1435,1300,1393,45,0,1505,61,681,281,893,910,1527,1784,1791,1360,1501,1125,321,239,1677,1628,1905,1638,1424,1705,154,1746,1636,1231
|
||||||
|
501,1276,683,2410,96,54,443,2336,1567,1014,0,1051,3174,1380,1252,761,1186,884,1573,1746,2216,1557,2240,1119,1627,800,1791,375,1494,440,1089,1714,1306,2630,2419,907,1606,1257,1303,572,0,500,782,1313,611,1776,1992,1516,1580,1291
|
||||||
|
1585,1715,937,1248,1919,0,1042,1855,1987,1168,168,1129,3317,552,1986,1886,657,381,1970,0,2132,1439,2253,1392,1619,55,2658,0,1883,0,842,1403,1201,3050,1771,372,780,1939,823,801,688,946,1766,1956,1780,1707,1220,2289,1288,225
|
||||||
|
1391,987,1685,673,1631,634,2943,3224,1045,0,958,1858,1896,732,1161,2275,855,323,1987,1845,2318,355,2476,955,2269,0,1547,0,1954,715,2137,1857,2762,739,2632,1309,2746,2000,745,584,501,2348,1463,2168,1786,615,234,1852,392,955
|
||||||
|
1955,1221,278,2062,372,866,2306,1819,1002,0,372,1013,1937,0,1861,0,1657,151,2366,777,1350,500,2702,1084,1022,118,1385,0,2755,1097,990,1160,1602,1091,1582,1281,1476,426,1757,71,371,1395,1127,2063,1672,0,1645,1427,1525,2738
|
||||||
|
106,945,840,1097,0,955,1330,1221,1810,1604,1803,1138,3437,1727,2260,507,0,600,1849,1300,1324,1999,843,430,1898,983,1977,1906,1063,1058,0,854,1575,2338,504,0,1875,1843,853,701,891,869,933,775,413,2444,2314,1202,2247,1015
|
||||||
|
921,1076,1595,1201,1629,1948,2576,1578,1342,1485,1894,1361,1301,527,1382,1615,0,598,2095,992,3169,1507,1042,1333,1283,2809,1577,832,1922,1440,663,2242,2052,2398,2440,919,814,2385,1622,441,1953,281,916,1065,1821,1887,2937,1545,1295,1403
|
||||||
|
674,1755,4,629,0,668,1380,1808,3109,0,1504,1802,2527,914,1607,608,0,2222,1652,1362,2818,1316,952,842,1541,633,1715,251,1334,0,1620,438,2190,2127,716,489,1419,351,1016,1387,9,1882,886,1907,450,1559,3019,1018,863,774
|
||||||
|
1137,1954,1014,1368,811,669,1543,331,1636,0,1538,2177,1971,0,1456,1533,649,496,2374,590,2033,1322,1449,1378,783,0,1522,444,1599,0,1158,326,845,1798,1287,489,1756,1536,651,985,976,1434,1910,1796,1068,878,567,1729,471,564
|
||||||
|
1318,1498,1114,211,50,1583,3275,2276,1172,1407,1733,2641,1041,2300,1714,3430,353,599,436,1213,1342,2590,0,2006,1560,1250,2045,453,1253,0,2022,789,1780,2400,2026,713,1580,236,235,192,3491,1212,2516,1174,2071,1213,766,1919,198,2266
|
||||||
|
3009,1557,7,1599,1393,273,1466,2196,1486,407,721,2139,1955,2357,191,2313,1589,795,803,249,2729,1197,949,366,383,1238,2246,1887,2850,669,1513,1103,1619,2668,1556,467,1407,993,1538,638,0,330,877,1231,1832,1140,1808,1039,1553,1104
|
||||||
|
1192,1041,1686,1087,0,2003,2527,1144,251,0,1557,1374,994,134,2925,636,1108,0,1504,1365,1149,1955,1835,1632,381,1545,2573,1272,1771,1500,570,897,835,606,1486,832,772,419,954,212,1826,543,756,2165,1563,1186,343,1605,2320,1958
|
||||||
|
939,1588,1058,0,1604,706,3559,602,1274,0,2046,1492,1036,1287,745,573,1617,0,473,1088,1050,85,465,0,16,1057,2684,1229,2498,1293,1421,1033,2075,2291,1023,1145,1485,16,1219,519,1045,1266,403,843,1512,539,1459,1213,1131,103
|
||||||
|
1377,927,1349,632,221,378,1008,3050,905,254,1771,1294,1397,411,1665,2387,0,1055,750,2137,3419,1062,1929,728,360,1428,1580,1337,1251,235,1433,1433,1507,2296,1914,1203,1053,924,2234,0,1083,1093,1540,1600,1687,865,1884,966,1439,1637
|
||||||
|
1692,1876,23,456,0,434,1483,357,1506,1315,710,1085,1346,1289,804,1532,1294,1149,1419,2218,1219,2275,579,2157,1502,1173,1248,187,2798,1853,1427,1246,1175,916,1653,496,997,0,747,751,1772,408,774,628,1510,2159,1384,1777,1521,107
|
||||||
|
1491,1688,188,848,0,384,1272,1634,1623,195,884,1378,913,1379,1148,2276,0,472,1983,1967,2028,1962,952,2117,2214,1302,1592,583,1945,863,1367,0,990,1714,1971,852,3018,1399,1081,1083,994,1706,1230,344,1080,0,954,1296,931,825
|
||||||
|
2449,1966,2214,1865,282,2109,3375,2821,1333,457,699,2250,1108,1071,2126,1589,1557,2285,916,1785,2150,1114,2464,450,1319,618,39,932,1604,1947,2759,603,1404,2302,1059,665,1556,0,836,1636,2301,753,307,984,2608,820,145,1038,1021,2798
|
||||||
|
2082,551,2612,1108,938,245,956,2273,904,1205,258,2160,2565,249,1859,2401,1145,0,1510,317,2334,60,1750,1432,1538,958,2105,457,3412,2038,1826,1310,957,2074,2275,998,1563,864,2267,0,836,0,1011,2828,3077,166,1490,1409,902,1770
|
||||||
|
892,1431,1519,2819,1080,1410,2652,288,1599,503,2042,548,3161,1714,1925,1848,0,0,1695,0,2183,2344,2057,1324,552,0,1461,2021,1282,8,1537,119,0,2788,1863,170,1865,664,779,676,1162,2183,1236,1591,762,1325,1208,1403,2169,1543
|
||||||
|
1922,2048,1300,780,1613,929,1987,597,1760,1192,411,1620,2395,2156,499,2810,902,628,1070,67,1460,1980,1647,1141,1519,122,1538,1114,2389,1030,886,1529,1127,2157,1699,687,1583,1651,1109,1398,1712,747,360,1951,2294,1629,2269,709,1327,563
|
||||||
|
1918,1970,2135,1732,1424,1219,2242,1178,1240,1879,1141,1677,2464,1682,1674,577,1160,1158,580,2618,2755,0,2109,981,688,1681,1427,0,1617,1141,868,1988,2021,1337,2454,1193,1104,2348,1642,0,585,628,1832,1665,1609,2353,1465,1017,1519,1184
|
||||||
|
106,1100,1127,1193,0,1404,2108,980,2180,74,1438,1682,1695,991,2072,1044,334,370,2151,2397,716,1865,1569,2531,2351,172,1706,1242,1503,1180,1134,159,1446,1136,2194,439,1518,881,1098,801,467,741,1341,629,583,988,1163,2369,341,1312
|
||||||
|
1212,1512,1605,895,0,1050,895,2370,1924,453,600,230,3313,1183,2182,2200,1351,1693,491,2589,1915,2783,1885,519,2154,1630,2542,276,1339,983,2667,606,1515,1240,1530,1249,2467,1096,482,1349,1260,1828,891,794,541,1107,2034,827,934,1159
|
||||||
|
2285,1402,0,1395,333,434,1670,1795,1830,970,1296,3082,1190,1482,893,336,1209,1009,1255,402,1843,482,822,412,1379,2122,1743,406,2213,1839,1935,1307,2823,2277,963,817,1254,572,1190,199,417,202,955,954,845,1235,2716,1482,1953,2108
|
||||||
|
1834,1366,2202,578,286,1301,807,2035,1202,2228,751,1592,2421,914,2321,746,210,1080,1224,2356,2390,2138,2641,1932,2395,0,933,1752,945,638,1053,1396,676,2117,1469,1085,2628,1843,799,1281,112,97,1261,1032,1714,1242,1906,649,1126,1447
|
||||||
|
2105,1708,0,445,0,1250,1225,952,2386,1199,1518,2191,1830,3562,1620,390,806,2567,882,1115,1391,1873,1585,885,1697,1136,2040,1494,716,1460,506,0,951,2435,1761,986,866,0,1727,17,0,0,626,2065,1476,2232,2854,475,2453,1125
|
||||||
|
1897,1044,1509,2463,1247,2050,2944,1366,1585,2084,1468,2830,2495,2866,1924,1781,79,715,1968,1708,1389,1214,1094,1734,2247,479,1192,660,417,0,1326,1127,1196,2019,2783,0,1643,1354,442,901,602,1096,1420,1539,1169,2687,0,1895,1065,2298
|
||||||
|
1854,1347,0,1796,508,1534,2870,2341,2576,471,363,1609,1425,2215,335,1795,1666,990,1611,923,2706,1236,1588,900,2346,1114,1198,952,2114,525,1752,735,2099,1972,2203,0,526,904,944,525,1167,2018,1147,1061,1623,1802,1262,1220,1416,1651
|
||||||
|
1239,1568,2915,724,643,1366,3214,1149,0,583,2183,716,2493,604,2869,1309,0,353,1768,894,1389,925,1976,582,554,447,1745,1283,752,753,968,1138,1339,942,1945,2408,406,1517,1550,0,2228,1696,2075,2123,1710,961,935,1281,1391,1472
|
||||||
|
1462,2003,48,1319,624,322,0,2497,1901,515,1824,1079,2512,1757,774,973,263,1232,924,1307,3496,890,2353,1106,1803,1375,2380,131,2293,862,1712,1099,1358,1369,400,556,1765,893,1698,1131,0,947,953,2067,853,1810,1971,1331,2477,1349
|
||||||
|
1461,2282,703,1677,1712,293,1637,1434,641,974,1706,2656,1190,0,810,1333,263,92,1932,630,2230,540,2408,1108,1191,180,937,1501,1613,0,1418,2148,1755,2308,1544,0,2056,1616,1746,1395,834,1901,1144,1363,2304,881,699,1381,1697,629
|
||||||
|
1226,524,2415,2449,1437,2112,2785,1411,2028,1529,1589,2706,3266,809,2273,957,0,81,2298,1939,1580,703,1722,918,2350,78,0,0,1690,45,1281,2035,2071,704,2184,290,1533,3785,1753,356,372,603,2192,375,596,2849,494,2217,315,2356
|
||||||
|
3405,274,0,1538,1528,656,1720,1881,2237,945,729,1692,1068,1511,1501,1815,2360,1974,1517,1458,2889,1613,2214,1443,944,942,1415,120,2034,331,1792,1579,1460,2422,2793,0,306,0,2033,0,0,556,1060,1971,2275,1006,910,530,3002,1298
|
||||||
|
1026,635,1835,2065,683,2563,2940,1928,2313,1420,1850,2334,2389,2277,2252,1007,313,2059,1332,2115,3040,591,2284,1007,1328,377,2125,262,1296,460,2132,0,811,2223,1352,0,2167,0,1085,2027,466,1317,1726,1429,1555,1888,1142,706,437,1973
|
||||||
|
2461,955,732,1585,1683,742,2673,1431,1517,608,1514,1988,1943,2081,1186,1837,576,757,1069,98,1779,1772,2552,1125,1547,0,395,880,1856,736,1879,513,587,2198,1632,1030,2037,0,1423,1449,429,218,1027,1429,1854,1393,1364,864,2129,2203
|
||||||
|
0,2134,2034,1414,125,816,3579,2032,1591,349,1177,1210,2059,520,870,145,529,0,445,2332,1459,675,1339,0,1396,1008,2042,1354,1994,112,1420,1295,1982,1415,0,1074,1354,1279,584,363,1958,1322,1331,1554,1458,1652,1160,1253,0,383
|
||||||
|
2045,2335,736,1438,594,1688,1138,1411,1041,566,378,1316,1116,666,2947,0,680,2427,1463,1080,1166,2770,2819,398,434,1394,2074,148,1070,698,1364,793,1146,1528,1001,1273,1647,1255,1888,557,955,2101,771,2209,811,0,2170,107,1522,1008
|
||||||
|
2852,1693,265,0,575,598,1092,1105,1593,414,1722,2473,1573,1908,1655,2937,0,2017,1581,1917,2173,1552,604,1526,2110,470,1459,1518,612,0,2374,615,1079,1782,1863,0,2867,0,431,1747,935,2440,1817,1116,0,352,0,560,1793,307
|
||||||
|
1957,2332,2117,2392,600,1305,2175,2359,648,796,1223,1478,2145,509,2386,648,0,0,1262,2026,1745,1888,1361,2562,1897,2125,1197,1759,1770,484,910,1549,1149,1212,1567,1229,2201,1870,780,0,601,0,1921,2014,648,1022,1474,2169,940,2684
|
||||||
|
1864,2334,1941,2036,762,2082,2447,1517,1092,0,1993,1068,842,1909,3722,0,0,2730,618,2813,2843,2860,1914,2282,0,1257,1350,721,913,1810,769,0,890,1349,2201,97,1749,477,982,1061,1096,1436,1968,744,1440,1735,1030,234,2344,641
|
||||||
|
1029,1780,1298,1275,467,0,3048,1063,1885,251,2220,3179,2651,1305,899,2612,189,0,343,1325,1822,451,1437,902,1077,0,299,1711,1176,0,1318,431,1283,1486,602,452,2064,649,298,514,1179,1080,1724,2278,1485,2571,0,2139,665,1061
|
||||||
|
427,837,2079,546,838,1088,1794,1048,1076,1498,2379,1348,1560,1440,1983,2393,0,1247,1340,1543,3942,1916,943,2114,0,1610,2184,0,1670,1409,646,187,156,2261,2181,1267,1749,1133,1733,989,1723,894,1235,1369,2803,1359,2252,744,1705,184
|
||||||
|
1369,684,888,2227,0,270,2153,1870,1683,2017,478,978,1881,376,1451,1744,816,0,750,2703,1924,1142,2749,1655,1845,0,1565,289,1435,896,1904,1185,641,2393,1830,493,1833,515,664,1977,997,394,1067,803,1411,1049,100,1435,1697,1598
|
||||||
|
1418,116,1258,2299,84,940,2032,2762,908,942,1539,2325,1188,1332,1928,1550,558,806,2443,3050,2410,1028,1246,1547,2053,2486,1677,1901,1687,1036,1460,1269,1940,420,2104,0,1104,742,2076,0,1038,491,2159,1482,2097,862,1461,752,1533,1008
|
||||||
|
112,1864,1456,149,0,2373,1956,985,1290,44,1517,1230,878,1192,2148,394,639,2211,1584,1856,2898,2358,1067,1754,547,1171,1838,513,2177,1753,158,0,1845,1080,1393,0,1360,843,1188,1351,1964,2112,385,1405,1728,1572,1660,976,1130,933
|
||||||
|
1546,381,1104,980,1827,1047,2067,2235,601,219,1110,1031,1417,704,1737,1676,930,858,1451,1108,1704,1207,2342,546,1059,862,2336,896,2159,1584,1841,1999,1764,1646,1649,612,1903,962,1385,1219,370,810,0,2043,1602,728,650,954,1817,1564
|
||||||
|
1036,1634,1745,1052,0,833,1428,1233,599,15,1358,1693,1896,1085,1730,1068,0,1329,1958,1735,1789,1820,1886,1638,1802,1094,1262,3298,1999,1041,0,1223,826,771,1262,844,1618,942,2184,917,957,419,3,2214,1474,534,1934,1150,1909,1439
|
||||||
|
1316,1402,1104,1123,0,1194,1901,2562,902,0,1854,2424,702,424,1758,1561,0,275,1429,1525,2687,1503,2597,848,2051,221,273,2526,1493,437,1201,669,1519,1082,0,725,1594,455,1472,1456,872,1899,42,2123,2506,1082,1185,1363,1379,2013
|
||||||
|
1833,1613,252,1312,87,108,2539,1524,1299,0,1796,951,1006,1813,1994,2133,863,573,464,1573,1525,2316,1189,1977,367,1404,1736,950,1648,1407,2493,0,898,1681,1916,1186,1723,0,1119,0,1419,1257,1131,1398,689,0,948,1516,2378,1108
|
||||||
|
1686,685,1899,995,1329,1438,770,2720,1570,330,1061,1249,2735,1318,2155,576,1111,1692,2684,473,2988,1705,2939,520,2896,440,2224,490,2220,889,1850,1143,2292,1531,1884,330,1967,1228,1936,1131,0,1377,1465,2292,2217,976,1346,1031,1322,1831
|
||||||
|
1904,1468,1202,818,1206,1287,1831,2029,1953,985,1768,2387,1152,1332,2320,1853,128,1607,595,1878,2882,1623,2945,1109,497,718,1081,0,1149,604,2364,1154,1450,2111,1008,226,2319,1275,1378,963,515,1287,1132,1577,1230,896,893,482,1829,793
|
||||||
|
1749,318,1450,1562,1016,118,1526,108,1914,1503,1302,1269,2772,497,1774,1838,1053,701,1341,711,3418,1772,2429,1731,0,662,2316,0,2539,890,907,1237,332,1985,2836,330,446,1543,1387,0,1520,0,2151,1757,2051,2300,1377,1440,2665,191
|
||||||
|
2359,1993,2425,2017,756,211,774,2746,660,2678,291,1800,2118,3554,2047,262,221,2372,1139,1177,2309,3077,3201,2216,2417,1143,1071,890,679,234,2504,1677,344,2160,2850,1029,2424,961,1411,1613,828,885,1422,1319,570,758,1413,0,2485,396
|
||||||
|
1751,1088,1934,1378,885,1245,3448,2446,1059,1727,1407,2918,2537,199,1594,2791,1198,95,1519,1741,1869,1484,1402,1623,1598,987,2007,0,1850,323,2608,2953,1238,1786,1788,249,1784,1791,192,1645,2609,1243,1219,350,1523,676,262,2279,1055,831
|
||||||
|
1447,1308,2159,498,702,211,4464,2028,762,1571,1170,1857,2032,1323,1121,2815,1495,199,1700,1437,2122,981,889,1566,1314,1659,546,0,2117,2077,1440,2486,2074,1736,1658,1025,951,1161,274,0,3559,1041,824,1500,3027,1234,1003,1965,1751,727
|
||||||
|
1962,2410,1538,925,803,1526,2897,2313,1948,16,942,1679,872,1085,1484,556,976,1078,640,1343,1732,1589,2002,856,1185,774,1764,961,2358,1592,2137,922,2232,2252,997,715,1995,922,945,858,687,1831,824,1278,2301,763,2378,715,714,949
|
||||||
|
400,1020,102,712,0,902,1914,1703,1226,983,1512,2116,720,2326,1588,811,1446,874,1742,1344,2004,0,3105,1789,861,0,1071,239,1268,1001,1671,0,2439,1766,1272,198,2741,0,1689,0,62,962,2418,1877,1402,0,501,689,878,2610
|
||||||
|
1938,2236,731,1571,335,987,2072,1133,507,298,904,1528,1151,1055,2029,2566,1648,782,1394,1506,2619,2904,1472,2395,749,1528,181,1080,1903,572,1434,1321,1434,1354,2122,603,1427,596,601,0,1463,1004,1233,1807,1575,614,759,1360,1871,1000
|
||||||
|
1532,1095,1690,1509,2425,1224,2376,1434,1322,1940,2021,2988,1911,1284,1467,1996,0,1787,1977,0,2893,1532,2589,1991,1229,283,2242,0,1351,182,1722,1651,512,2642,2637,0,1785,1384,877,2531,1186,637,1554,2135,1835,2002,473,1008,2272,554
|
||||||
|
759,1414,1576,380,178,1409,663,2287,1012,363,1757,1259,1700,679,1718,908,457,0,1524,559,1901,1208,1856,618,1358,1571,2680,1638,2322,745,1690,1035,2067,2412,717,1126,2673,1590,1890,0,1199,914,2361,1407,1247,0,2152,1258,339,2516
|
||||||
|
1667,922,1433,1272,0,1212,2296,2755,690,0,1609,1566,961,1346,1781,2058,456,770,1345,2081,2948,1433,2419,1459,1660,1410,1595,2242,1795,658,1032,428,1347,1329,1852,1056,775,544,1557,0,1433,655,1689,1530,3320,1148,292,1883,1345,2474
|
||||||
|
1705,2730,2019,718,0,641,761,750,575,848,1555,2443,2252,0,1887,978,0,0,1542,1980,2111,1206,2160,1680,1783,0,597,1053,1063,0,999,705,1125,1008,435,1570,2488,1887,994,1254,1507,2128,3256,738,1457,861,864,1305,514,1384
|
||||||
|
1500,1601,277,2017,1887,123,2113,1648,1459,0,1308,1517,1658,0,2064,2383,334,0,1114,999,2141,1981,1995,1682,842,199,1317,170,1852,91,2457,1199,1078,1834,1134,874,2214,995,918,1808,993,1552,765,1278,1112,200,369,1926,1529,1396
|
||||||
|
1416,1843,1052,1251,564,1435,2520,1158,804,0,1266,1716,1637,0,1056,1089,957,0,1788,1526,890,1574,1031,250,1430,1081,1753,662,2209,1232,2376,1348,1633,1522,1795,2605,2510,1952,1203,212,401,1622,1027,606,1416,0,1706,1810,0,1144
|
||||||
|
1650,1909,1506,1319,1067,655,1267,658,441,216,1685,1850,2373,100,1952,751,19,583,1931,876,1627,806,2600,722,1104,409,2556,1520,1306,791,932,1265,1538,1641,1744,1422,1567,1790,1492,1631,854,1075,1753,1024,1435,688,1443,1402,1542,541
|
||||||
|
2219,925,2089,930,0,467,3054,2222,649,888,293,1330,1549,0,2331,2714,498,370,2051,2854,848,737,1579,1222,1615,1615,1179,91,1296,1327,856,2125,1416,1061,2092,1808,0,1384,809,0,2052,0,614,1431,2574,1002,0,2293,1116,1651
|
||||||
|
746,1667,918,626,0,1340,3204,1839,1093,1231,2385,2465,1420,1975,789,0,0,0,2279,1095,1803,652,2130,1613,2774,201,3190,1860,1433,818,356,1107,2344,1337,1633,481,1291,1454,948,970,1193,1985,2526,1585,2329,1244,1665,1595,1351,408
|
||||||
|
1458,2071,1944,964,1026,712,1626,1296,1110,592,502,2322,1929,1162,1214,2242,1333,243,1774,326,1482,1363,1706,1600,1685,307,1387,259,3100,1029,1706,1305,1884,821,1255,126,1591,1354,1475,0,2044,1668,1723,2151,1968,508,1392,1683,190,557
|
||||||
|
1658,1253,1845,799,802,1420,2232,1180,971,331,1963,2190,1227,0,3173,1779,111,0,1623,1571,2406,1973,2036,1279,15,817,2130,0,2034,1045,1561,1932,2353,1091,1478,0,1280,2144,1113,0,1873,1699,1762,1201,1839,540,515,1657,1481,0
|
||||||
|
1849,1850,895,1455,925,1610,3492,1419,1443,0,978,863,1820,1706,1743,518,771,1275,1168,1757,343,2102,1160,335,1381,835,1877,2097,1178,1053,945,1195,2092,1829,2178,696,1307,1312,638,1223,478,1125,0,955,719,913,1503,710,1264,935
|
||||||
|
0,1232,2984,2484,259,0,3275,2295,0,1038,3207,1507,2308,710,2230,0,28,0,2158,1798,2804,0,2217,2144,607,920,1977,2249,649,2075,55,499,1398,2053,1564,1479,419,1145,1333,0,1582,0,2588,2641,3412,989,1728,2428,1514,421
|
||||||
|
1598,1281,2354,1756,1289,1653,3159,1417,2543,777,1671,1299,2247,1369,2159,1271,0,418,1140,1611,3004,702,2008,1119,1576,688,2201,409,1343,693,1369,817,853,2447,1757,340,163,1046,1077,229,2215,993,1815,1434,1865,1592,839,1651,1830,1038
|
||||||
|
1736,1724,1499,0,1330,968,1428,1597,902,0,1805,191,2345,219,2526,1530,861,0,1025,605,984,3158,2485,1328,1519,142,2979,2462,1842,50,1717,286,569,1203,890,2079,2057,1012,1313,968,0,1032,748,2196,2024,0,2246,1186,605,795
|
||||||
|
1457,1966,2138,1978,1192,1292,2746,2885,528,2912,908,3761,1758,1011,2129,36,562,1106,1539,1649,2534,1134,1918,1236,1340,223,1426,0,1316,330,1114,3039,2895,2263,2308,0,1765,2773,826,1519,1243,1479,2019,1179,2374,1961,1096,1069,918,438
|
||||||
|
0,1597,1906,2715,206,2626,2269,2257,1090,0,752,698,1640,1747,1936,0,885,1804,2223,1914,2441,1884,2458,1424,758,2185,2239,348,2416,1787,1416,842,1743,492,2362,472,1462,929,1698,991,1376,1387,672,1484,1081,1451,1617,1107,1057,1876
|
||||||
|
2038,1463,451,726,1100,2162,3651,1897,2161,0,176,700,969,1820,994,681,320,1606,2713,1642,729,794,0,640,2279,2287,2021,465,2825,823,0,1586,2361,1230,2685,114,447,252,2082,350,1420,2213,184,1625,1745,1025,2839,330,1302,1475
|
||||||
|
1608,1400,0,848,2293,624,184,2313,1748,0,690,2208,2501,68,446,2265,60,645,2224,260,2623,0,792,0,1660,621,2911,991,2605,0,1071,2586,2751,2873,1771,0,1910,1742,2031,1434,0,2802,807,2354,1203,1170,1657,925,689,231
|
||||||
|
2287,697,417,2915,1219,1492,3099,1850,1367,486,889,1555,2243,1511,2515,938,562,1133,2310,1342,1633,2300,1804,2272,1469,865,1319,671,2335,0,1483,898,588,1564,2633,52,1648,71,1360,367,212,928,2248,1101,1419,1077,1582,1169,1449,1818
|
||||||
|
814,1372,1110,0,566,1380,2223,1916,1086,0,1385,1502,665,717,1906,838,1289,523,2330,1769,1977,2068,446,2348,1172,817,2625,0,2053,1124,819,113,1604,108,2107,533,1545,1953,595,1083,1293,2952,880,1549,1749,883,0,1937,831,0
|
||||||
|
1651,2321,1733,63,339,112,2323,324,2508,675,939,1664,1948,500,2478,1020,407,633,1120,874,1491,1036,2396,1454,958,595,2708,385,1677,1396,2015,1130,2034,2706,1229,343,1415,901,34,448,1104,1194,1479,1705,654,275,1113,1334,1821,0
|
||||||
|
1900,2848,260,2562,1768,1425,1383,197,831,1870,1405,771,1849,502,2222,1616,1871,1239,1726,2349,2141,246,2263,482,2089,1902,1560,2238,2295,1415,1074,1327,2856,1411,1191,803,993,1886,0,1160,552,48,2033,1846,2898,2395,486,1115,1021,1599
|
||||||
|
0,1957,1157,1957,287,2216,2599,1160,774,2774,1929,1010,1074,1425,89,1941,252,1335,876,1294,2046,0,2219,2094,756,1875,1738,1715,1405,1423,595,609,964,1057,0,758,1078,1071,0,2655,55,1574,1877,1155,1719,1002,0,1311,2519,1544
|
||||||
|
0,834,766,168,0,1464,2100,794,2117,969,1851,1610,547,1765,910,1722,495,836,1058,1506,1709,1664,1763,370,1040,1076,2302,3257,1329,1080,991,1220,1258,2527,1443,1908,864,1162,1535,2071,1042,884,1500,1680,2384,820,445,1446,2369,1744
|
||||||
|
1015,2687,1281,1986,676,1230,906,673,1374,1424,1573,2421,1457,1710,2019,840,1213,1522,1226,867,1391,0,680,1471,1382,1558,1864,2747,2121,2786,1804,576,2319,1486,1365,1601,572,2436,2069,1845,1650,778,1663,2518,2769,1981,1118,1259,2187,2917
|
||||||
|
613,1641,1489,1286,810,1424,1599,1539,2079,1581,1839,966,1342,1148,405,1356,964,1861,1553,784,1633,519,2745,1234,1860,2271,617,3144,2689,1932,1460,1246,1904,903,831,2342,976,1900,2065,1371,789,265,1107,1436,2977,606,0,283,2110,2369
|
||||||
|
1156,2236,589,2463,1449,723,2441,1086,2338,1622,1006,1761,2270,578,583,2235,1212,2022,1131,2506,2427,744,1996,699,676,1914,1235,996,984,745,1201,691,2356,1068,891,2445,995,1247,719,1434,215,0,1830,955,2772,2522,507,632,812,1903
|
||||||
|
460,2324,290,3255,1267,936,912,79,2618,3547,605,2504,1037,848,1349,1753,1657,920,1103,2493,2609,729,514,2574,232,1229,2705,1035,1866,979,2310,1412,2532,1474,0,1805,1044,2257,203,1674,338,364,1616,1113,1478,2375,352,1141,2003,537
|
||||||
|
1178,2059,623,324,897,1950,1237,167,3520,2916,2574,790,1368,1627,1883,773,1181,648,1577,1549,896,318,1281,714,2835,1216,1647,2844,483,1382,1093,0,1953,1494,489,1346,1767,0,791,2243,1929,859,1577,1164,1681,1982,0,1099,1997,295
|
||||||
|
1339,3751,1373,502,1417,710,1668,0,1762,1445,1320,1555,898,1342,2104,2087,906,1117,0,665,1357,157,309,498,1911,1425,1209,2124,443,456,1578,1205,2596,738,973,1360,1008,2214,0,1891,863,777,2230,2910,1300,2946,1106,1162,3005,2037
|
||||||
|
725,2218,1115,2660,1727,1339,1286,159,2618,1999,1291,2215,627,1932,953,1875,1311,1904,949,1158,2244,363,1550,1331,991,2404,699,1553,1780,1191,965,995,1572,697,886,1281,1766,1268,412,1367,856,1137,1953,1749,2805,2076,474,0,2243,1016
|
||||||
|
2160,3256,1635,972,1272,1868,1229,1151,1142,1333,1877,1667,2229,951,2854,2099,2392,541,1420,2005,1975,600,1125,0,3060,1653,1302,1782,1239,1874,483,468,2284,1512,2722,1549,1174,1306,812,233,149,1448,1719,2417,3554,2054,1595,1402,1318,2600
|
||||||
|
0,1783,1339,806,240,2424,918,1037,2211,1694,1571,0,1588,1282,488,1691,896,1821,894,1050,639,1054,2736,2379,944,2482,967,2126,1969,2158,1642,532,1533,1401,1476,1033,1493,0,488,1980,342,702,1029,1763,2591,1492,489,600,1910,841
|
||||||
|
342,1445,369,2434,28,658,1793,0,2458,916,530,0,1172,825,892,2277,1158,2206,1753,1569,2197,245,2141,1720,817,1275,973,2625,2005,605,1345,1608,2420,1606,405,2394,740,1093,742,1601,0,757,2283,1153,1679,1952,0,762,1875,1634
|
||||||
|
1737,2593,1631,1742,1663,1136,1766,1568,2487,1511,1133,1193,972,740,558,2452,986,1497,836,1125,1290,615,1849,924,2017,2438,573,2289,1266,898,1004,630,1773,1267,895,968,488,2253,1311,1471,1335,1074,1789,1983,2744,1706,0,915,2167,2248
|
||||||
|
1485,283,2555,788,1068,1514,1168,0,2062,2374,1918,664,994,1774,0,188,1535,2182,214,1416,176,741,1711,1105,1628,3127,477,3296,1690,947,615,1494,1048,1957,1424,1104,1384,1338,1856,2383,1588,861,789,1165,2414,2104,779,1228,2988,2434
|
||||||
|
1195,1903,2214,1175,2085,1693,0,1838,1647,2544,1161,2066,0,1795,275,4027,968,1319,0,1142,1755,885,1685,690,1969,3357,1917,2372,810,1577,831,1126,1906,1896,1492,558,423,3727,1815,2808,2065,894,76,1547,3119,678,531,1076,2733,1742
|
||||||
|
828,2005,3,2218,1567,2342,938,582,2342,1399,1380,1804,580,635,1054,733,1347,1018,1719,1812,689,569,1543,2036,807,2181,2349,1678,2793,2438,428,1041,2071,858,0,1416,1016,1354,1619,1673,1947,1464,1273,2157,2833,2776,0,496,1930,1208
|
||||||
|
0,2641,1595,463,338,1426,1417,299,2705,2342,1434,894,924,1130,916,345,177,1794,1016,1317,1387,1210,517,2274,1891,172,1155,2510,2659,2323,1587,826,2260,1475,1146,2484,1904,705,1078,1838,1064,1098,2184,2147,1940,1508,664,1416,1943,1595
|
||||||
|
13,1510,1272,1000,900,1789,872,269,1753,2377,1913,2094,520,1874,2880,2702,1579,1076,0,1059,2026,52,143,740,1082,2837,1935,2461,997,1350,1711,1436,1325,2274,2012,1624,795,3291,550,1539,1383,261,1039,1562,2325,2711,282,1224,2364,2543
|
||||||
|
764,2262,1738,1156,587,2572,2017,307,1771,0,2055,2343,1068,2363,1114,1758,823,1674,11,0,2714,802,646,2041,1616,704,1562,1164,417,600,1103,212,1623,634,493,107,1329,2087,0,2395,1096,2145,2246,1688,1922,2679,1434,0,1486,1452
|
||||||
|
653,1185,1948,950,757,2455,2270,1310,2772,2393,1355,1166,728,1771,822,1476,894,1837,962,2192,1562,263,1703,866,855,1807,1714,3300,2376,2335,714,1614,1305,1261,1849,2575,1170,2198,1945,1530,770,0,1150,1708,3221,2130,399,1587,1455,2048
|
||||||
|
1087,2005,2527,1380,617,917,1658,29,1461,1507,1112,1861,968,1461,420,1677,1236,1492,0,1011,1999,1111,855,2253,1214,35,2316,2467,2654,1607,671,460,2382,2316,430,364,375,2394,16,2227,440,1159,2249,2341,2287,1908,1238,1958,947,1588
|
||||||
|
390,1296,1076,1917,1070,1585,1440,1937,2517,894,1781,1234,1597,693,1970,0,1181,2444,2267,1746,2186,762,2411,1498,3040,1516,682,2429,2160,1825,1233,761,2430,0,564,2212,1511,762,1785,464,1728,1035,740,1360,3024,2058,8,0,1794,1166
|
||||||
|
1243,2813,2954,933,1917,372,1568,25,2559,624,1237,1116,1639,2758,1419,1937,985,372,372,72,400,751,441,0,2972,0,700,1817,585,624,0,571,2042,1450,973,1692,0,1241,662,2079,2071,1536,2533,2349,2188,1074,861,1024,1908,1911
|
||||||
|
718,2317,1888,1328,1634,1012,1059,1137,980,1419,1152,1588,1440,1745,1668,349,1252,1183,1421,1946,1409,769,851,787,1100,1643,1235,1956,1849,2497,788,1419,2694,1933,1101,889,850,2142,477,1678,1070,951,1350,2812,3207,1132,1720,551,1558,3006
|
||||||
|
674,1223,0,953,688,2236,2116,889,2460,2269,1191,2008,1245,1161,1646,840,735,389,1338,1973,1602,155,1435,1333,1360,1428,2053,2720,410,386,991,1544,1529,1890,22,1424,1667,503,1847,1698,2248,847,1553,950,2569,1612,0,1559,2457,1098
|
||||||
|
475,450,908,348,0,2719,911,597,1409,1495,1518,878,129,834,1253,1386,1714,1111,1830,1292,2550,2069,1773,1263,1665,1951,1966,2393,1116,897,889,771,1306,2045,1855,1507,1405,915,744,1845,160,1649,1447,737,2057,876,452,599,2053,833
|
||||||
|
428,1075,0,2085,0,2975,971,0,2314,1462,1891,1804,1958,2645,0,1497,884,985,1054,1352,2005,431,1080,2449,2023,535,2100,1855,1982,655,1063,794,1245,1266,0,2036,900,40,220,2356,1141,592,2140,920,2607,2281,849,807,2804,7
|
||||||
|
128,1192,1339,1301,998,418,1223,1585,1142,1506,1109,1887,724,689,1933,1586,2850,2121,1736,2077,1978,1007,3135,737,1069,1961,1836,2549,1109,1217,1936,697,2125,1453,1555,108,1106,2221,381,1028,20,1375,808,2196,3037,2102,137,349,3410,502
|
||||||
|
1685,1719,1210,2101,1470,2193,529,902,1815,1013,1809,1149,3207,806,758,991,2074,2824,1440,1445,1713,508,2213,2316,1965,1376,636,1514,2894,1148,1683,478,2624,557,0,1363,1459,1100,426,1685,1757,691,1213,1124,3118,2360,1628,460,1665,1367
|
||||||
|
690,2568,1497,1030,0,1111,1359,451,221,1605,1119,1390,1125,1581,1162,2161,1132,1362,705,0,1447,884,1248,1888,675,1277,1050,1633,0,959,1436,554,1806,1047,694,825,1136,2436,442,2487,1075,2293,2284,1607,847,1884,1217,521,3339,1186
|
||||||
|
828,908,1810,1160,824,1958,1342,856,884,1810,869,1763,0,819,1609,1738,2146,1342,1324,1723,1924,723,2440,1115,504,3301,3000,2507,1584,1270,1458,1594,1252,1875,1306,421,832,2223,1473,1703,484,932,412,1943,3568,1562,563,1642,3490,2730
|
||||||
|
1404,2595,1045,774,0,1401,1727,542,1348,1165,2683,1573,1713,1385,2204,206,2272,1327,1159,649,1487,0,2302,233,2697,858,2541,2989,1316,2402,0,448,1363,621,580,2926,122,1460,1100,1973,1174,1412,3254,1181,922,1794,107,1060,1930,1238
|
||||||
|
785,976,1163,2949,30,1556,2327,2146,381,1644,1149,1398,1203,1013,1822,294,1303,1685,2560,0,1483,122,2745,1993,699,1593,641,2152,1229,1917,543,784,1082,0,852,1866,926,1618,2396,923,1292,1066,2528,1312,2495,1128,0,514,3069,1610
|
||||||
|
714,1208,924,2171,854,2242,1940,483,2166,2309,1360,964,1325,1000,513,219,940,1930,1171,2495,1786,819,1307,1801,1142,1713,2141,2912,2235,2369,788,648,2152,766,389,2398,1764,340,506,1309,1093,1062,1592,1913,2761,2331,1583,1710,1878,570
|
||||||
|
1044,1748,1795,1211,1151,1825,688,16,2245,1897,1366,1522,2247,1536,741,929,1194,1621,1205,1519,212,1881,1526,538,2354,1200,815,2309,1242,1605,506,1226,1952,1921,1695,2779,1553,778,1831,1634,2262,1122,1343,1005,2466,1420,599,978,2022,887
|
||||||
|
816,1629,559,1676,889,548,1333,0,3345,1932,1904,1247,2256,1706,1945,587,1683,1803,1430,719,2003,879,417,429,1565,1064,2093,2201,1405,34,183,271,2363,2303,1092,2972,347,860,0,1880,1255,0,3088,1976,1239,886,364,0,1529,540
|
||||||
|
1095,1125,1569,1790,358,1133,869,492,2315,1746,944,1280,2163,1028,1541,2324,3094,1977,1727,1863,1322,961,2245,1893,644,2392,985,2495,1924,541,1844,2298,2176,2136,223,2113,1863,1148,664,1218,0,403,439,1170,2115,2033,235,302,2114,2249
|
||||||
|
917,2398,2484,478,187,2053,1749,894,1616,1435,1286,1910,0,1042,860,0,2220,443,1933,863,2051,983,814,2054,2363,715,1482,2810,3346,2945,867,118,1979,559,776,859,1183,0,1529,892,0,2126,868,2907,3384,1471,0,0,1657,1967
|
||||||
|
801,1422,1982,1504,671,1039,881,1159,1944,592,782,1815,1345,1391,652,3098,1242,1425,521,913,728,1520,2441,448,501,902,1516,1840,1014,1482,0,1753,1424,1058,445,1320,650,2718,965,2151,2062,1620,1928,1895,2234,1920,642,1508,1948,0
|
||||||
|
10,1833,248,994,1224,2054,1468,1335,2094,927,960,1446,670,920,1584,2685,565,1731,1898,2226,1783,888,2421,245,717,1910,2302,1806,1201,496,160,1999,1596,718,1141,1875,1821,3438,2147,1802,1344,1077,840,1789,1862,1498,0,1959,1824,1448
|
||||||
|
1187,1355,1074,0,1125,936,1292,0,1895,1219,1770,1246,702,1527,435,598,2404,1831,743,1658,2370,206,1055,314,2164,1618,1072,3469,1860,1947,0,1995,2361,2310,876,3066,1584,1247,1733,1863,1677,867,1045,290,2266,1932,189,457,1227,3310
|
||||||
|
1100,1488,2516,2033,1159,1764,184,215,2141,2111,1640,1552,340,1870,690,1885,814,1386,2474,1145,1406,330,1662,653,824,1770,1577,2782,2710,1485,1059,2340,1377,2231,638,699,1506,2297,1298,1726,684,349,782,1124,1329,1384,860,1696,1523,1636
|
||||||
|
671,1453,1548,2387,0,2825,88,0,1544,2588,513,936,2887,1761,1134,1933,685,2610,1058,607,1034,0,555,2302,476,1552,288,1760,773,1824,1791,1890,2433,1288,630,2287,1556,2537,738,1734,1274,770,1505,439,1309,2178,1310,872,2134,375
|
||||||
|
309,1549,1074,1480,941,668,1906,0,1094,1070,1277,1527,2288,1850,346,1393,599,1980,1078,500,1624,112,2315,1934,260,1864,970,1312,1800,1265,1538,1477,2606,669,0,2161,1992,1391,1428,2457,293,657,29,1329,1408,1996,932,362,1424,2221
|
||||||
|
312,2293,2208,0,756,1825,1629,1659,2212,1631,870,1132,470,455,1199,2497,744,1298,0,1564,1167,821,1511,2421,2104,2710,978,2494,891,1023,1784,1390,1856,1145,0,467,1015,2748,0,2026,1126,1581,1078,2330,2910,2170,0,1391,2771,2164
|
||||||
|
331,1419,1275,1594,29,2782,292,575,2340,2302,1832,2386,922,525,716,1991,1432,2469,463,1232,1656,1020,373,2480,2117,2159,872,1582,1451,1627,1750,202,1983,1352,899,1443,1908,2249,1382,754,950,2350,842,909,2280,2247,419,396,3367,1377
|
||||||
|
740,1136,996,2607,778,1094,992,0,1927,1465,709,896,1506,418,1959,1294,1593,1684,1647,754,1286,1097,1632,1496,595,2252,1644,1531,787,0,1329,1970,1639,1636,1023,1598,384,1388,136,1629,1758,383,2534,1271,1714,1953,601,0,3198,44
|
||||||
|
1761,2567,367,7,0,2718,737,415,1756,1024,2453,469,2759,1570,944,359,985,1558,1184,0,441,655,1295,1668,2809,1421,1188,2276,637,1433,782,341,2035,50,146,1919,2178,2175,805,1978,1494,1605,2762,2508,994,202,1068,1523,3065,1080
|
||||||
|
939,2274,246,2992,599,1221,19,0,1425,2208,1797,43,1303,773,670,605,0,1191,1610,1533,2143,1548,1546,1160,1117,1241,1621,1274,3583,2268,860,925,2351,2081,1423,1131,710,1031,155,2281,1179,1985,2823,2164,1803,2225,1122,1303,1528,658
|
||||||
|
454,1169,1037,1641,384,1778,493,177,2818,2155,1523,1602,1177,1979,1133,1424,1737,2196,514,1988,2381,341,1123,1721,2376,1835,850,1731,1918,1243,1439,666,1862,1202,400,1182,1514,730,74,1245,390,1644,1353,893,2348,2711,548,1087,2515,1243
|
||||||
|
570,1497,1218,1764,316,1333,1064,0,1739,1587,1840,1812,1012,2297,0,1189,2036,1947,2144,1403,1792,276,2199,1961,1675,3137,1843,2743,2427,1415,434,959,1043,1239,457,938,1353,656,727,1862,0,328,619,1268,1673,1445,1201,506,1676,2804
|
||||||
|
1259,1866,1654,1843,1468,1349,132,534,1857,1534,1445,238,1224,2108,64,1812,593,1441,1299,959,1580,645,2581,587,2241,970,1634,2533,2755,1986,0,1530,2251,1522,1034,1715,760,1482,1011,2399,1587,1456,1739,1097,1392,1287,344,1670,1249,258
|
||||||
|
0,1901,1531,905,402,780,0,158,3177,1866,1932,2961,2323,2506,62,1603,476,2338,412,636,200,639,1455,2264,957,772,2157,1908,1288,1312,804,1245,1450,1896,0,2309,882,1972,898,3806,2526,24,1950,1258,1770,652,754,1101,2797,1294
|
||||||
|
1015,1836,1854,1672,1898,1904,660,992,1808,399,1486,1952,782,1632,471,1620,628,1850,1359,1161,1351,576,1416,80,494,1280,1863,2593,1732,1841,132,2733,1462,1404,1505,1548,1499,3345,1160,2413,2919,985,2375,2373,2522,2018,1365,1319,1987,624
|
||||||
|
2076,1488,457,1520,623,1284,1952,988,2384,870,1886,1855,2319,2274,0,1528,1175,1590,312,735,1589,335,983,856,971,2135,608,2333,1190,787,1068,1199,2108,144,76,2237,1055,2655,1120,2596,678,641,1548,2189,1810,2024,0,617,2206,2704
|
||||||
|
1657,2735,787,1741,2261,1792,2464,50,725,693,761,2602,1349,1288,2869,1404,1802,1717,1013,1145,1801,0,1594,317,534,2445,2036,1286,879,1110,1355,1012,2295,1058,151,779,1658,3859,1743,1874,1848,1228,1475,2607,1969,1669,922,1730,2079,2954
|
||||||
|
1104,3079,1870,534,493,1043,383,611,1514,2410,3331,3377,727,1945,1304,2198,1725,1419,655,422,2662,0,1715,895,1749,1788,2287,2657,595,2536,1619,1263,1910,1860,1310,1045,2378,3698,557,2346,306,1096,1734,597,2277,2035,526,0,1432,1996
|
||||||
|
1238,2480,887,1148,1540,1716,2342,1505,1834,1223,820,1512,1371,570,2714,513,2020,383,1684,827,1412,0,876,1287,2398,1730,1028,1903,1388,1471,1462,1702,2041,601,1477,3229,677,2137,2254,350,1345,0,2156,1486,1972,1823,0,636,2425,2695
|
||||||
|
1033,1157,1035,433,0,1279,1011,927,1920,687,1820,1212,1093,184,2591,1643,4009,2066,1256,524,1468,572,2580,1494,3460,3041,989,3330,1233,494,1252,195,922,0,823,1149,957,1203,1783,442,0,1467,711,1264,1770,2840,0,1030,2935,1748
|
||||||
|
746,1687,2240,0,1184,1767,2782,184,2391,1526,1095,931,0,1506,257,2155,420,344,0,1751,2375,1520,402,481,1719,371,2304,2386,1268,877,0,75,1623,2112,1121,726,0,1099,620,3248,1499,1292,1615,1536,2650,2573,0,1431,553,1600
|
||||||
|
441,2080,0,1868,399,1892,324,0,2337,1785,1129,850,2035,2446,906,2863,1758,1753,446,933,221,1020,2024,2255,1022,2035,1382,1641,1850,1149,1392,1253,1681,0,472,2009,1418,1873,437,3339,983,535,1659,1272,1483,2484,0,1830,1891,843
|
||||||
|
0,1924,453,157,1413,1269,0,457,3058,1519,1527,1604,244,489,1591,1028,893,1917,876,2873,2640,1525,1666,384,875,2273,2563,2025,1448,1103,1410,2300,3213,3539,279,1407,2094,1643,578,2066,2892,2304,1008,1582,2235,1214,547,517,2725,1375
|
||||||
|
1242,2450,1848,513,687,1229,0,966,2553,1169,1927,1044,1124,0,1203,383,2130,2470,622,1221,1751,977,2667,1458,1993,1670,2055,3269,1736,1643,1264,910,2823,589,0,639,1409,714,1176,887,1842,1255,877,1785,2761,2623,1225,292,1745,0
|
||||||
|
2580,2605,2251,620,64,738,1239,1256,2675,623,1420,1867,1094,1634,1364,1450,2289,2188,1835,671,2645,234,2522,1785,2270,1757,888,2753,1357,596,974,1146,1639,1568,143,1688,1317,1477,673,1327,392,664,2170,1555,2601,1704,558,0,2180,3924
|
||||||
|
950,2247,0,1484,54,1088,0,538,3064,1699,1877,620,1686,1218,91,1807,1002,297,1096,754,0,2169,1380,1905,2401,1292,1386,2143,502,1050,57,611,2547,1163,248,2082,1257,483,2010,1569,2067,2270,2060,801,2211,1809,0,986,1838,640
|
||||||
|
952,417,786,1852,0,2597,823,408,2030,1983,2317,551,1062,542,1268,1592,1298,1374,2132,1413,1717,370,1984,379,2769,2503,1398,2902,1759,1376,412,305,675,1324,2381,842,283,717,2033,1046,0,301,1305,621,2481,2091,15,1189,1722,637
|
||||||
|
2289,2253,2141,869,746,121,1572,899,2321,1219,2030,1601,2231,1162,1589,1097,2080,2203,287,1316,1750,350,949,1534,1664,1295,730,2609,1684,1320,2071,0,3074,40,555,1849,707,2754,785,1939,0,126,1546,2916,2121,3636,1229,602,1752,2532
|
||||||
|
0,1583,980,1376,820,1407,745,0,2209,2524,1695,739,1252,1931,177,1795,1135,1714,1333,826,527,1064,2549,1044,1199,2249,1328,2143,2057,1122,612,1091,1713,2552,471,1071,1522,0,1330,2031,2495,854,1168,604,2734,349,954,1071,2927,1840
|
||||||
|
1088,2006,1335,973,131,2025,1252,881,1318,1760,2092,1873,768,1601,2042,2218,1645,744,853,13,962,578,1763,804,1910,2044,1546,2496,870,1693,137,432,1139,1157,1162,1081,1178,1033,1885,2062,1753,2492,1356,1570,1991,1501,0,938,2490,1624
|
||||||
|
1172,2014,1639,1123,356,222,1246,1337,3605,1500,1475,547,1353,1093,628,586,1338,2104,1145,383,124,861,2076,1824,1774,2203,109,3128,1308,961,1511,1265,1122,309,442,2267,708,844,1565,2078,1197,1072,1200,1782,1631,2183,0,380,2836,2254
|
||||||
|
2271,2327,1664,1637,1154,612,1173,1049,1743,857,1610,3201,1638,1742,1250,734,2427,766,1140,943,3247,722,1302,1928,1419,628,1817,671,1107,148,1207,1400,2270,1375,0,68,1503,2389,0,2113,1314,1939,2777,1679,2644,2138,1919,0,1832,2197
|
||||||
|
908,2031,1245,2366,1208,1115,1637,89,1765,2388,1617,1189,1242,2814,0,1962,1198,1757,925,751,1998,335,1218,1695,1837,825,938,1749,1721,1783,0,2138,1203,1149,227,2989,1510,1342,429,2812,1932,1131,2536,181,1914,1814,1009,0,1870,1524
|
||||||
|
1010,1421,596,1250,1712,2747,169,735,1341,1503,755,1219,1870,1821,1771,2114,1104,1100,2197,1282,1702,692,857,0,1703,2096,791,1784,2514,2701,514,1609,2604,1954,937,2243,851,2456,769,1209,1425,954,246,1935,2541,445,353,810,1627,2183
|
||||||
|
1082,1680,1557,2224,738,1243,1463,0,1213,1516,984,1836,2527,1180,836,1565,865,2254,982,1680,955,0,1989,1019,0,1457,1988,1726,2002,1053,505,1360,2318,1940,442,546,950,2802,0,2431,1319,544,1712,2884,2828,1465,565,2253,1752,1460
|
||||||
|
1101,1057,2334,1595,1739,2541,1850,1182,1614,725,1978,1352,1757,1266,1126,1790,2125,1735,1017,1179,1651,1535,2009,294,1986,1961,1269,799,823,1056,0,553,970,373,1281,1167,1426,505,358,910,602,1306,1060,1368,2643,2333,1465,0,1865,258
|
||||||
|
903,2036,1330,590,1720,1183,1817,351,1790,1150,1277,1591,648,1359,1605,1642,1695,541,899,2334,2574,675,994,1125,2347,715,1242,2795,1859,440,1911,1420,2285,1412,603,2547,1207,1857,201,2170,109,589,1366,1538,1515,2528,0,1133,1821,1530
|
||||||
|
663,1708,2051,1014,1503,1193,597,702,3198,1531,1120,1894,1064,1255,1311,1558,1217,1546,474,2580,1291,2073,1588,1322,1908,1682,1233,1911,996,322,1137,1722,1731,2226,1383,2122,1764,2090,516,1694,1435,1204,2055,1496,2793,1858,762,1002,2243,1132
|
||||||
|
1304,87,535,1123,125,3077,875,1223,587,147,2693,1691,2148,1928,120,1379,2150,439,1604,1446,2637,1317,2180,934,1063,1407,2426,1830,2333,679,458,1579,1028,411,655,880,925,2247,1115,1848,795,338,1497,1076,3561,2090,1819,1523,1518,1477
|
||||||
|
50,2934,497,0,0,1398,0,379,3734,1449,1038,1414,917,2296,1567,1833,524,1807,133,978,226,1838,2104,2772,931,2974,2062,2243,352,492,1838,1218,1902,1456,235,589,2359,1417,153,2730,1952,1472,1496,2741,1294,1570,450,1574,2670,1245
|
||||||
|
968,2524,1995,1209,996,1575,2090,257,2412,2323,1709,1657,105,1989,632,2026,1276,1496,778,774,1153,679,1533,2048,2018,2372,1545,2738,1519,1412,499,0,890,1925,1887,1112,541,998,1533,2125,875,563,2179,1438,2683,1795,655,3,2206,2599
|
||||||
|
1089,1416,765,1169,136,1567,1067,589,2303,1632,2005,1763,1159,1765,891,1301,1507,1383,1356,1820,3071,92,1908,2413,1273,2131,1683,2581,1935,715,2795,1965,1896,1918,757,1341,1929,3016,290,2218,0,304,1760,543,1783,2701,596,681,1530,2566
|
||||||
|
1776,1796,871,1658,681,2106,803,1341,1957,1126,666,424,1931,648,792,2843,1328,1659,2516,2349,1214,1128,3355,216,92,2235,1570,1872,1805,989,268,1398,1567,2196,745,1739,600,1771,749,1738,801,611,2070,1508,3101,871,458,2018,1249,1359
|
||||||
|
2105,2404,367,2651,1309,914,1844,0,1732,2027,2402,1354,2775,1095,2327,736,2448,1474,1913,691,2652,0,1602,998,1909,2069,1480,1637,1720,242,879,1414,2175,1995,140,1406,1749,1329,0,964,949,0,2615,1445,2083,1114,742,0,1249,2527
|
||||||
|
1053,1828,1129,0,742,1475,2192,1506,1622,1510,1333,0,1428,1459,487,2073,1071,1151,938,702,293,0,3445,1444,1937,2198,513,3009,2152,1810,601,1389,1603,717,0,1060,2220,1225,2606,1716,1161,1211,1083,1753,2660,482,0,2637,2424,2660
|
||||||
|
427,1122,382,2967,88,1531,1209,617,855,2061,974,269,1907,2759,480,1350,149,2259,1960,108,1432,1417,2215,1972,0,1007,402,1613,1877,1714,481,784,1629,433,436,1509,1059,1319,1637,2684,1572,1142,2139,1134,2357,1022,1836,986,1752,1960
|
||||||
|
38,1123,0,2594,1240,1565,0,453,2668,2654,1475,1464,1891,1813,1625,2564,1659,1068,2168,2155,981,687,2016,1303,1945,2796,313,2386,2362,1478,2255,1772,1695,1232,381,2818,1838,925,1255,1084,423,0,68,748,1746,1775,0,1170,2343,692
|
||||||
|
2710,1433,2054,2268,732,1272,1712,717,1881,1023,1801,563,752,1381,418,474,1289,1720,1952,283,2414,1133,1367,592,1087,1414,865,2182,2383,929,1241,439,1210,0,1879,1107,834,1395,924,1952,0,1087,3001,3056,2586,1883,1503,1055,3023,2038
|
||||||
|
628,1684,1759,1193,477,1800,1521,414,2463,0,1062,1333,1919,2591,357,1353,1936,1867,890,585,685,0,2053,2324,1840,1465,710,2095,2157,1128,731,1494,1576,591,0,844,1493,340,1077,1185,1569,1023,1040,2002,3537,2398,548,1044,1950,2619
|
||||||
|
0,2736,607,2698,897,1621,974,393,1963,2275,1189,1323,2360,1492,1329,3349,672,1233,1155,1238,541,1003,2225,2483,366,1508,815,0,1356,601,1111,1224,1432,1053,0,1699,1742,749,0,1782,1954,1443,2445,1497,3038,1142,866,807,2719,374
|
||||||
|
958,1716,1128,1146,0,1411,843,953,937,208,2351,2172,1068,1932,938,509,636,1328,1195,372,2822,1092,1129,2260,1784,1583,1038,1823,1863,1083,1863,1350,1868,379,88,1338,1682,2176,1048,2510,514,2209,1824,2004,2161,1686,1724,28,2732,3029
|
||||||
|
142,1226,1512,651,335,2587,2446,0,2656,2513,2036,913,1277,2598,1864,1355,751,1592,596,1046,1670,0,487,1289,1516,1031,758,2734,1085,1303,1482,0,1184,1686,1466,1680,1265,663,0,1671,0,260,1849,2189,2481,1860,0,1262,2130,1805
|
||||||
|
394,1183,2712,30,997,1275,489,1048,2193,1878,1799,1195,59,881,1457,973,1744,1516,849,1778,2383,1333,1824,1139,1472,1704,1182,2036,1705,625,2396,2286,2072,1797,2090,317,2054,2572,996,1558,722,1412,1079,1165,2437,2779,895,320,2696,1324
|
||||||
|
908,3027,324,1126,953,1332,753,738,3970,662,1896,134,1970,0,0,2399,726,2759,392,1197,1394,1260,3466,499,1152,3602,2620,1651,796,382,985,1007,2630,762,81,1366,1062,849,1069,1166,1646,1162,337,1413,1988,2516,0,0,1380,436
|
||||||
|
657,2592,447,1538,334,2204,138,754,2465,1778,2150,2355,377,1324,982,3784,2075,331,1238,1805,3080,1115,1376,1450,1608,1640,1673,1358,2400,1493,1267,97,1704,1562,1124,1066,1208,921,1227,1354,802,1518,1354,708,3372,2952,0,280,791,1291
|
||||||
|
1146,1424,2140,594,0,933,1218,480,1710,1179,1059,2290,1839,505,915,1013,496,1964,1546,921,1130,1283,1307,1679,0,1236,1856,2755,788,738,1958,1085,1981,1667,507,944,493,2550,1531,2965,0,24,1361,1739,1059,1882,836,1448,1138,2475
|
||||||
|
923,823,775,1651,590,2855,1749,0,1518,979,1473,1161,3113,314,1454,1412,2008,1405,808,1640,855,625,1615,2252,1815,3174,1374,918,1264,0,1461,513,1587,1436,0,0,1116,1120,112,2055,1617,1386,651,1483,1377,1663,548,1598,2260,1618
|
||||||
|
1079,2627,1976,1626,1187,1187,703,867,2238,1997,1892,1325,1536,2013,896,2534,2062,2150,1246,1321,634,592,2130,1725,1488,1896,1486,1987,479,938,886,0,1455,1996,1369,1468,1109,2318,857,2883,441,766,2521,1576,2145,1088,325,855,2727,2149
|
||||||
|
354,208,954,1405,0,484,1116,791,1496,737,1807,383,727,1259,677,1053,2188,2071,1627,1352,2028,1089,3232,1610,1708,1897,1169,2798,2434,1182,958,1545,1845,78,624,1939,1206,1632,1136,2009,0,2068,1569,950,1676,2315,191,614,3054,1411
|
||||||
|
2359,1779,2200,1128,769,1552,679,670,1768,459,2105,1398,1406,37,1373,1568,2766,2221,1342,1491,2632,1181,2201,404,1926,1814,2060,2276,1696,688,555,752,2001,1123,637,932,671,1744,710,1478,212,715,1432,1341,2251,2662,1522,728,856,1647
|
||||||
|
1382,1492,163,2139,140,1608,577,265,1342,2612,1819,904,2532,0,1312,1448,1118,1815,2000,1880,1268,964,3093,1309,745,2469,2188,1684,1930,946,345,908,1793,1763,231,2164,657,1817,1494,2471,1075,124,2227,734,2286,875,0,1281,1881,1117
|
||||||
|
151,2272,747,495,13,262,2127,525,3320,971,677,1343,951,2024,1349,1140,1852,1207,841,900,1082,3,1948,1821,1054,1221,2139,2500,1070,1230,0,1235,1430,1211,0,2233,273,633,540,2605,1079,972,2230,1666,2032,1709,0,818,1276,2469
|
||||||
|
928,2100,1060,2544,1122,1304,1419,1213,858,1320,1672,1190,771,1841,343,2818,1275,756,1353,672,1836,1087,2416,961,1020,1843,968,1856,2330,1254,1190,1710,1502,1242,442,200,774,765,1831,1806,932,1553,953,828,2793,1907,1105,444,2071,2776
|
||||||
|
461,3184,819,1846,657,1421,0,0,2604,2240,1262,770,1651,1018,1516,1215,1111,2482,1875,539,622,0,1818,1383,1147,2877,1465,2315,789,876,1383,1290,1936,1878,727,1075,839,1337,755,1983,2160,0,1818,952,898,1005,0,682,2018,1309
|
||||||
|
113,1563,843,2359,519,1783,1666,2077,1013,2065,1178,231,1839,1290,2502,874,680,820,2398,1807,2130,543,1775,1382,2724,1598,77,2787,1987,2176,727,1757,1047,1591,1230,2925,665,980,0,346,579,706,2569,1297,2270,767,382,884,1944,1405
|
||||||
|
360,0,327,0,85,2065,1243,1827,2201,298,2637,85,2213,1124,692,1350,1222,737,1671,1124,1196,1985,2502,1266,2992,791,1053,2802,2448,1250,1150,1059,1351,927,770,1974,951,1486,893,1697,951,666,1470,1104,2436,1429,462,948,1842,170
|
||||||
|
0,2437,1471,1889,511,1933,807,880,1160,2950,1133,1608,1416,907,0,2554,42,1466,129,1647,1365,1240,824,2018,349,1447,1717,1201,1116,1680,1022,852,2201,1735,476,1149,924,2024,519,2548,1066,2148,1125,1488,2043,1353,851,1067,2114,525
|
||||||
|
1542,2241,413,2687,1197,1860,371,1686,616,1109,857,2269,1624,1360,2330,3194,2015,820,894,546,1709,1904,1972,2343,1437,2898,1119,824,386,0,1202,900,1852,370,483,1072,1621,2421,962,1914,1926,1994,1521,1776,2489,1131,1099,987,2513,1836
|
||||||
|
1764,1623,1801,0,1044,1680,455,271,3029,1104,1759,686,768,1219,1589,1439,2522,1070,746,2024,1848,650,3346,384,2285,1735,2438,3529,2303,1201,864,1243,1997,1629,888,611,1094,1746,529,1647,1002,261,1394,1739,2115,2578,792,1869,1363,144
|
||||||
|
2376,1488,1177,2414,244,1003,1771,671,306,2486,1017,1045,1472,260,1800,1681,1390,880,1286,969,1451,713,1640,0,793,2750,1450,2768,882,651,618,1480,2147,1930,997,1177,924,2181,2280,1008,967,1959,1540,2099,2356,749,392,2285,3137,2744
|
||||||
|
919,1108,590,1279,0,1540,1035,1327,1857,1416,1540,1496,951,2067,0,1849,1641,1496,96,841,1964,1502,1543,2501,1357,2033,1110,2914,2314,1890,1147,1550,1637,885,387,1450,1899,1275,897,1862,125,2523,1211,1873,3196,1841,680,618,2513,2068
|
||||||
|
333,1714,1165,2623,1244,784,1112,0,2019,2774,1488,1828,883,1708,1509,1502,870,1821,1326,1219,2907,987,1731,909,0,1324,3371,1306,1277,679,732,1154,2485,2876,1636,1317,1188,993,0,1876,988,253,1988,1585,2111,1324,1052,284,2008,976
|
||||||
|
603,2296,1502,2052,0,2423,0,164,1324,1625,2604,1472,1491,1195,2108,404,1325,2175,2230,425,2389,366,1756,1542,2449,1526,1746,2417,2303,2545,1130,0,2109,43,719,1801,1367,620,1102,297,21,1198,1167,1623,1155,2255,2010,296,2191,274
|
||||||
|
1065,2260,1601,1171,923,1418,1186,0,1781,493,1491,896,2166,1828,1137,0,1429,3109,1862,0,1957,0,974,613,2229,1332,1489,2179,1351,992,0,1434,2434,778,0,1912,862,1070,815,1219,1631,927,1124,1652,270,1049,719,337,2847,2905
|
||||||
|
255,1278,1202,583,786,1670,622,89,2941,0,1930,1991,1018,2178,875,1198,2365,1695,1340,1633,2603,1254,0,1630,1610,997,1447,1806,2775,939,1096,1790,2221,906,705,2500,1902,2859,225,1690,933,830,1882,2064,2918,2241,780,361,1044,2643
|
||||||
|
1743,2436,1066,2100,293,1958,3070,374,481,758,2786,1256,2415,2061,2652,1039,2253,472,1693,434,1742,203,698,1035,2134,520,1267,2464,2305,2098,136,0,1955,222,695,2238,1091,1162,0,1205,0,1296,3623,2882,1930,1872,1283,1255,1033,2583
|
||||||
|
1003,2184,1607,980,503,3229,737,781,2394,1210,1286,573,2266,617,1290,1341,649,961,732,1971,2004,725,0,1354,2703,1703,1429,1384,2101,1468,639,10,1526,1294,0,382,0,662,0,2032,1183,954,1316,2050,2347,1457,653,1859,739,1865
|
||||||
|
481,3298,362,2997,2,694,0,0,3572,1591,122,1758,894,1783,1329,1425,1475,2741,1024,641,806,0,999,1448,0,2054,2382,1960,1660,2135,477,1647,2814,1566,564,2076,420,1397,801,1558,2385,905,2518,1504,779,3328,0,816,1775,852
|
||||||
|
0,2092,838,1756,1264,2455,1177,1251,2894,1991,1597,1356,1106,1961,941,3102,1665,1686,882,639,850,196,2146,2202,1369,2114,1430,1782,704,306,1153,1716,1049,1012,0,1467,1566,1535,647,1555,1877,769,1375,673,2152,1326,0,326,3354,1304
|
||||||
|
1087,1295,1836,1363,1242,1764,1611,365,1241,607,1559,1285,1624,903,1019,2036,2616,1889,1372,1937,2780,1713,2311,1748,818,1814,1366,1254,1185,0,1761,584,1801,942,116,1769,1504,2800,0,2233,0,397,1395,2042,1989,1517,1283,138,2038,1247
|
||||||
|
1413,3020,2441,397,1557,1272,1182,125,2101,1416,2218,2550,376,1131,1149,562,1432,1633,257,675,1823,611,195,418,1658,1103,2408,2620,1935,2264,366,1305,2095,922,1393,2274,1013,2959,668,2290,1987,687,2170,2529,2440,1788,738,426,1779,1865
|
||||||
|
1127,1593,1967,1531,936,195,1850,197,2632,1283,1245,1243,1719,944,147,2738,165,1396,235,575,1422,1451,1233,86,1038,1402,1491,2174,1407,515,902,1692,1947,1879,2157,1892,592,1672,121,1980,0,204,2111,2181,1431,1640,837,979,1731,637
|
||||||
|
1720,897,1680,826,123,2489,1766,92,2116,1893,1954,1548,1628,1622,526,1966,2000,1708,160,868,1016,516,1135,1529,2239,1607,1594,2646,1323,384,1105,292,1637,625,0,1255,1037,540,1639,1862,656,282,292,1638,2891,2120,231,1932,3303,2549
|
||||||
|
1289,2520,1667,1709,239,1682,92,1028,1468,2445,1203,419,1824,707,1362,2166,232,1644,2415,820,1718,1176,2103,6,2092,1396,608,2268,1105,987,647,1753,1978,1359,1366,1562,1360,1496,1792,1099,542,1409,1736,423,1135,448,949,1544,1820,1151
|
||||||
|
256,3047,266,2278,117,1218,1713,511,743,1392,84,0,2513,706,2548,2025,1180,1922,1668,1370,1268,700,2598,2265,1487,1058,0,1655,658,1137,1374,622,2520,1329,54,1927,474,638,379,1398,0,1110,2490,588,668,1897,287,475,1232,1236
|
||||||
|
1863,2985,505,895,0,2158,1948,213,2578,652,2056,388,2791,1385,480,329,263,1652,940,650,1521,86,865,1387,2157,1083,1067,1676,2395,1730,458,110,1691,613,0,1137,330,0,0,1850,0,980,2880,2001,1338,2468,989,1350,621,2810
|
||||||
|
0,2258,1471,935,582,2413,1314,61,1188,2212,1175,3090,1030,2825,1183,2802,821,1530,560,211,721,0,733,2691,638,2844,880,2138,617,935,1313,1362,807,1264,0,2469,1895,1953,1080,2786,1586,628,744,844,1543,829,305,1442,3227,3607
|
||||||
|
1030,2318,2415,747,1389,435,1462,232,2172,1385,973,1410,545,2303,812,1129,1802,2000,920,1274,779,340,1340,128,970,1061,775,2612,1573,2131,0,1329,1732,456,1101,2260,1321,1053,679,2518,810,1705,2099,2234,1830,2759,29,934,2131,1504
|
||||||
|
630,1784,2188,1931,1314,1440,1993,546,2749,1311,675,1082,337,1810,0,1267,402,1896,96,1162,1142,633,501,2213,263,1877,900,1615,1309,1670,766,1442,1078,1801,632,1648,131,1527,0,2906,2122,783,2612,1101,2250,3253,1,254,1319,1678
|
||||||
|
1732,1527,925,1580,686,2242,1687,496,1615,458,1719,1944,2686,1465,1014,1408,2115,1745,240,1455,2720,1357,1584,1909,229,634,2360,1392,1441,307,1794,1963,2196,1368,0,1874,1641,2072,0,2955,1282,1077,2119,1852,2130,2981,1304,0,1626,637
|
||||||
|
996,2769,701,615,623,1870,473,1572,1885,2755,2131,1064,691,478,1202,2534,0,1471,408,217,667,1219,2978,2012,2086,2344,1564,3135,1253,2094,2240,105,2464,840,768,909,1881,2724,2306,2920,950,1814,793,1820,1221,943,0,1430,2876,820
|
||||||
|
729,2801,1220,1855,498,428,1394,0,1787,1927,1246,908,584,1344,1132,2296,1513,1005,1142,1178,2112,779,1199,1013,1219,1796,2378,2301,2113,1105,1452,1578,2058,2231,1425,1335,427,1062,1031,1828,523,1001,1996,1215,1720,2585,1025,861,2300,2692
|
||||||
|
576,1563,34,1958,0,2096,2185,116,1985,1067,2133,330,2607,2592,1356,1656,1578,600,516,0,1487,1002,1244,2083,1583,291,1458,1685,2166,814,227,1107,1192,527,438,1667,1719,0,50,1415,491,1917,2369,2001,1837,1898,831,1203,1367,1292
|
||||||
|
553,1433,0,2053,17,962,936,454,2526,1326,1725,1502,1170,2122,972,2020,1013,1995,548,1475,2714,136,2428,1796,820,2604,1629,3011,2210,1162,763,1550,1929,1678,130,2143,1087,1217,688,1760,913,575,1734,1228,1967,2735,247,582,1393,1988
|
||||||
|
1176,1807,2027,625,115,1161,1528,460,1902,1641,2104,1146,2020,1629,0,1830,628,1774,791,71,980,151,1204,1113,1954,1584,706,2898,1478,2169,1548,0,1977,1141,892,1228,1274,1647,300,2275,331,1028,1489,1960,1279,1492,998,1603,1952,1161
|
||||||
|
589,2038,1798,2193,0,1093,1570,579,1388,1409,1371,1632,748,2114,1070,1839,867,591,650,0,1897,1312,419,1084,1523,540,1727,1601,941,1066,398,293,1169,1419,1413,639,161,71,496,1889,1488,2547,2562,2778,2237,1206,1140,972,3500,1316
|
||||||
|
2235,2642,1108,998,1256,2025,696,1047,2665,0,3083,1661,3066,1056,2314,1217,2731,888,1354,1316,2632,595,2665,195,3003,485,2567,1675,2710,862,0,495,2396,489,0,1638,248,1853,925,1370,1919,409,1722,2401,3306,1951,41,91,543,1327
|
||||||
|
545,1241,1241,733,0,2157,0,322,1429,1866,1565,1045,1044,1556,629,1589,2068,1810,1892,364,962,1585,2176,3274,2488,2905,685,2487,1653,1560,1358,0,1810,906,238,1573,849,1117,1812,2321,322,1842,156,287,2004,1216,137,0,2449,2526
|
||||||
|
119,3091,0,413,711,2331,1337,263,2776,940,1925,1534,1181,2318,1164,1809,1270,1529,1193,1098,1483,614,1117,1048,1694,3003,1374,1998,1548,1255,55,1630,713,300,536,3043,2076,396,0,2396,1996,586,2193,1912,1647,1072,0,467,2107,2582
|
||||||
|
198,3329,1685,1883,1060,1302,210,689,2086,1508,1564,709,761,1613,1102,2091,1460,1913,2243,903,749,21,406,861,1342,1956,1036,2765,1868,2316,722,1251,1943,1234,874,2403,456,1623,375,1625,933,838,1568,1566,1272,1385,480,844,1879,2834
|
||||||
|
1818,1259,2118,2491,175,2266,0,237,2061,1569,559,1910,611,869,2569,1975,2133,1942,2461,1761,2415,721,2370,1231,798,2802,1224,2345,2493,794,1606,1407,1099,1537,1368,303,840,1690,1215,867,0,355,1079,1144,2687,2823,503,1419,1526,2054
|
||||||
|
0,2056,1288,1282,1989,2335,248,0,2428,2460,1958,1888,881,1368,1017,2356,1418,1221,632,967,442,1524,1483,1057,1589,2146,1378,975,567,0,730,1427,889,594,527,1958,2393,324,0,2377,2495,1177,705,1141,1602,1042,0,1251,3247,0
|
||||||
|
174,880,1059,1472,879,842,1810,50,3758,1937,1575,1512,126,1784,906,2264,2222,1343,1117,2218,2727,1850,1290,1741,632,1330,1974,2087,2260,0,1310,918,910,2078,878,1971,1241,828,125,1834,0,846,1525,1672,2291,2418,338,346,2199,1750
|
||||||
|
322,1839,1631,911,418,1727,1563,1804,2919,581,1465,2011,893,715,1140,2053,1411,1557,729,1956,1873,988,1395,2004,1996,1393,1722,2692,1853,91,973,1112,1591,280,0,1282,1493,843,1641,1095,649,1272,581,1990,2528,2478,0,1863,1796,2086
|
||||||
|
785,3066,1387,1934,1122,1158,871,0,1056,947,0,2790,784,3095,1206,3220,1995,1499,577,413,973,376,1686,1651,0,1489,1632,1589,1301,1155,941,2321,1859,1058,746,767,1408,3515,1918,2740,2450,1143,794,2054,2406,2635,874,1433,1441,2640
|
||||||
|
874,948,0,1772,148,2330,1659,1027,1321,1428,2218,2639,845,1818,2307,1200,2412,553,1527,1130,3090,1205,287,2093,1011,1070,2185,1785,419,352,956,0,1658,742,200,1872,1594,876,783,2011,34,2413,1550,1503,2417,2037,486,0,2182,2031
|
||||||
|
399,1650,1542,994,441,1739,0,0,1611,1350,1674,1675,908,2740,1000,1730,2465,1561,1608,550,1636,986,1385,1669,1140,1365,1674,2040,2747,1923,586,758,1638,1389,229,830,1529,1670,611,2234,1628,1236,1764,1731,2412,804,1242,1761,1990,1799
|
||||||
|
1369,1838,177,2951,1099,1422,783,0,2249,1929,2027,1327,2267,633,1499,277,1430,2098,2325,1209,1134,280,2523,747,1104,2741,2286,2675,3101,1447,1021,1124,2330,1840,1138,1770,1300,109,700,1318,715,0,1084,2151,2010,1270,0,884,1420,1388
|
||||||
|
1082,2185,1086,2628,1358,108,955,706,1655,2552,1696,963,1794,1797,1846,3318,1477,1172,920,1923,1837,21,2414,0,1198,1661,1125,3226,973,1156,563,2199,2030,2550,1795,2337,874,2191,404,1431,1126,211,2122,708,2229,2426,585,1401,1319,1211
|
||||||
|
593,1445,993,340,0,1236,599,709,2593,2958,1323,458,845,475,321,389,405,2355,755,2089,415,777,2524,0,490,2581,2653,3424,1231,2823,616,1425,2016,2267,1187,1765,387,1935,2542,3049,3346,1473,2172,1014,2333,1340,0,2152,3278,892
|
||||||
|
292,747,768,1045,95,2023,1254,1743,637,1183,1375,921,262,334,1806,1702,1952,305,1514,1210,2366,1432,1400,535,2261,1275,1844,2838,2087,1643,0,1643,1659,616,1401,1544,544,251,1655,543,1413,2076,1158,1212,3022,2127,4,1122,2611,1027
|
||||||
|
1094,1980,1920,53,1016,1590,1081,1193,1125,1102,1652,1863,1393,1454,988,1618,1640,1572,550,1235,1203,1384,0,1553,2449,1713,0,1406,1212,1643,1229,323,1865,1418,255,1833,1342,2810,199,2312,0,1722,1376,3099,1739,903,224,546,3432,3263
|
||||||
|
1385,2336,2307,1403,1077,1302,1365,692,1378,1835,566,1806,499,667,797,2283,552,1153,752,787,1391,648,1494,774,882,2169,1895,2350,614,1047,1145,2128,1940,2058,220,604,1216,3150,1474,2265,2554,1303,1253,2480,1662,588,268,1604,3230,1247
|
||||||
|
1020,1881,1465,19,709,1896,185,231,3385,2859,1570,1859,1126,1780,1060,1205,1903,1983,435,2228,967,1171,1012,2030,2841,1814,1354,2788,1576,1130,1113,0,1574,1287,952,1554,1071,467,154,2775,413,444,1683,1115,2264,1925,499,1416,1993,1218
|
||||||
|
563,1045,91,1565,0,1736,250,0,2560,1454,957,732,1112,2342,679,1648,1680,1408,1051,721,1508,1045,1656,1663,0,2176,2163,2314,2364,1031,1060,1625,1461,2763,849,1183,99,244,917,1834,1465,0,1815,939,2558,2366,1326,877,1442,1783
|
||||||
|
565,2744,1080,1035,429,94,1481,280,2803,914,1838,581,649,1122,0,1334,0,1908,1231,1058,2575,336,2310,19,2043,1917,1303,3214,2619,1650,665,2294,2240,1211,1403,2491,1022,1462,1623,1103,423,404,1663,1182,1702,2072,0,623,914,2463
|
||||||
|
15,2008,1333,946,737,845,2036,587,1545,1227,873,804,892,532,3333,0,2229,862,2254,959,1519,740,2448,1893,2550,1331,1418,2165,1568,2119,1390,308,2115,589,1056,1367,1145,221,21,674,0,1418,2327,2376,1668,1633,0,0,2502,320
|
||||||
|
515,1502,2257,1324,783,1663,186,1203,944,1943,1828,1524,1139,1697,892,3431,2054,1806,1796,1473,1276,570,2647,1956,2037,2192,490,1984,1064,1147,1483,828,409,1865,80,1494,739,1882,1008,3016,0,259,857,6,1139,1423,670,701,3174,1931
|
||||||
|
667,1704,1062,2447,2104,1788,1615,422,2153,2831,1209,2520,1126,1578,978,836,502,2147,935,1218,256,0,1954,1418,0,2388,2228,1088,2217,1924,562,1259,1717,1569,771,890,1400,1712,1928,1872,3551,0,1145,2197,3755,1479,853,1809,2975,2479
|
||||||
|
0,1322,2598,0,626,2567,508,951,2492,1313,1200,1896,137,1600,191,2414,939,1497,536,2311,559,865,1986,2259,2209,1212,1687,2422,1546,1191,155,1123,1030,1268,0,1228,1120,846,367,2554,1107,1899,277,1441,2823,1881,187,2041,3005,1151
|
||||||
|
392,2773,1066,2394,0,2454,1015,99,2188,1013,582,1862,873,1972,778,2935,109,1341,937,805,1738,211,551,2618,960,1690,1243,1307,1102,970,1838,108,1681,636,158,1023,191,1004,1956,1824,135,1374,486,1714,2337,3091,451,926,2071,2813
|
||||||
|
742,1811,1493,805,524,1974,1838,0,1616,765,2190,829,2043,2295,1484,1115,1361,1597,911,493,1335,0,1535,1280,1188,1627,1054,2952,1205,756,948,1166,2201,885,623,2261,1588,1399,618,1530,881,14,1767,1921,1887,1807,1248,1035,2036,2388
|
||||||
|
1736,1358,2110,1035,875,0,0,1659,2007,766,2276,2327,1678,982,1598,3069,2143,820,1544,96,1035,1424,3224,658,1197,1605,553,2090,1665,971,1285,2141,2302,1465,982,1285,2914,2141,2799,1050,1762,1971,292,2495,3657,1496,907,636,3125,2096
|
||||||
|
593,2654,946,1139,1419,1896,452,1232,2138,1439,1812,1218,1642,1542,1643,1561,2613,1208,1790,1323,242,173,2568,1059,1904,1976,2161,2023,1606,2403,0,1402,1755,978,1355,1415,1689,1598,287,924,2020,518,1937,1709,3203,1838,0,1086,1460,597
|
||||||
|
1185,2223,1663,802,547,608,1292,551,2211,617,1459,2315,1672,1354,1977,336,3089,2092,1084,14,996,820,2221,1759,1758,2502,1198,2113,591,236,1192,0,1602,96,519,1487,1189,1769,638,1244,434,1682,1342,2320,1397,1607,0,0,3143,2250
|
||||||
|
1411,1839,2619,1232,606,2429,858,789,1452,838,1863,2937,873,1227,2544,1222,1575,470,1262,1349,2141,1174,1617,1734,1509,711,2595,1829,1700,928,849,568,1598,1576,492,370,1387,1716,703,1601,662,1599,1382,2419,2992,1802,1339,1397,1356,1402
|
||||||
|
1620,1331,1424,2451,318,1420,1475,290,1582,1541,1460,1796,1453,650,1549,1931,1907,1399,1059,967,1395,1099,1641,1590,1557,1820,942,2040,1781,467,1259,925,1764,1260,432,976,1185,1360,1434,1383,1074,1682,1469,2448,3212,1893,0,615,3475,1834
|
||||||
|
963,1557,2159,552,931,2181,468,679,2829,1497,1782,1604,998,751,1124,661,2374,2578,2389,1924,957,741,1733,1116,1857,2541,1317,1895,1892,1962,1191,0,1402,861,1457,950,1441,1077,847,1421,614,672,738,2149,3162,1889,917,807,2331,1567
|
||||||
|
695,2187,460,3531,368,2220,218,267,1283,2652,1518,2709,1703,3180,1755,3755,1361,547,1533,604,1971,703,2679,1679,0,1829,2805,837,1315,775,1070,1084,732,3157,1847,57,867,1225,1195,2178,1456,225,2135,964,3322,1288,1594,1165,1733,1677
|
||||||
|
1471,1833,1758,830,0,2379,1524,986,386,0,2189,693,2468,1205,1178,1430,1854,1454,610,0,1213,326,2061,1480,2562,870,918,1939,1477,1588,0,177,1595,0,589,1206,1293,1204,787,1414,1038,2713,2181,2474,2025,1786,1692,1397,2354,651
|
||||||
|
1312,1716,1576,1650,1115,1431,2138,1690,325,3615,1321,2899,1198,1791,668,3614,960,792,180,1194,622,0,1086,813,381,2720,762,2078,0,928,1275,583,452,1668,1214,1932,0,3583,714,3164,756,86,1899,1131,2296,1103,0,2381,4139,2857
|
||||||
|
266,2911,1458,1494,1670,1345,2119,0,1881,2965,2029,355,1194,1662,326,3061,0,1008,12,1812,525,146,1195,696,1061,1435,873,1750,2218,1047,1206,1253,1176,1714,765,768,964,2328,0,3002,1737,288,2075,1618,2007,2462,358,2897,2046,2227
|
||||||
|
599,1423,0,1473,1307,2660,898,640,1911,1492,918,1070,1959,0,2486,3428,1547,565,1466,1918,579,1352,1766,1154,984,2340,1753,1894,1702,269,1954,1361,1997,2449,2165,1590,1327,2205,705,1448,1376,447,1446,2150,3489,1050,333,2303,2201,1138
|
||||||
|
679,2631,548,1572,806,1268,527,485,2755,805,533,883,1429,622,2072,293,1135,2275,1611,596,1178,1385,2734,1973,1318,2125,1992,840,1174,1005,734,656,2626,86,0,392,1497,1741,180,1552,1854,1980,2351,2519,1438,1217,95,580,1953,250
|
||||||
|
374,2578,1410,523,1184,1216,506,0,1581,1699,1196,2053,958,1533,0,2853,2153,1355,0,1136,618,569,572,1616,1560,697,1679,1460,1522,1637,779,785,2342,1788,0,731,314,1966,486,2460,1974,1562,1172,1253,2961,2389,1057,1421,2834,1888
|
||||||
|
1234,3042,811,2117,779,2151,1390,99,178,2700,2405,3015,1817,1835,1378,1945,1914,2019,977,495,1614,0,1216,2325,238,1987,1351,786,423,123,360,892,1547,1095,66,1455,2151,1920,0,2532,958,1386,1948,1043,3266,1213,850,0,2899,3981
|
||||||
|
1446,2174,887,375,1617,1509,1565,508,1510,1070,2535,0,918,1141,2327,432,2536,1296,2627,2347,2531,481,1644,0,3264,1334,1855,3019,1208,1525,142,1193,2503,1249,1592,2462,1881,2216,0,1190,0,1520,2621,1729,1897,1255,740,588,1958,1598
|
||||||
|
923,2132,1424,1317,1038,927,483,0,944,2545,678,1768,502,1280,2111,3395,3160,860,951,1282,324,241,2405,1040,611,1680,1427,3220,2917,874,1138,1778,1543,1854,0,867,756,1293,1856,2159,2412,430,359,1340,1993,2593,0,2933,2891,1947
|
||||||
|
0,797,741,1004,1514,1446,700,1563,1875,1201,1296,1972,584,2982,1082,1663,2200,570,1152,1529,2270,1389,1996,1492,770,430,2066,2055,2049,1470,57,1282,1812,1849,606,926,1246,254,952,1837,1458,1765,920,1591,4051,1344,1184,392,1897,1442
|
||||||
|
624,2260,1048,814,829,2827,1572,1486,2997,2142,2391,1003,1199,1300,1602,2309,0,799,328,1847,1551,231,2752,1587,1928,2318,2552,2335,1119,1318,662,541,1186,1879,782,1135,842,1053,461,2027,1812,526,2288,1003,2361,2431,908,1089,1503,491
|
||||||
|
0,2225,2906,0,2075,979,0,852,953,2081,840,2708,0,1283,1592,2244,2225,1274,0,2611,1050,1075,329,1691,1686,2170,1507,1694,1341,1429,1976,1486,2530,2470,352,0,1704,3110,0,2166,1583,2128,0,2345,2788,1998,1168,1691,3663,2419
|
||||||
|
287,1372,626,1481,943,1247,2177,985,1233,565,1338,1236,954,2465,213,1504,2127,1082,1205,1342,1534,735,2287,831,907,1606,1711,1595,1300,1098,0,1719,1646,370,928,1397,1103,2079,1127,1339,574,1277,1714,1653,2880,2127,845,786,2159,2072
|
||||||
|
522,2378,987,456,1630,0,1261,275,2062,1099,1532,1565,2065,1543,1647,524,2368,1937,0,901,1783,586,863,624,2207,1146,1321,2515,614,1276,824,2052,2796,2293,1303,2886,1403,2177,0,1477,1839,1445,2583,1997,2288,1250,867,0,2880,1600
|
||||||
|
628,2731,1979,1626,1006,4191,1866,911,1827,1489,829,1052,1649,2343,2323,2246,639,1779,1365,1540,1175,0,1146,2439,1831,2387,195,1504,1654,1388,1396,1333,795,452,154,2101,1870,1712,0,1653,875,259,1911,2191,2185,1417,510,1521,2334,2502
|
||||||
|
541,3061,2038,807,1186,368,939,470,3172,1797,1413,1757,1262,1041,1028,96,1337,2441,1555,520,772,0,1724,962,1907,1139,1875,3512,1662,2692,774,1787,3413,2225,31,2967,1888,346,2369,518,2323,800,635,2485,2073,414,0,0,3349,2002
|
||||||
|
682,1408,1792,1778,811,2675,12,0,1600,1516,1726,1336,1726,1607,838,2053,2125,2736,1323,1609,2291,151,911,1537,1221,1740,1046,1625,1935,431,1238,1668,2190,1323,0,1779,1497,1380,589,1838,1025,726,461,184,2510,2269,1589,586,1960,2416
|
||||||
|
2024,2184,747,1199,1268,1279,275,0,1130,1174,1649,1594,1358,2180,2324,668,2625,939,2135,787,2089,1099,1521,0,962,226,2150,1627,2283,1165,481,1254,2603,1402,1246,2247,806,2187,581,1935,1252,343,2863,1974,2324,1824,1087,754,2165,1744
|
||||||
|
1067,2553,1480,1135,218,1171,1756,516,2724,1507,1115,999,0,616,1066,1470,910,1519,1638,1381,1537,1324,544,2495,1571,1829,1604,2838,1868,322,2052,1064,1799,650,735,2073,1195,1332,709,2095,0,671,1554,2550,1555,2089,0,1057,2659,3301
|
||||||
|
1015,2227,542,2314,1466,1054,420,214,2115,2286,1255,2188,903,1211,2057,3448,2610,1954,688,1829,2104,154,2568,652,1264,2525,1537,1714,1444,1079,996,722,1691,1395,470,888,1040,1824,762,1008,130,798,1050,599,2561,3233,0,1017,1869,1409
|
||||||
|
1648,1805,244,1364,1660,793,0,489,3441,1003,476,2467,1185,1626,1079,2190,2145,1441,2180,2435,0,2470,863,437,1268,2721,1536,1275,2173,1657,659,1473,1753,1445,811,2688,575,3033,2009,2308,1640,50,1477,1946,2174,1961,43,1699,2204,2569
|
||||||
|
807,1562,2321,780,1690,650,1460,256,1339,1053,1776,2113,1650,2141,1169,1202,1095,1708,62,1790,1972,400,1655,0,2983,709,1009,2226,1378,1844,0,1532,2700,2328,57,1338,1159,1659,113,867,1027,1823,888,1755,2705,1992,1830,409,2220,2032
|
||||||
|
816,2617,3053,0,2012,0,1098,1244,3248,1897,1413,1589,778,1293,958,296,1029,1918,291,1566,1519,351,0,531,1505,1047,737,2942,774,2083,1413,1925,3189,2123,1740,3055,1761,2645,216,1538,927,208,1623,2503,1396,1523,537,440,1866,2334
|
||||||
|
1325,2068,1032,1380,1420,893,1617,1288,1464,1572,1429,1623,1353,1224,1212,473,2087,1230,1705,1500,521,1428,2818,2240,1607,1289,1515,1740,1923,969,1718,1047,1533,345,274,1455,2153,2175,1757,2284,747,1341,2690,2170,2410,1284,1027,1671,3646,1523
|
||||||
|
1172,1673,780,1674,168,2400,638,958,989,1427,604,853,1362,1112,1681,1647,2030,816,1485,1264,862,654,2108,855,1408,2092,2019,3135,2033,2513,255,1206,1954,569,405,2047,0,1633,2321,1644,1925,1285,1048,2005,2053,1921,0,1789,2381,679
|
||||||
|
1229,913,1917,2111,332,2488,0,1048,507,2275,688,2293,681,1455,2356,2063,1196,1798,1722,1907,2734,1574,2055,525,393,2623,1628,1596,1758,1977,794,2461,1037,2447,2080,598,1831,2938,261,1363,97,1673,1103,2168,2014,1518,1878,1226,2576,1089
|
||||||
|
1623,1735,2316,1919,624,21,947,0,2838,513,1049,0,2395,0,1235,0,2879,3304,1781,1696,1657,1055,2540,803,1179,1737,1184,1534,2649,623,1436,234,3672,907,0,1108,611,0,72,264,0,1309,1310,2246,806,3059,895,83,1781,420
|
||||||
|
0,3073,2064,508,1998,1804,1518,1871,2199,1429,444,1169,2383,494,2396,2171,642,1581,0,1268,163,381,1964,1906,2216,1634,358,1061,988,2005,1416,106,2189,934,131,914,1111,1037,208,1134,1766,1452,1160,2596,2617,1543,457,1483,2175,693
|
||||||
|
880,2782,1060,885,918,1922,186,687,1602,2434,1069,1805,758,958,1696,1491,531,1110,1080,1989,118,1120,2551,927,339,2274,2178,2311,1162,1737,1480,2375,1805,1427,258,986,2003,2406,1880,2630,2732,1098,1349,1924,1877,1586,811,2311,3087,802
|
||||||
|
172,2483,885,1511,1115,433,1168,1154,3409,798,1106,1543,1936,1255,1145,1481,1302,2329,1490,2294,1665,300,2299,1255,0,1455,1870,1962,1085,920,715,1942,2334,1535,0,3274,1198,1813,106,1963,1647,25,2318,1737,2499,1908,0,414,1456,1736
|
||||||
|
841,1092,949,829,1375,2321,1862,0,660,1389,1373,1758,1328,1417,1817,816,1835,800,45,1293,1825,560,563,1203,1714,1395,736,2140,1992,1487,1488,634,2689,1435,232,1707,1269,873,955,1299,1226,1083,816,2219,2773,1776,494,952,2719,1922
|
|
BIN
exercises/source/exercise-10/RT-LAMP-Dao-Thi-2020-plate.png
Normal file
After Width: | Height: | Size: 231 KiB |
BIN
exercises/source/exercise-10/bean-centers.png
Normal file
After Width: | Height: | Size: 372 KiB |
BIN
exercises/source/exercise-10/coffee_beans.JPG
Normal file
After Width: | Height: | Size: 354 KiB |
BIN
exercises/source/exercise-10/ofv09303.jpg
Normal file
After Width: | Height: | Size: 174 KiB |
BIN
exercises/source/exercise-10/scatterplot.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
exercises/source/exercise-10/side-by-side.png
Normal file
After Width: | Height: | Size: 376 KiB |
|
@ -0,0 +1,559 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-6eb17f6ff50e7d3d",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"# Bioinformatics introduction"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-946d22188d87a0a5",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"In this exercise, you will perform some bioinformatic analysis. There is no specific correct answer here, but rather a series of tasks which to fulfill. You are encouraged to use online resources and discussions with colleagues to help you at all stages.\n",
|
||||||
|
"\n",
|
||||||
|
"The majority of the work for this exercise is manually interacting with websites and understanding what types of data they use and first steps of using the online tools. The Python here is mainly used as a path for you to follow through the steps one-by-one.\n",
|
||||||
|
"\n",
|
||||||
|
"Pick a protein-coding gene interesting to you. In case you cannot think of anything, I suggest: ACE2, TP53, TGFbeta1, Drosophila DopEcR, TAS1R2, Drosophila nAChRalpha1. Find the gene at [NCBI Gene](https://www.ncbi.nlm.nih.gov/gene).\n",
|
||||||
|
"\n",
|
||||||
|
"## Task 1: What is the full name of this gene? What is the NCBI GeneID?"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-f26307b555211aca",
|
||||||
|
"locked": false,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Drosophila nAChRalpha1, GeneID:42918"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-b9777b8be7bc0ad5",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Find the complete sequence for one protein isoform using [NCBI protein database website](https://www.ncbi.nlm.nih.gov/protein/). Hint: it may be easier to find the protein sequence after first finding the gene at [NCBI Gene](https://www.ncbi.nlm.nih.gov/gene), go to \"RefSeq\" sequences and then clicking on the protein sequence, which will probably start with `NP_`.\n",
|
||||||
|
"\n",
|
||||||
|
"Download a FASTA file with the seqence of this protein isoform.\n",
|
||||||
|
"\n",
|
||||||
|
"## Task 2: Make a variable named `original_fasta` which is a string containing the FASTA format protein sequence\n",
|
||||||
|
"\n",
|
||||||
|
"You can create a multi-line string in Python with triple quotes like this:\n",
|
||||||
|
"\n",
|
||||||
|
"```python\n",
|
||||||
|
"my_string = \"\"\"line 1\n",
|
||||||
|
"line 2\n",
|
||||||
|
"line 3\"\"\"\n",
|
||||||
|
"```\n",
|
||||||
|
"\n",
|
||||||
|
"Or this this:\n",
|
||||||
|
"\n",
|
||||||
|
"```python\n",
|
||||||
|
"my_string = '''line 1\n",
|
||||||
|
"line 2\n",
|
||||||
|
"line 3'''\n",
|
||||||
|
"```"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 5,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-c81dad73272cc1d7",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"original_fasta = \"\"\">NP_001262917.1 nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAADLSPTFEKPYAREMEKTIEGSRFIAQH\n",
|
||||||
|
"VKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFELLK\n",
|
||||||
|
"MGSENTL\"\"\""
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 6,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"Requirement already satisfied: biopython in /Users/andrew/anaconda3/envs/wm01-dragon/lib/python3.11/site-packages (1.84)\n",
|
||||||
|
"Requirement already satisfied: numpy in /Users/andrew/anaconda3/envs/wm01-dragon/lib/python3.11/site-packages (from biopython) (1.26.4)\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"# Ensure that we have the biopython package installed\n",
|
||||||
|
"!pip install biopython"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 7,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-7a1036cfda280feb",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"import io\n",
|
||||||
|
"import Bio.SeqIO\n",
|
||||||
|
"records = [record for record in Bio.SeqIO.parse(io.StringIO(original_fasta), \"fasta\")]\n",
|
||||||
|
"assert len(records)==1\n",
|
||||||
|
"assert isinstance(records[0], Bio.SeqRecord.SeqRecord)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-96024e67e7e5036e",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Now perform a protein BLAST search for homologous sequences using [the NCBI BLAST website](https://blast.ncbi.nlm.nih.gov/Blast.cgi).\n",
|
||||||
|
"\n",
|
||||||
|
"View the FASTA data with these sequences for at least 5 total sequences. Do not take other isoforms of the same gene in the same species. Take either: A) other genes in the same species or B) potentially homologous genes in other species. Do not take both A and B. You may limit your search to specific species to fulfill these criteria or your own curiosity.\n",
|
||||||
|
"\n",
|
||||||
|
"## Task 3: Make a variable named `others` which is a list of strings containing the FASTA format protein sequences"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 3,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-f4f84628865fc2ec",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Type your answer here and then run this and the following cell.\n",
|
||||||
|
"others = [\n",
|
||||||
|
" \"\"\">XP_001981981.3 acetylcholine receptor subunit alpha-like 1 [Drosophila erecta]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAAAAADLSPTFEKPYAREMEKTIEG\n",
|
||||||
|
"SRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAK\n",
|
||||||
|
"KKFELLKMGSENTL\"\"\",\n",
|
||||||
|
" \"\"\">XP_017020195.1 PREDICTED: acetylcholine receptor subunit alpha-like 1 isoform X1 [Drosophila kikkawai]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FGEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRFI\n",
|
||||||
|
"AQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFE\n",
|
||||||
|
"LLKMGSENTL\"\"\",\n",
|
||||||
|
" \"\"\">XP_037710630.1 acetylcholine receptor subunit alpha-like 1 [Drosophila subpulchrella]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRFI\n",
|
||||||
|
"AQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFE\n",
|
||||||
|
"LLKMGSDNTL\"\"\",\n",
|
||||||
|
" \"\"\">XP_002032513.1 acetylcholine receptor subunit alpha-like 1 [Drosophila sechellia]\n",
|
||||||
|
"MGSVLFTAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRF\n",
|
||||||
|
"IAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKF\n",
|
||||||
|
"ELLKMGSENTL\"\"\",\n",
|
||||||
|
" \"\"\">XP_017009134.1 PREDICTED: acetylcholine receptor subunit alpha-like 1 [Drosophila takahashii]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRF\n",
|
||||||
|
"IAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKF\n",
|
||||||
|
"ELLKMGSDNTL\"\"\"\n",
|
||||||
|
"]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 4,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-0ef639671dbc2b53",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"assert len(others)>=5\n",
|
||||||
|
"seen = [original_fasta]\n",
|
||||||
|
"for this_fasta in others:\n",
|
||||||
|
" assert type(this_fasta)==str\n",
|
||||||
|
" assert this_fasta not in seen \n",
|
||||||
|
" records = [record for record in Bio.SeqIO.parse(io.StringIO(this_fasta), \"fasta\")]\n",
|
||||||
|
" assert len(records)==1"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-e62c5138daab0413",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"Now, let's join your original fasta data and the data you found with BLAST all together in one big multi-sequence FASTA data string.\n",
|
||||||
|
"\n",
|
||||||
|
"FASTA files can have multiple sequences in one file just by *concatenating* (or \"joining\" or \"adding\") them together."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 5,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-bbfd775731cacd7d",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
">NP_001262917.1 nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAADLSPTFEKPYAREMEKTIEGSRFIAQH\n",
|
||||||
|
"VKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFELLK\n",
|
||||||
|
"MGSENTL\n",
|
||||||
|
">XP_001981981.3 acetylcholine receptor subunit alpha-like 1 [Drosophila erecta]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAAAAADLSPTFEKPYAREMEKTIEG\n",
|
||||||
|
"SRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAK\n",
|
||||||
|
"KKFELLKMGSENTL\n",
|
||||||
|
">XP_017020195.1 PREDICTED: acetylcholine receptor subunit alpha-like 1 isoform X1 [Drosophila kikkawai]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FGEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRFI\n",
|
||||||
|
"AQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFE\n",
|
||||||
|
"LLKMGSENTL\n",
|
||||||
|
">XP_037710630.1 acetylcholine receptor subunit alpha-like 1 [Drosophila subpulchrella]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRFI\n",
|
||||||
|
"AQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFE\n",
|
||||||
|
"LLKMGSDNTL\n",
|
||||||
|
">XP_002032513.1 acetylcholine receptor subunit alpha-like 1 [Drosophila sechellia]\n",
|
||||||
|
"MGSVLFTAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRF\n",
|
||||||
|
"IAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKF\n",
|
||||||
|
"ELLKMGSENTL\n",
|
||||||
|
">XP_017009134.1 PREDICTED: acetylcholine receptor subunit alpha-like 1 [Drosophila takahashii]\n",
|
||||||
|
"MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\n",
|
||||||
|
"MTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\n",
|
||||||
|
"PPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\n",
|
||||||
|
"VPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\n",
|
||||||
|
"SLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\n",
|
||||||
|
"KLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\n",
|
||||||
|
"FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAADLSPTFEKPYAREMEKTIEGSRF\n",
|
||||||
|
"IAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKF\n",
|
||||||
|
"ELLKMGSDNTL\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"all_list = [original_fasta] + others\n",
|
||||||
|
"all_string = '\\n'.join(all_list)\n",
|
||||||
|
"print(all_string)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-5d4a627513248352",
|
||||||
|
"locked": true,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
},
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Task 4: Perform multi-species alignment using [Clustal Omega at the EBI website](https://www.ebi.ac.uk/jdispatcher/msa/clustalo).\n",
|
||||||
|
"\n",
|
||||||
|
"This website runs multiple sequence alignment software. You can directly upload the multiple sequence FASTA file you generated above and let their computer do the alignment.\n",
|
||||||
|
"\n",
|
||||||
|
"Cut and paste the multiple sequence FASTA above into the Clustal Omega entry page at the EBI website. Keep all parameters at their default values (Protein, Output format ClustalW with character counts).\n",
|
||||||
|
"\n",
|
||||||
|
"Enter the multi-sequence alignment here below as a multi-line string called `msa`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 8,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-6ffef2e19f573e15",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"msa = \"\"\"CLUSTAL O(1.2.4) multiple sequence alignment\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
"XP_037710630.1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
"XP_002032513.1 MGSVLFTAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
"XP_017009134.1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
"NP_001262917.1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
"XP_001981981.3 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQ\t60\n",
|
||||||
|
" ******:*****************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
"XP_037710630.1 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
"XP_002032513.1 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
"XP_017009134.1 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
"NP_001262917.1 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
"XP_001981981.3 LIDVNLKNQIMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGN\t120\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
"XP_037710630.1 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
"XP_002032513.1 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
"XP_017009134.1 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
"NP_001262917.1 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
"XP_001981981.3 YEVTIMTKAILHHTGKVVWKPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLR\t180\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
"XP_037710630.1 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
"XP_002032513.1 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
"XP_017009134.1 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
"NP_001262917.1 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
"XP_001981981.3 HLKQTADSDNIEVGIDLQDYYISVEWDIMRVPAVRNEKFYSCCEEPYLDIVFNLTLRRKT\t240\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
"XP_037710630.1 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
"XP_002032513.1 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
"XP_017009134.1 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
"NP_001262917.1 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
"XP_001981981.3 LFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILLSLTVFFLLLAEIIPPTSLTV\t300\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
"XP_037710630.1 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
"XP_002032513.1 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
"XP_017009134.1 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
"NP_001262917.1 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
"XP_001981981.3 PLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILPKLLCIERPKK\t360\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
"XP_037710630.1 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
"XP_002032513.1 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
"XP_017009134.1 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
"NP_001262917.1 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
"XP_001981981.3 EEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\t420\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 FGEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAA----AAAAADLSPTFEKPY\t476\n",
|
||||||
|
"XP_037710630.1 FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAA----AAAAADLSPTFEKPY\t476\n",
|
||||||
|
"XP_002032513.1 FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAA---AAAAADLSPTFEKPY\t477\n",
|
||||||
|
"XP_017009134.1 FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAA---AAAAADLSPTFEKPY\t477\n",
|
||||||
|
"NP_001262917.1 FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAA-------AAAADLSPTFEKPY\t473\n",
|
||||||
|
"XP_001981981.3 FAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAAAAAAAAADLSPTFEKPY\t480\n",
|
||||||
|
" *.************************************* **************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t536\n",
|
||||||
|
"XP_037710630.1 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t536\n",
|
||||||
|
"XP_002032513.1 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t537\n",
|
||||||
|
"XP_017009134.1 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t537\n",
|
||||||
|
"NP_001262917.1 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t533\n",
|
||||||
|
"XP_001981981.3 AREMEKTIEGSRFIAQHVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQ\t540\n",
|
||||||
|
" ************************************************************\n",
|
||||||
|
"\n",
|
||||||
|
"XP_017020195.1 APSLYDQSQPIDILYSKIAKKKFELLKMGSENTL\t570\n",
|
||||||
|
"XP_037710630.1 APSLYDQSQPIDILYSKIAKKKFELLKMGSDNTL\t570\n",
|
||||||
|
"XP_002032513.1 APSLYDQSQPIDILYSKIAKKKFELLKMGSENTL\t571\n",
|
||||||
|
"XP_017009134.1 APSLYDQSQPIDILYSKIAKKKFELLKMGSDNTL\t571\n",
|
||||||
|
"NP_001262917.1 APSLYDQSQPIDILYSKIAKKKFELLKMGSENTL\t567\n",
|
||||||
|
"XP_001981981.3 APSLYDQSQPIDILYSKIAKKKFELLKMGSENTL\t574\n",
|
||||||
|
" ******************************:***\n",
|
||||||
|
"\"\"\""
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 9,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-b39fdf740eda5d89",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is a test of the above, do not change this code.\n",
|
||||||
|
"records = [record for record in Bio.SeqIO.parse(io.StringIO(msa), \"clustal\")]\n",
|
||||||
|
"assert len(records)>=6"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"celltoolbar": "Create Assignment",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
472
exercises/source/exercise-11/2__making_HTTP_get_calls.ipynb
Normal file
|
@ -0,0 +1,472 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Import libraries we need\n",
|
||||||
|
"import requests\n",
|
||||||
|
"import urllib.parse"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 2,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# You must run this cell, but you can ignore its contents.\n",
|
||||||
|
"import hashlib\n",
|
||||||
|
"\n",
|
||||||
|
"def ads_hash(ty):\n",
|
||||||
|
" \"\"\"Return a unique string for input\"\"\"\n",
|
||||||
|
" ty_str = str(ty).encode()\n",
|
||||||
|
" m = hashlib.sha256()\n",
|
||||||
|
" m.update(ty_str)\n",
|
||||||
|
" return m.hexdigest()[:10]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 7,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"SWAPI_BASE='https://swapi.py4e.com/api/'\n",
|
||||||
|
"\n",
|
||||||
|
"def starwars_url(path):\n",
|
||||||
|
" '''return a URL to the Star Wars API using SWAPI_BASE\n",
|
||||||
|
" \n",
|
||||||
|
" For example, to get the URL for person with ID 10,\n",
|
||||||
|
" call:\n",
|
||||||
|
" \n",
|
||||||
|
" starwars_url('people/10/')\n",
|
||||||
|
" '''\n",
|
||||||
|
" return urllib.parse.urljoin(SWAPI_BASE,path)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"We need to be able to create an HTTP request to get a particular person from SWAPI. We are going to be making HTTP GET requests using the URL to request the information we want. So, we need to create a String with the appropriate request. \n",
|
||||||
|
"\n",
|
||||||
|
"### Q1 Define a function which will take an integer as an argument and return a string, which is the URL to get that particular person from the SWAPI. Call your function `get_person_url`.\n",
|
||||||
|
"\n",
|
||||||
|
"For example for person 42, this function should return something like: `\"https://swapi.dev/api/people/42/\"`. However, the URL should be made with the `starwars_url()` function so that it starts with the value `SWAPI_BASE` (and not necessarily `https://swapi.dev/api`). This is useful in case the website changes location or in case we decide to start hosting our own copy of the website at a different URL."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 8,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-496b12c0d3e2489f",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"def get_person_url(person_id):\n",
|
||||||
|
" url = starwars_url('people/%d/'%person_id)\n",
|
||||||
|
" return url"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 9,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-b3a7ebab227918e4",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"person_10_url = get_person_url(10)\n",
|
||||||
|
"assert(type(person_10_url)==str)\n",
|
||||||
|
"assert(person_10_url.startswith(SWAPI_BASE))\n",
|
||||||
|
"assert(person_10_url.endswith('people/10') or person_10_url.endswith('people/10/'))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Now, let's use the Python `requests` library to make an HTTP GET call to this URL. View its documentation at https://docs.python-requests.org/en/latest/.\n",
|
||||||
|
"\n",
|
||||||
|
"### Q2 Using your `get_person_url()` function, create a variable called `person_url` for person 10. Now, assign the result of `requests.get(person_url)` to a variable called `response`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 10,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-65e02d72fd413542",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"person_url = get_person_url(10)\n",
|
||||||
|
"response = requests.get(person_url)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 11,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-cbc105eff3987aa9",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(response.json()['name'])=='6e84377ee7'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Now let's wrap this up in a function which takes a person ID number and returns a dictionary for that person using the `response.json()` method from `requests`.\n",
|
||||||
|
"\n",
|
||||||
|
"### Q3 Make a function called `get_person` which takes an integer as an argument and returns a dict with the result from the SWAPI"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 12,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-11010cba389895bd",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"def get_person(person_id):\n",
|
||||||
|
" url = get_person_url(person_id)\n",
|
||||||
|
" response = requests.get(url)\n",
|
||||||
|
" return response.json()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 13,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-9c11e54ba69189a0",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(get_person(1)['name'])=='9d00804504'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## HTTP POST requests\n",
|
||||||
|
"\n",
|
||||||
|
"Up to now, we have been using HTTP GET requests. These are what your browser does when you go to a webpage and are good for getting information.\n",
|
||||||
|
"\n",
|
||||||
|
"Sometimes, however, we want to upload more complicated data to another program. This is often done with the HTTP POST request.\n",
|
||||||
|
"\n",
|
||||||
|
"Here we are going to POST data to a server which will add a value to our input."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 14,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"ADDER_URL = 'http://http-demo-server.strawlab.org/'\n",
|
||||||
|
"response = requests.post(ADDER_URL+'add_to_value', json={'value':100})"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 15,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"200"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 15,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"# Any status code other than 200 is an error\n",
|
||||||
|
"response.status_code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 16,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"'{\"value\":142}'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 16,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"response.text"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 17,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"{'value': 142}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 17,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"response.json()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### Q4 What is the value added the the input by the HTTP server? Put your answer in the variable `added`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 18,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-6f8a3c2b5f23135e",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"added = 42"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 19,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-60ba73a7486b8988",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(added)=='73475cb40a'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### Q5 There is another path on our server called `mystery`. It works similarly to `add_to_value`. What is the JSON `value` returned by this HTTP endpoint when called with an input value of 100? Put your answer in the variable `mystery100`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 20,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-51d14040f23943ad",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"mystery100 = requests.post(ADDER_URL+'mystery', json={'value':100}).json()['value']"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 21,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-3392fa03f78e9c65",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(mystery100)=='26d228663f'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### Q6 Play around with this `mystery` until you think you understand what it is doing. Now make a function called `myfunc` which takes a single integer argument and returns an integer which should do the same thing as the mystery HTTP endpoint."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 22,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-cc8f1c957dc44cd2",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"def myfunc(value):\n",
|
||||||
|
" return value*4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 23,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-b48cf735571f569b",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(type(myfunc))=='ac75372cfc' \n",
|
||||||
|
"assert ads_hash(myfunc(3))=='6b51d431df'\n",
|
||||||
|
"assert ads_hash(myfunc(5))=='f5ca38f748'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# What have we learned here?\n",
|
||||||
|
"\n",
|
||||||
|
"HTTP is the \"language\" (protocol, to be technically correct) that your web browser uses to get webpages and images on the internet. More than that, it is also a useful language for computer programs to talk to each other on the internet.\n",
|
||||||
|
"\n",
|
||||||
|
"(HTTPS is just a secure version of HTTP. This means it is encrypted and there is a cryptographic \"chain of trust\" to the owner of the domain name.)\n",
|
||||||
|
"\n",
|
||||||
|
"GET requests typically just get a certain resource.\n",
|
||||||
|
"\n",
|
||||||
|
"POST requests often send more data to the server. The server then does something with this data.\n",
|
||||||
|
"\n",
|
||||||
|
"There are other HTTP request types, but GET and POST are the dominant ones.\n",
|
||||||
|
"\n",
|
||||||
|
"There are zillions of data sources on the internet that you can access with HTTP."
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"celltoolbar": "Create Assignment",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
984
exercises/source/exercise-11/3__bioinformatics_with_HTTP.ipynb
Normal file
|
@ -0,0 +1,984 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Import biopython\n",
|
||||||
|
"import Bio\n",
|
||||||
|
"\n",
|
||||||
|
"import requests"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 2,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# You must run this cell, but you can ignore its contents.\n",
|
||||||
|
"\n",
|
||||||
|
"import hashlib\n",
|
||||||
|
"\n",
|
||||||
|
"def ads_hash(ty):\n",
|
||||||
|
" \"\"\"Return a unique string for input\"\"\"\n",
|
||||||
|
" ty_str = str(ty).encode()\n",
|
||||||
|
" m = hashlib.sha256()\n",
|
||||||
|
" m.update(ty_str)\n",
|
||||||
|
" return m.hexdigest()[:10]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Bioinformatics with HTTP\n",
|
||||||
|
"\n",
|
||||||
|
"Not only can we use the Star Wars API with HTTP, we can also access the NCBI's databases over HTTP. Here is [more information from the NCBI](https://www.ncbi.nlm.nih.gov/books/NBK25499/). Note that in this exercise, we will be doing low volume queries without using a specialized software library. Some libraries and other software is available to automatically do this for here. For example, below we use the `NCBIWWW` module from biopython. Here we do it \"the hard way\" at a low level.\n",
|
||||||
|
"\n",
|
||||||
|
"If you start using the NCBI web resources extensively, please read the NCBI's documentation about [providing them with an email address to contact you](https://www.ncbi.nlm.nih.gov/books/NBK25497/).\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 3,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def get_protein_fasta(accession):\n",
|
||||||
|
" url = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&id=%s&rettype=fasta&retmode=text\"%(accession,)\n",
|
||||||
|
" return requests.get(url).text"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 4,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"'>NP_524481.2 nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster]\\nMGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\\nMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\\nPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\\nVPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\\nSLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\\nKLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\\nFAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAADLSPTFEKPYAREMEKTIEGSRFIAQH\\nVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFELLK\\nMGSENTL\\n\\n'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 4,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"da1 = get_protein_fasta('NP_524481.2')\n",
|
||||||
|
"da1"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Great, so we can get FASTA files directly from the NBCI using the accession.\n",
|
||||||
|
"\n",
|
||||||
|
"### Q1 Get the FASTA for accession `NP_733001.1`. Put the result in the variable `da2`, which should be a string."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 5,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": false,
|
||||||
|
"grade_id": "cell-570ab47725befb18",
|
||||||
|
"locked": false,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": true,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Write your answer here\n",
|
||||||
|
"da2 = get_protein_fasta('NP_733001.1')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 6,
|
||||||
|
"metadata": {
|
||||||
|
"nbgrader": {
|
||||||
|
"grade": true,
|
||||||
|
"grade_id": "cell-5c1c1943259aebbb",
|
||||||
|
"locked": true,
|
||||||
|
"points": 1,
|
||||||
|
"schema_version": 3,
|
||||||
|
"solution": false,
|
||||||
|
"task": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This checks that the above worked\n",
|
||||||
|
"assert ads_hash(da2)=='16538bd802'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Using the biopython library for bioinformatics, including NCBI queries"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 7,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import Bio\n",
|
||||||
|
"from Bio.Blast import NCBIWWW\n",
|
||||||
|
"from Bio.Blast import NCBIXML\n",
|
||||||
|
"from Bio import SeqIO\n",
|
||||||
|
"from io import StringIO\n",
|
||||||
|
"import os"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"We can work with FASTA sequences using the biopython library. It expects multiple sequences in a given FASTA file, so we loop over them:\n",
|
||||||
|
"\n",
|
||||||
|
"Each record here is an instance of the [Seq class](https://biopython.org/wiki/Seq).\n",
|
||||||
|
"\n",
|
||||||
|
"Let's copy the sequence to a raw python string called `da2_seq`:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 8,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"ID: NP_733001.1\n",
|
||||||
|
"Name: NP_733001.1\n",
|
||||||
|
"Description: NP_733001.1 nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster]\n",
|
||||||
|
"Number of features: 0\n",
|
||||||
|
"Seq('MAPGCCTTRPRPIALLAHIWRHCKPLCLLLVLLLLCETVQANPDAKRLYDDLLS...KKN')\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"da2_seq = None\n",
|
||||||
|
"for record in SeqIO.parse(StringIO(da2), \"fasta\"):\n",
|
||||||
|
" print(record)\n",
|
||||||
|
" assert(da2_seq is None)\n",
|
||||||
|
" da2_seq = str(record.seq)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 9,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"'MAPGCCTTRPRPIALLAHIWRHCKPLCLLLVLLLLCETVQANPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLNLKDQILTTNVWLEHEWQDHKFKWDPSEYGGVTELYVPSEHIWLPDIVLYNNADGEYVVTTMTKAILHYTGKVVWTPPAIFKSSCEIDVRYFPFDQQTCFMKFGSWTYDGDQIDLKHISQKNDKDNKVEIGIDLREYYPSVEWDILGVPAERHEKYYPCCAEPYPDIFFNITLRRKTLFYTVNLIIPCVGISYLSVLVFYLPADSGEKIALCISILLSQTMFFLLISEIIPSTSLALPLLGKYLLFTMLLVGLSVVITIIILNIHYRKPSTHKMRPWIRSFFIKRLPKLLLMRVPKDLLRDLAANKINYGLKFSKTKFGQALMDEMQMNSGGSSPDSLRRMQGRVGAGGCNGMHVTTATNRFSGLVGALGGGLSTLSGYNGLPSVLSGLDDSLSDVAARKKYPFELEKAIHNVMFIQHHMQRQDEFNAEDQDWGFVAMVMDRLFLWLFMIASLVGTFVILGEAPSLYDDTKAIDVQLSDVAKQIYNLTEKKN'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 9,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"da2_seq"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"In addition to \"raw\" HTTP requests using the `requests` library, biopython also is able to call the NCBI for you. It is using HTTP to perform the call, but this is hidden from you. Below, we do a BLAST search based on the sequence we just downloaded."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"We can limit our search to just a few organisms using the NCBI taxon ID. The easiest way to find these it to start typing in the BLAST web search entry page and copy the taxon ID from there.\n",
|
||||||
|
"\n",
|
||||||
|
"Here are a few taxon IDs for some insects and then some code to limit our NCBI query just to these taxa."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 10,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"'txid30195[ORGN] OR txid7460[ORGN] OR txid7004[ORGN] OR txid7227[ORGN] OR txid7070[ORGN]'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 10,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"# Bombus terrestris 30195\n",
|
||||||
|
"# Apis mellifera 7460\n",
|
||||||
|
"# Locusta migratoria 7004\n",
|
||||||
|
"# Drosophila melanogaster 7227\n",
|
||||||
|
"# Tribolium castaneum 7070\n",
|
||||||
|
"taxids = (30195, 7460, 7004, 7227, 7070)\n",
|
||||||
|
"taxid_query = ' OR '.join(['txid%d[ORGN]'%taxid for taxid in taxids])\n",
|
||||||
|
"taxid_query"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Now with our query limited to these specific groups, we are going to run a BLAST search. As with the web browser interface, this can take some time, so the code below is written to only run the web search when the output file is not present. Therefore, once you run the web search the first time, it will not run again unless you delete the file.\n",
|
||||||
|
"\n",
|
||||||
|
"Futhermore, as [mentioned in the bio python tutorial](http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc92), we need to be careful with our result handle when we get it because it can be read only once. So, here we the results of our search to a local file. Later, we can read this as often as we want.\n",
|
||||||
|
"\n",
|
||||||
|
"**This may take some time as we are running a full BLAST search on the NCBI servers.**"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 11,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"not overwriting file da2_blast.xml\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"fname = \"da2_blast.xml\"\n",
|
||||||
|
"if not os.path.exists(fname):\n",
|
||||||
|
" result_handle = NCBIWWW.qblast(\"blastp\", \"nr\", da2_seq, entrez_query=taxid_query)\n",
|
||||||
|
" with open(fname, \"w\") as out_handle:\n",
|
||||||
|
" out_handle.write(result_handle.read())\n",
|
||||||
|
"else:\n",
|
||||||
|
" print(\"not overwriting file %s\"%fname)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 12,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"ref|NP_524482.1| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >ref|NP_733001.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >ref|XP_002032516.1| acetylcholine receptor subunit alpha-like 2 [Drosophila sechellia] >ref|XP_002104730.1| acetylcholine receptor subunit alpha-like 2 [Drosophila simulans] >ref|XP_033165329.1| acetylcholine receptor subunit alpha-like 2 [Drosophila mauritiana] >sp|P17644.1| RecName: Full=Acetylcholine receptor subunit alpha-like 2; AltName: Full=Nicotinic acetylcholine receptor alpha 2; Flags: Precursor [Drosophila melanogaster] >gb|ACL85307.1| nAcRalpha-96Ab-PA, partial [synthetic construct] >gb|AAF56302.2| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >gb|AAF56303.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >gb|AAL13675.1| GH22843p [Drosophila melanogaster] >gb|ACL90211.1| nAcRalpha-96Ab-PA [synthetic construct]\n",
|
||||||
|
" Length = 576\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001011625.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera] >ref|XP_006561565.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >ref|XP_026298380.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >gb|KAG6801311.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera caucasica] >gb|KAG9431277.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera carnica] >gb|AAS48080.1| neuronal nicotinic acetylcholine receptor Apisa2 subunit [Apis mellifera] >gb|AJE70260.1| nicotinic acetylcholine receptor alpha2 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003397559.1| acetylcholine receptor subunit alpha-L1 isoform X2 [Bombus terrestris]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103423.1| nicotinic acetylcholine receptor alpha 2 subunit precursor [Tribolium castaneum] >gb|ABS86903.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum] >gb|EFA10793.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012166790.1| acetylcholine receptor subunit alpha-L1 isoform X1 [Bombus terrestris]\n",
|
||||||
|
" Length = 544\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACM09847.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09848.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09849.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACM09846.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACL00341.1| nicotinic acetylcholine receptor a2 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_008198426.1| PREDICTED: nicotinic acetylcholine receptor alpha 2 subunit isoform X1 [Tribolium castaneum]\n",
|
||||||
|
" Length = 558\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11209.1| nicotinic acetylcholine receptor alpha2 [Locusta migratoria]\n",
|
||||||
|
" Length = 551\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_015838943.1| PREDICTED: nicotinic acetylcholine receptor alpha 2 subunit isoform X2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 461\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001262917.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster] >ref|NP_524481.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >ref|XP_016952288.1| acetylcholine receptor subunit alpha-like 1 [Drosophila biarmipes] >sp|P09478.2| RecName: Full=Acetylcholine receptor subunit alpha-like 1; AltName: Full=Nicotinic acetylcholine receptor alpha 1; Flags: Precursor [Drosophila melanogaster] >gb|AAF56301.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >gb|AGB96297.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001262916.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster] >gb|AGB96296.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster]\n",
|
||||||
|
" Length = 597\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103245.1| nicotinic acetylcholine receptor alpha1 subunit precursor [Tribolium castaneum] >gb|ABS86902.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum] >gb|EEZ99265.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum]\n",
|
||||||
|
" Length = 545\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA30172.1| mature acetylcholine receptor alpha-like subunit [Drosophila melanogaster]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11220.1| nicotinic acetylcholine receptor alpha8 variant C [Locusta migratoria]\n",
|
||||||
|
" Length = 574\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11221.1| nicotinic acetylcholine receptor alpha8 variant D [Locusta migratoria]\n",
|
||||||
|
" Length = 580\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11218.1| nicotinic acetylcholine receptor alpha8 variant A [Locusta migratoria]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11219.1| nicotinic acetylcholine receptor alpha8 variant B [Locusta migratoria]\n",
|
||||||
|
" Length = 546\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA04053.1| nicotinic acetylcholine receptor, alpha2 subunit, partial [Locusta migratoria]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001091690.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AAY87890.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AJE70259.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 601\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_026298411.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera] >gb|KAG6801309.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera caucasica] >gb|KAG9431275.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera carnica]\n",
|
||||||
|
" Length = 627\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003397561.2| acetylcholine receptor subunit alpha-like 1 [Bombus terrestris]\n",
|
||||||
|
" Length = 615\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012163744.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus terrestris] >ref|XP_050590207.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus affinis]\n",
|
||||||
|
" Length = 535\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001011575.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera] >gb|AAM51823.1| neuronal nicotinic acetylcholine receptor alpha-3 [Apis mellifera] >gb|AJE70266.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 537\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012163745.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus terrestris] >ref|XP_050590208.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus affinis]\n",
|
||||||
|
" Length = 531\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KAG6799677.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera caucasica] >gb|KAG9434134.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera carnica]\n",
|
||||||
|
" Length = 534\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001107770.1| nicotinic acetylcholine receptor alpha 3 subunit precursor [Tribolium castaneum] >ref|XP_008200302.1| PREDICTED: nicotinic acetylcholine receptor alpha 3 subunit isoform X1 [Tribolium castaneum] >gb|ABS86904.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum] >gb|ABV72695.1| nicotinic acetylcholine receptor alpha 3 subunit [Tribolium castaneum] >gb|ACM09844.1| nicotinic acetylcholine receptor subunit a3 [Tribolium castaneum] >gb|EEZ97689.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum]\n",
|
||||||
|
" Length = 551\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_026296304.1| nicotinic acetylcholine receptor alpha8 subunit isoform X1 [Apis mellifera]\n",
|
||||||
|
" Length = 533\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103419.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 2 precursor [Tribolium castaneum] >gb|ABS86912.1| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]\n",
|
||||||
|
" Length = 508\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACP31314.1| nicotinic acetylcholine receptor a11 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 510\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001107771.1| nicotinic acetylcholine receptor alpha 11 subunit precursor [Tribolium castaneum] >gb|ABS86915.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]\n",
|
||||||
|
" Length = 510\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001155998.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 1 precursor [Tribolium castaneum] >gb|ACP31302.1| nicotinic acetylcholine receptor a8 subunit splice variant [Tribolium castaneum] >gb|ACP31304.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31305.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31306.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_016767553.1| nicotinic acetylcholine receptor alpha3 subunit isoform X2 [Apis mellifera]\n",
|
||||||
|
" Length = 553\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KYB29425.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]\n",
|
||||||
|
" Length = 498\n",
|
||||||
|
"\n",
|
||||||
|
"gb|EEZ99341.2| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]\n",
|
||||||
|
" Length = 499\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KYB29426.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]\n",
|
||||||
|
" Length = 491\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003399573.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris]\n",
|
||||||
|
" Length = 554\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001073029.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera] >ref|XP_016767550.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767551.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767552.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >gb|KAG6799381.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera caucasica] >gb|KAG9433524.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera carnica] >gb|AAY87891.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 566\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACP31303.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AJE70261.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA04054.1| nicotinic acetylcholine receptor, alpha3 subunit, partial [Locusta migratoria]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012170034.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170035.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170036.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048267067.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_524483.1| nicotinic acetylcholine receptor beta2, isoform A [Drosophila melanogaster] >ref|XP_002032518.2| acetylcholine receptor subunit beta-like 2 [Drosophila sechellia] >ref|XP_002104732.1| acetylcholine receptor subunit beta-like 2 [Drosophila simulans] >ref|XP_033161984.1| acetylcholine receptor subunit beta-like 2 [Drosophila mauritiana] >sp|P25162.3| RecName: Full=Acetylcholine receptor subunit beta-like 2; AltName: Full=Nicotinic acetylcholine receptor beta 2; Flags: Precursor [Drosophila melanogaster] >gb|AAF56304.1| nicotinic acetylcholine receptor beta2, isoform A [Drosophila melanogaster] >gb|EDX14235.1| GD18288 [Drosophila simulans] >gb|KMZ05571.1| uncharacterized protein Dsimw501_GD18288 [Drosophila simulans]\n",
|
||||||
|
" Length = 519\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033202999.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vancouverensis nearcticus] >ref|XP_033365856.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vosnesenskii] >ref|XP_043592353.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592354.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592355.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592356.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_048265520.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus terrestris] >ref|XP_050476339.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus huntii] >ref|XP_050600937.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus affinis] >ref|XP_060819514.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819518.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum]\n",
|
||||||
|
" Length = 572\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033365857.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus vosnesenskii] >ref|XP_048265521.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus terrestris] >ref|XP_050476340.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus huntii] >ref|XP_050600938.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus affinis] >ref|XP_060819515.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus pascuorum]\n",
|
||||||
|
" Length = 572\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033202993.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202997.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202998.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033365852.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365853.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365854.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_048265515.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265519.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_050476333.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476335.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476336.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476337.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476338.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050600932.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600935.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600936.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis]\n",
|
||||||
|
" Length = 583\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033365855.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus vosnesenskii] >ref|XP_048265516.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris] >ref|XP_050476334.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus huntii] >ref|XP_050600934.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus affinis]\n",
|
||||||
|
" Length = 583\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA39211.1| second beta subunit of nicotinic acetylcholine receptor, partial [Drosophila melanogaster] >prf||1701297A nicotinic acetylcholine receptor beta [Drosophila melanogaster]\n",
|
||||||
|
" Length = 500\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001091691.1| nicotinic acetylcholine receptor alpha4 subunit precursor [Apis mellifera] >ref|XP_006562617.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_006562618.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768429.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768430.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >gb|AAY87892.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 569\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"blast_record = NCBIXML.read(open(fname))\n",
|
||||||
|
"for alignment in blast_record.alignments:\n",
|
||||||
|
" print(alignment)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Let's do another blast search for the first protein we had. Again, this can take a long period of time to run on the NCBI servers."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 13,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"not overwriting file da1_blast.xml\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"da1_seq = None\n",
|
||||||
|
"for record in SeqIO.parse(StringIO(da1), \"fasta\"):\n",
|
||||||
|
" da1_seq = str(record.seq)\n",
|
||||||
|
"\n",
|
||||||
|
"fname = \"da1_blast.xml\"\n",
|
||||||
|
"if not os.path.exists(fname):\n",
|
||||||
|
" result_handle = NCBIWWW.qblast(\"blastp\", \"nr\", da1_seq, entrez_query=taxid_query)\n",
|
||||||
|
" with open(fname, \"w\") as out_handle:\n",
|
||||||
|
" out_handle.write(result_handle.read())\n",
|
||||||
|
"else:\n",
|
||||||
|
" print(\"not overwriting file %s\"%fname)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"In the results, each alignment returns a sequence of HSPS (\"High Scoring Pairs\").\n",
|
||||||
|
"\n",
|
||||||
|
"https://www.ncbi.nlm.nih.gov/books/NBK62051/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 14,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"ref|NP_001262917.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster] >ref|NP_524481.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >ref|XP_016952288.1| acetylcholine receptor subunit alpha-like 1 [Drosophila biarmipes] >sp|P09478.2| RecName: Full=Acetylcholine receptor subunit alpha-like 1; AltName: Full=Nicotinic acetylcholine receptor alpha 1; Flags: Precursor [Drosophila melanogaster] >gb|AAF56301.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >gb|AGB96297.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 3024 (1169 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
" MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL\n",
|
||||||
|
"Sbjct: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001262916.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster] >gb|AGB96296.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster]\n",
|
||||||
|
" Length = 597\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 3020 (1167 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
" MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL\n",
|
||||||
|
"Sbjct: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA30172.1| mature acetylcholine receptor alpha-like subunit [Drosophila melanogaster]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 3014 (1165 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
" MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL\n",
|
||||||
|
"Sbjct: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103245.1| nicotinic acetylcholine receptor alpha1 subunit precursor [Tribolium castaneum] >gb|ABS86902.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum] >gb|EEZ99265.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum]\n",
|
||||||
|
" Length = 545\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2131 (825 bits), expectation 0.0e+00, alignment length 546\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...GSE 564\n",
|
||||||
|
" N DAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGL+LSQLIDVN... E\n",
|
||||||
|
"Sbjct: 20 GNQDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLKLSQLIDVN...VPE 543\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11207.1| nicotinic acetylcholine receptor alpha1 variant A [Locusta migratoria]\n",
|
||||||
|
" Length = 570\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2127 (823 bits), expectation 0.0e+00, alignment length 585\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...GSE 564\n",
|
||||||
|
" MGSVL A V A+ +G ANP+AKRLYDDLLSNYNRLIRPVGN...G E\n",
|
||||||
|
"Sbjct: 1 MGSVLLALVLAAMG-GSGTQANPEAKRLYDDLLSNYNRLIRPVGN...GPE 568\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003397561.2| acetylcholine receptor subunit alpha-like 1 [Bombus terrestris]\n",
|
||||||
|
" Length = 615\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2122 (822 bits), expectation 0.0e+00, alignment length 609\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFAT--GGLANPDAKRLYDDLLSNYNRLIRPV...GSE 564\n",
|
||||||
|
" +G +L A I+ A G ANP+AKRLYDDLLSNYNRLIRPV...G E\n",
|
||||||
|
"Sbjct: 21 LGGLLAMATAISCLVAPFPGASANPEAKRLYDDLLSNYNRLIRPV...GPE 613\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001091690.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AAY87890.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AJE70259.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 601\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2109 (816 bits), expectation 0.0e+00, alignment length 602\n",
|
||||||
|
"Query: 18 GGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...GSE 564\n",
|
||||||
|
" G AN +AKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...G E\n",
|
||||||
|
"Sbjct: 14 GASANSEAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...GPE 599\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_026298411.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera] >gb|KAG6801309.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera caucasica] >gb|KAG9431275.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera carnica]\n",
|
||||||
|
" Length = 627\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2108 (816 bits), expectation 0.0e+00, alignment length 621\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFAT--GGLANPDAKRLYDDLLSNYNRLIRPV...GSE 564\n",
|
||||||
|
" +G +L A I+ A G AN +AKRLYDDLLSNYNRLIRPV...G E\n",
|
||||||
|
"Sbjct: 21 LGGLLAMATAISCLVAPFPGASANSEAKRLYDDLLSNYNRLIRPV...GPE 625\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA04054.1| nicotinic acetylcholine receptor, alpha3 subunit, partial [Locusta migratoria]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2019 (782 bits), expectation 0.0e+00, alignment length 555\n",
|
||||||
|
"Query: 33 LSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQIMTTNVWV...GSE 564\n",
|
||||||
|
" LSNYNRLIRPVGNNSDRLT KMGLRLSQLIDVNLKNQIMTTNVWV...G E\n",
|
||||||
|
"Sbjct: 1 LSNYNRLIRPVGNNSDRLTSKMGLRLSQLIDVNLKNQIMTTNVWV...GPE 538\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11208.1| nicotinic acetylcholine receptor alpha1 variant B [Locusta migratoria]\n",
|
||||||
|
" Length = 555\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 2017 (781 bits), expectation 0.0e+00, alignment length 586\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...SEN 565\n",
|
||||||
|
" MGSVL A V A+ +G ANP+AKRLYDDLLSNYNRLIRPVGN... E \n",
|
||||||
|
"Sbjct: 1 MGSVLLALVLAAMG-GSGTQANPEAKRLYDDLLSNYNRLIRPVGN...PEE 554\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11220.1| nicotinic acetylcholine receptor alpha8 variant C [Locusta migratoria]\n",
|
||||||
|
" Length = 574\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1706 (661 bits), expectation 0.0e+00, alignment length 556\n",
|
||||||
|
"Query: 15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554\n",
|
||||||
|
" T ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +\n",
|
||||||
|
"Sbjct: 19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 557\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11221.1| nicotinic acetylcholine receptor alpha8 variant D [Locusta migratoria]\n",
|
||||||
|
" Length = 580\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1705 (661 bits), expectation 0.0e+00, alignment length 547\n",
|
||||||
|
"Query: 15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554\n",
|
||||||
|
" T ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +\n",
|
||||||
|
"Sbjct: 19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 563\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11219.1| nicotinic acetylcholine receptor alpha8 variant B [Locusta migratoria]\n",
|
||||||
|
" Length = 546\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1666 (646 bits), expectation 0.0e+00, alignment length 540\n",
|
||||||
|
"Query: 15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554\n",
|
||||||
|
" T ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +\n",
|
||||||
|
"Sbjct: 19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 529\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11218.1| nicotinic acetylcholine receptor alpha8 variant A [Locusta migratoria]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1665 (645 bits), expectation 0.0e+00, alignment length 540\n",
|
||||||
|
"Query: 15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554\n",
|
||||||
|
" T ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +\n",
|
||||||
|
"Sbjct: 19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 523\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAA04053.1| nicotinic acetylcholine receptor, alpha2 subunit, partial [Locusta migratoria]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1658 (643 bits), expectation 0.0e+00, alignment length 533\n",
|
||||||
|
"Query: 22 NPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNL...AKK 554\n",
|
||||||
|
" NPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LSQLI+VNL...+ +\n",
|
||||||
|
"Sbjct: 1 NPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLSQLIEVNL...SLR 498\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012170034.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170035.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170036.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048267067.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1624 (630 bits), expectation 0.0e+00, alignment length 577\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552\n",
|
||||||
|
" M L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N...+IA\n",
|
||||||
|
"Sbjct: 1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 555\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003399573.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris]\n",
|
||||||
|
" Length = 554\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1620 (628 bits), expectation 0.0e+00, alignment length 569\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552\n",
|
||||||
|
" M L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N...+IA\n",
|
||||||
|
"Sbjct: 1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 542\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AJE70261.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 567\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1616 (627 bits), expectation 0.0e+00, alignment length 577\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552\n",
|
||||||
|
" M L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N...+IA\n",
|
||||||
|
"Sbjct: 1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 555\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001073029.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera] >ref|XP_016767550.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767551.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767552.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >gb|KAG6799381.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera caucasica] >gb|KAG9433524.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera carnica] >gb|AAY87891.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 566\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1613 (625 bits), expectation 0.0e+00, alignment length 575\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552\n",
|
||||||
|
" M L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N...+IA\n",
|
||||||
|
"Sbjct: 1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 554\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001107770.1| nicotinic acetylcholine receptor alpha 3 subunit precursor [Tribolium castaneum] >ref|XP_008200302.1| PREDICTED: nicotinic acetylcholine receptor alpha 3 subunit isoform X1 [Tribolium castaneum] >gb|ABS86904.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum] >gb|ABV72695.1| nicotinic acetylcholine receptor alpha 3 subunit [Tribolium castaneum] >gb|ACM09844.1| nicotinic acetylcholine receptor subunit a3 [Tribolium castaneum] >gb|EEZ97689.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum]\n",
|
||||||
|
" Length = 551\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1612 (625 bits), expectation 0.0e+00, alignment length 555\n",
|
||||||
|
"Query: 5 LFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDR...KIA 552\n",
|
||||||
|
" L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N SD ...+IA\n",
|
||||||
|
"Sbjct: 4 LVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVNVSDA...EIA 539\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KAG6799677.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera caucasica] >gb|KAG9434134.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera carnica]\n",
|
||||||
|
" Length = 534\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1610 (624 bits), expectation 0.0e+00, alignment length 562\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556\n",
|
||||||
|
" M + +F LH ++ GL ANPD KRLYDDLLSNYNRL...+ +\n",
|
||||||
|
"Sbjct: 1 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 523\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_016767553.1| nicotinic acetylcholine receptor alpha3 subunit isoform X2 [Apis mellifera]\n",
|
||||||
|
" Length = 553\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1610 (624 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552\n",
|
||||||
|
" M L ++I L +G NPDAKRLYDDLLSNYN+L+RPV N...+IA\n",
|
||||||
|
"Sbjct: 1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 541\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001011575.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera] >gb|AAM51823.1| neuronal nicotinic acetylcholine receptor alpha-3 [Apis mellifera] >gb|AJE70266.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 537\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1608 (624 bits), expectation 0.0e+00, alignment length 562\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556\n",
|
||||||
|
" M + +F LH ++ GL ANPD KRLYDDLLSNYNRL...+ +\n",
|
||||||
|
"Sbjct: 4 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 526\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012163744.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus terrestris] >ref|XP_050590207.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus affinis]\n",
|
||||||
|
" Length = 535\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1607 (623 bits), expectation 0.0e+00, alignment length 562\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGL------ANPDAKRLYDDLLSNYNRL...KKF 556\n",
|
||||||
|
" M + F+ +F LH G + ANPD KRLYDDLLSNYNRL...+ +\n",
|
||||||
|
"Sbjct: 1 MRILTFSILFNVLHIIFGAIGLKIYEANPDTKRLYDDLLSNYNRL...RNY 523\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_026296304.1| nicotinic acetylcholine receptor alpha8 subunit isoform X1 [Apis mellifera]\n",
|
||||||
|
" Length = 533\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1602 (621 bits), expectation 0.0e+00, alignment length 562\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556\n",
|
||||||
|
" M + +F LH ++ GL ANPD KRLYDDLLSNYNRL...+ +\n",
|
||||||
|
"Sbjct: 4 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 522\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033202999.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vancouverensis nearcticus] >ref|XP_033365856.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vosnesenskii] >ref|XP_043592353.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592354.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592355.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592356.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_048265520.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus terrestris] >ref|XP_050476339.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus huntii] >ref|XP_050600937.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus affinis] >ref|XP_060819514.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819518.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum]\n",
|
||||||
|
" Length = 572\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1598 (620 bits), expectation 0.0e+00, alignment length 556\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A\n",
|
||||||
|
"Sbjct: 18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 562\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103419.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 2 precursor [Tribolium castaneum] >gb|ABS86912.1| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]\n",
|
||||||
|
" Length = 508\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1597 (619 bits), expectation 0.0e+00, alignment length 529\n",
|
||||||
|
"Query: 19 GLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLID...PID 545\n",
|
||||||
|
" +ANPDAKRLYDDLLSNYNRLIRPV N++ LTV +GL++SQLI+...P+D\n",
|
||||||
|
"Sbjct: 20 NIANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIE...PVD 502\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012163745.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus terrestris] >ref|XP_050590208.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus affinis]\n",
|
||||||
|
" Length = 531\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1597 (619 bits), expectation 0.0e+00, alignment length 562\n",
|
||||||
|
"Query: 1 MGSVLFAAVFIALHFATGGL------ANPDAKRLYDDLLSNYNRL...KKF 556\n",
|
||||||
|
" M + F+ +F LH G + ANPD KRLYDDLLSNYNRL...+ +\n",
|
||||||
|
"Sbjct: 1 MRILTFSILFNVLHIIFGAIGLKIYEANPDTKRLYDDLLSNYNRL...RNY 519\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KYB29426.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]\n",
|
||||||
|
" Length = 491\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1595 (619 bits), expectation 0.0e+00, alignment length 529\n",
|
||||||
|
"Query: 19 GLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLID...PID 545\n",
|
||||||
|
" +ANPDAKRLYDDLLSNYNRLIRPV N++ LTV +GL++SQLI+...P+D\n",
|
||||||
|
"Sbjct: 3 NIANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIE...PVD 485\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001155998.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 1 precursor [Tribolium castaneum] >gb|ACP31302.1| nicotinic acetylcholine receptor a8 subunit splice variant [Tribolium castaneum] >gb|ACP31304.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31305.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31306.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1594 (618 bits), expectation 0.0e+00, alignment length 527\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545\n",
|
||||||
|
" ANPDAKRLYDDLLSNYNRLIRPV N++ LTV +GL++SQLI++N...P+D\n",
|
||||||
|
"Sbjct: 29 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 509\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KYB29425.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]\n",
|
||||||
|
" Length = 498\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1592 (617 bits), expectation 0.0e+00, alignment length 527\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545\n",
|
||||||
|
" ANPDAKRLYDDLLSNYNRLIRPV N++ LTV +GL++SQLI++N...P+D\n",
|
||||||
|
"Sbjct: 12 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 492\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_524482.1| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >ref|NP_733001.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >ref|XP_002032516.1| acetylcholine receptor subunit alpha-like 2 [Drosophila sechellia] >ref|XP_002104730.1| acetylcholine receptor subunit alpha-like 2 [Drosophila simulans] >ref|XP_033165329.1| acetylcholine receptor subunit alpha-like 2 [Drosophila mauritiana] >sp|P17644.1| RecName: Full=Acetylcholine receptor subunit alpha-like 2; AltName: Full=Nicotinic acetylcholine receptor alpha 2; Flags: Precursor [Drosophila melanogaster] >gb|ACL85307.1| nAcRalpha-96Ab-PA, partial [synthetic construct] >gb|AAF56302.2| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >gb|AAF56303.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >gb|AAL13675.1| GH22843p [Drosophila melanogaster] >gb|ACL90211.1| nAcRalpha-96Ab-PA [synthetic construct]\n",
|
||||||
|
" Length = 576\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1591 (617 bits), expectation 0.0e+00, alignment length 547\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...FEL 558\n",
|
||||||
|
" ANPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...+ L\n",
|
||||||
|
"Sbjct: 41 ANPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLN...YNL 571\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033202993.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202997.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202998.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033365852.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365853.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365854.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_048265515.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265519.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_050476333.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476335.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476336.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476337.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476338.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050600932.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600935.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600936.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis]\n",
|
||||||
|
" Length = 583\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1588 (616 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A\n",
|
||||||
|
"Sbjct: 18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 573\n",
|
||||||
|
"\n",
|
||||||
|
"gb|KYB29325.1| nicotinic acetylcholine receptor subunit alpha4 [Tribolium castaneum]\n",
|
||||||
|
" Length = 598\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1586 (615 bits), expectation 0.0e+00, alignment length 559\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE\n",
|
||||||
|
"Sbjct: 59 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 584\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001091691.1| nicotinic acetylcholine receptor alpha4 subunit precursor [Apis mellifera] >ref|XP_006562617.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_006562618.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768429.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768430.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >gb|AAY87892.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 569\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1586 (615 bits), expectation 0.0e+00, alignment length 550\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...PID 545\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...PID\n",
|
||||||
|
"Sbjct: 17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...PID 552\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103246.1| nicotinic acetylcholine receptor alpha4 subunit isoform 1 precursor [Tribolium castaneum] >ref|XP_044259329.1| acetylcholine receptor subunit alpha-like isoform X3 [Tribolium madens] >gb|ABS86905.1| nicotinic acetylcholine receptor subunit alpha4 variant [Tribolium castaneum] >gb|ACM09852.1| nicotinic acetylcholine receptor subunit a4 [Tribolium castaneum]\n",
|
||||||
|
" Length = 556\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1586 (615 bits), expectation 0.0e+00, alignment length 559\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE\n",
|
||||||
|
"Sbjct: 17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 542\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_008201498.1| PREDICTED: nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Tribolium castaneum] >ref|XP_044259327.1| acetylcholine receptor subunit alpha-like isoform X1 [Tribolium madens]\n",
|
||||||
|
" Length = 560\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1584 (614 bits), expectation 0.0e+00, alignment length 563\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE\n",
|
||||||
|
"Sbjct: 17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 546\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033365857.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus vosnesenskii] >ref|XP_048265521.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus terrestris] >ref|XP_050476340.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus huntii] >ref|XP_050600938.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus affinis] >ref|XP_060819515.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus pascuorum]\n",
|
||||||
|
" Length = 572\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1579 (612 bits), expectation 0.0e+00, alignment length 556\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A\n",
|
||||||
|
"Sbjct: 18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 562\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACP31303.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]\n",
|
||||||
|
" Length = 515\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1579 (612 bits), expectation 0.0e+00, alignment length 527\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545\n",
|
||||||
|
" ANPDAKRLYDDLLSNYNRLIRPV N++ LTV +GL++SQLI++N...P+D\n",
|
||||||
|
"Sbjct: 29 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 509\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_003397559.1| acetylcholine receptor subunit alpha-L1 isoform X2 [Bombus terrestris]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1576 (611 bits), expectation 0.0e+00, alignment length 556\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556\n",
|
||||||
|
" +NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F\n",
|
||||||
|
"Sbjct: 17 SNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 530\n",
|
||||||
|
"\n",
|
||||||
|
"gb|AHJ11209.1| nicotinic acetylcholine receptor alpha2 [Locusta migratoria]\n",
|
||||||
|
" Length = 551\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1575 (611 bits), expectation 0.0e+00, alignment length 541\n",
|
||||||
|
"Query: 22 NPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNL...KKF 556\n",
|
||||||
|
" NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+NL...++F\n",
|
||||||
|
"Sbjct: 25 NPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLNL...QQF 545\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001011625.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera] >ref|XP_006561565.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >ref|XP_026298380.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >gb|KAG6801311.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera caucasica] >gb|KAG9431277.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera carnica] >gb|AAS48080.1| neuronal nicotinic acetylcholine receptor Apisa2 subunit [Apis mellifera] >gb|AJE70260.1| nicotinic acetylcholine receptor alpha2 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1575 (611 bits), expectation 0.0e+00, alignment length 550\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556\n",
|
||||||
|
" NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F\n",
|
||||||
|
"Sbjct: 17 GNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 530\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_012166790.1| acetylcholine receptor subunit alpha-L1 isoform X1 [Bombus terrestris]\n",
|
||||||
|
" Length = 544\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1572 (610 bits), expectation 0.0e+00, alignment length 559\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556\n",
|
||||||
|
" +NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F\n",
|
||||||
|
"Sbjct: 17 SNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 533\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_033365855.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus vosnesenskii] >ref|XP_048265516.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris] >ref|XP_050476334.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus huntii] >ref|XP_050600934.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus affinis]\n",
|
||||||
|
" Length = 583\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1569 (608 bits), expectation 0.0e+00, alignment length 567\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A\n",
|
||||||
|
"Sbjct: 18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 573\n",
|
||||||
|
"\n",
|
||||||
|
"ref|XP_006562616.1| nicotinic acetylcholine receptor alpha4 subunit isoform X2 [Apis mellifera] >gb|AAY87893.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera] >gb|AJE70262.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]\n",
|
||||||
|
" Length = 569\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1568 (608 bits), expectation 0.0e+00, alignment length 550\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...PID 545\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...PID\n",
|
||||||
|
"Sbjct: 17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...PID 552\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001155997.1| nicotinic acetylcholine receptor alpha4 subunit isoform 2 precursor [Tribolium castaneum] >ref|XP_044259330.1| acetylcholine receptor subunit alpha-like isoform X4 [Tribolium madens] >gb|ABS86906.1| nicotinic acetylcholine receptor subunit alpha4 variant [Tribolium castaneum]\n",
|
||||||
|
" Length = 556\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1567 (608 bits), expectation 0.0e+00, alignment length 559\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE\n",
|
||||||
|
"Sbjct: 17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 542\n",
|
||||||
|
"\n",
|
||||||
|
"emb|CAB77445.1| nicotinic acetylcholine receptor Dalpha 4 subunit [Drosophila melanogaster]\n",
|
||||||
|
" Length = 568\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1567 (608 bits), expectation 0.0e+00, alignment length 551\n",
|
||||||
|
"Query: 2 GSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNN...QPI 544\n",
|
||||||
|
" G L A + AL NPDAKRLYDDLLSNYN+L+RPV N ... PI\n",
|
||||||
|
"Sbjct: 18 GGTLRAWILSALMVHGAVAGNPDAKRLYDDLLSNYNKLVRPVVNT...IPI 548\n",
|
||||||
|
"\n",
|
||||||
|
"ref|NP_001103423.1| nicotinic acetylcholine receptor alpha 2 subunit precursor [Tribolium castaneum] >gb|ABS86903.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum] >gb|EFA10793.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 541\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1566 (607 bits), expectation 0.0e+00, alignment length 536\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556\n",
|
||||||
|
" NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLI++N...++F\n",
|
||||||
|
"Sbjct: 21 TNPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIELN...QQF 535\n",
|
||||||
|
"\n",
|
||||||
|
"gb|ACM09847.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09848.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09849.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]\n",
|
||||||
|
" Length = 540\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1566 (607 bits), expectation 0.0e+00, alignment length 536\n",
|
||||||
|
"Query: 21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556\n",
|
||||||
|
" NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLI++N...++F\n",
|
||||||
|
"Sbjct: 20 TNPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIELN...QQF 534\n",
|
||||||
|
"\n",
|
||||||
|
"gb|EEZ99194.2| nicotinic acetylcholine receptor subunit alpha4 [Tribolium castaneum]\n",
|
||||||
|
" Length = 598\n",
|
||||||
|
"\n",
|
||||||
|
"1 HSPs\n",
|
||||||
|
"Score 1565 (607 bits), expectation 0.0e+00, alignment length 559\n",
|
||||||
|
"Query: 11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557\n",
|
||||||
|
" + +H A G NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE\n",
|
||||||
|
"Sbjct: 59 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 584\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"blast_record = NCBIXML.read(open(fname))\n",
|
||||||
|
"for alignment in blast_record.alignments:\n",
|
||||||
|
" print(alignment)\n",
|
||||||
|
" print(\"%d HSPs\"%len(alignment.hsps))\n",
|
||||||
|
" for hsps in alignment.hsps:\n",
|
||||||
|
" print(hsps)\n",
|
||||||
|
" print()"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"celltoolbar": "Create Assignment",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
199
lectures/lecture-12/1 Probability as logic.ipynb
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Events happen or do not happen. Things exist or do not. Probability is how we think about these."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Thie notebook is based on the original [here](https://gist.github.com/willkurt/6c209c14bf777470543393302d1b523c) (linked from [this excellent page](https://www.countbayesie.com/blog/2019/12/1/probability-and-statistics-in-90-minutes)).\n",
|
||||||
|
"\n",
|
||||||
|
"See [a related book by the author at Uni Freiburg](https://katalog.ub.uni-freiburg.de/opac/RDSIndex/Search?lookfor=Bayesian%20Statistics%20the%20Fun%20Way&source=homepage)."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Probability as logic using Python's data model\n",
|
||||||
|
"\n",
|
||||||
|
"In this short notebook we'll show how probability really is just an extension of boolean logic. We'll make a class `P`, that uses Python's data model methods to implement a working example of probability as logic using `-`,`&` and `|`."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"class P:\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Example of Probability as logic using Python's data model\n",
|
||||||
|
" In this simple example these probabilites are assumed to \n",
|
||||||
|
" be conditionally independent.\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" def __init__(self,prob):\n",
|
||||||
|
" assert prob >= 0, \"probabilities can't be negative!\" \n",
|
||||||
|
" assert prob <= 1, \"probabilities can't be greater than 1!\"\n",
|
||||||
|
" self.prob = prob\n",
|
||||||
|
" \n",
|
||||||
|
" def __repr__(self):\n",
|
||||||
|
" return \"P({})\".format(self.prob)\n",
|
||||||
|
"\n",
|
||||||
|
" def __neg__(self):\n",
|
||||||
|
" return P(1-self.prob)\n",
|
||||||
|
" \n",
|
||||||
|
" def __and__(self,P2):\n",
|
||||||
|
" return P(self.prob * P2.prob)\n",
|
||||||
|
" \n",
|
||||||
|
" def __or__(self,P2):\n",
|
||||||
|
" return P(self.prob + P2.prob - (self & P2).prob)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"P(0.5)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"P(0.5) & P(0.5)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"True & True"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"P(0.5) | P(0.5)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"We can then use this to work out probabilities of various events happening using python!\n",
|
||||||
|
"\n",
|
||||||
|
"Suppose, for example, you know that there is a 0.3 probability of rain tomorrow and you'll get rained on if you forget your umbrella or your umbrella is broken. Then let's say you forget your umbrella with a probability 0.1 and you think your umbrella might be the broken, we'll give that a probability of 0.7. \n",
|
||||||
|
"\n",
|
||||||
|
"Now let's use logic to answer: What's the probability you will *not* get wet?\n",
|
||||||
|
"\n",
|
||||||
|
"Let's start with our facts:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"rain = P(0.3)\n",
|
||||||
|
"forget = P(0.1)\n",
|
||||||
|
"broken = P(0.7)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"The probability of being `wet` is:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"wet = rain & (forget | broken)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"wet"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"and logically the probability of being dry is:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"-wet"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"With probability as logic, no matter how complicated our reasoning, we can now trivially code up a solution in Python!"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Conclusions\n",
|
||||||
|
"\n",
|
||||||
|
"* Probabilities are intuitive\n",
|
||||||
|
"* Do not let mathematical notation of probabilities scare you\n",
|
||||||
|
"* Working mathematically and computationally with probabilities can be very useful\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
|
@ -0,0 +1,248 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Learning goals\n",
|
||||||
|
"\n",
|
||||||
|
"Understand the following:\n",
|
||||||
|
"\n",
|
||||||
|
"- Probability distribution\n",
|
||||||
|
"- Probability density function (PDF)\n",
|
||||||
|
"- Gaussian distribution\n",
|
||||||
|
"- Histogram\n",
|
||||||
|
"- Mean\n",
|
||||||
|
"- Standard deviation\n",
|
||||||
|
"- Variance\n",
|
||||||
|
"- Mode\n",
|
||||||
|
"\n",
|
||||||
|
"We will discuss these as we work through this example"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import numpy as np\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"import scipy.stats as stats"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"sample_size = 30\n",
|
||||||
|
"\n",
|
||||||
|
"true_mean = 10.0\n",
|
||||||
|
"true_variance = 4.0\n",
|
||||||
|
"true_std = np.sqrt(true_variance)\n",
|
||||||
|
"\n",
|
||||||
|
"rng = np.random.RandomState(123)\n",
|
||||||
|
"fish_sample = rng.normal(loc=true_mean, scale=true_std, size=sample_size)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"fish_sample"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"x=plt.hist(fish_sample)\n",
|
||||||
|
"plt.xlabel(\"fish length (cm)\")\n",
|
||||||
|
"plt.ylabel(\"counts\");"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"x"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## What is the mean of the sample of fish lengths?"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"sample_mean = np.mean(fish_sample)\n",
|
||||||
|
"print(sample_mean)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## What is the [mode](https://en.wikipedia.org/wiki/Mode_(statistics)) of the sample of fish lengths? (\"[modus](https://de.wikipedia.org/wiki/Modus_(Statistik))\" in German.)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## What is the sample variance of fish lengths?\n",
|
||||||
|
"\n",
|
||||||
|
"We put the result in the variable `length_variance`. We use the `ddof=1` keyword argument to `np.var()` because we are estimating variance from a sample here."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"sample_variance = np.var(fish_sample, ddof=1)\n",
|
||||||
|
"print(sample_variance)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Probability Density Functions (PDFs)\n",
|
||||||
|
"\n",
|
||||||
|
"- for working with continuous variables (vs. probability mass functions for discrete variables)\n",
|
||||||
|
"- here, the area under the curve gives the probability (in contrast to probability mass functions where we have probabilities for every single value)\n",
|
||||||
|
"- the area under the whole curve is 1. In other words, some outcome must happen.\n",
|
||||||
|
"\n",
|
||||||
|
"## Normal Distribution (Gaussian Distribution)\n",
|
||||||
|
"\n",
|
||||||
|
"- unimodal and symmetric\n",
|
||||||
|
"- many algorithms in machine learning & statistics have normality assumptions\n",
|
||||||
|
"- two parameters: mean (center of the peak) and standard deviation (spread); $N(\\mu, \\sigma)$\n",
|
||||||
|
"- we can estimate parameters $\\mu$ and $\\sigma$ by the sample mean ($\\bar{x})$ and sample variance ($s^2$)\n",
|
||||||
|
"- univariate Normal distribution:\n",
|
||||||
|
"\n",
|
||||||
|
"$$N(\\mu, \\sigma) = f(x \\mid \\mu, \\sigma^2) = \\frac{1}{\\sqrt{2\\pi\\sigma^2}} \\; \\exp\\bigg(-\\frac{(x-\\mu)^2}{2\\sigma^2}\\bigg)$$\n",
|
||||||
|
"\n",
|
||||||
|
"- standard normal distribution with zero mean and unit variance, $N(0, 1)$:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def univariate_gaussian_pdf(x, mean, variance):\n",
|
||||||
|
" return (1. / np.sqrt(2*np.pi*variance) * \n",
|
||||||
|
" np.exp(- ((x - mean)**2 / (2.*variance))))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"mean = 0\n",
|
||||||
|
"stddev = 1\n",
|
||||||
|
"x = np.arange(-5, 5, 0.01)\n",
|
||||||
|
"y = univariate_gaussian_pdf(x, mean, stddev**2)\n",
|
||||||
|
"plt.plot(x, y)\n",
|
||||||
|
"plt.xlabel('x')\n",
|
||||||
|
"plt.ylabel('Probability Density Function (PDF)')\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"mean = 10\n",
|
||||||
|
"stddev = 2.0\n",
|
||||||
|
"x = np.arange(5, 15, 0.01)\n",
|
||||||
|
"y = univariate_gaussian_pdf(x, mean, stddev**2)\n",
|
||||||
|
"plt.plot(x, y)\n",
|
||||||
|
"plt.xlabel('fish length (cm)')\n",
|
||||||
|
"plt.ylabel('Probability Density Function (PDF)')\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"plt.hist(fish_sample, density=True, label='samples')\n",
|
||||||
|
"\n",
|
||||||
|
"x = np.linspace(5.0, 15.0, 100)\n",
|
||||||
|
"y = univariate_gaussian_pdf(x, true_mean, true_variance)\n",
|
||||||
|
"plt.plot(x, y, lw=5, label='theoretical (mean=%.1f, variance=%.1f)'%(true_mean,true_variance))\n",
|
||||||
|
"\n",
|
||||||
|
"sample_mean = np.mean(fish_sample)\n",
|
||||||
|
"sample_variance = np.var(fish_sample, ddof=1) # for a sample variance, always use ddof=1. Here is one explanation why https://mortada.net/computing-sample-variance-why-divide-by-n-1.html\n",
|
||||||
|
"y2 = univariate_gaussian_pdf(x, sample_mean, sample_variance)\n",
|
||||||
|
"plt.plot(x, y2, label='empirical (mean=%.1f, variance=%.1f)'%(sample_mean,sample_variance))\n",
|
||||||
|
"\n",
|
||||||
|
"plt.xlabel(\"length (cm)\")\n",
|
||||||
|
"plt.ylabel(\"probability\");\n",
|
||||||
|
"plt.legend();\n",
|
||||||
|
"# plt.savefig('fish-gaussian.png');"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Discussion points\n",
|
||||||
|
"\n",
|
||||||
|
"Here are a few questions you should be able to answer:\n",
|
||||||
|
"\n",
|
||||||
|
" - what is plotted on the x axis?\n",
|
||||||
|
" - what is plotted on the y axis?\n",
|
||||||
|
" - what is the area under the curve from -∞ to ∞?\n",
|
||||||
|
" - according to our Guassian distribution, what is the most likely fish length?\n",
|
||||||
|
" - according to our histogram, what is the most likely fish length?"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|
69
lectures/lecture-12/3 Bayes' theorem.ipynb
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Bayes' theorem\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"$ \\newcommand{\\thetavec}{\\boldsymbol{\\theta}} \\newcommand{\\pr}{\\textrm{p}}$\n",
|
||||||
|
"\n",
|
||||||
|
"Bayes' theorem with $\\thetavec$ the vector of parameters we seek.\n",
|
||||||
|
"\n",
|
||||||
|
"$$\n",
|
||||||
|
" \\overbrace{\\pr(\\thetavec \\mid \\textrm{data})}^{\\textrm{posterior}} =\n",
|
||||||
|
" \\frac{\\color{red}{\\overbrace{\\pr(\\textrm{data} \\mid \\thetavec)}^{\\textrm{likelihood}}} \\times\n",
|
||||||
|
" \\color{blue}{\\overbrace{\\pr(\\thetavec)}^{\\textrm{prior}}}}\n",
|
||||||
|
" {\\color{darkgreen}{\\underbrace{\\pr(\\textrm{data})}_{\\textrm{evidence}}}}\n",
|
||||||
|
"$$\n",
|
||||||
|
"\n",
|
||||||
|
"If we view the prior as the initial information we have about $\\thetavec$, summarized as a probability density function, then Bayes' theorem tells us how to <em>update</em> that information after observing some data: this is the posterior pdf.\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"We will go through [this post, \"Bayes' Theorem with Lego\"](https://www.countbayesie.com/blog/2015/2/18/bayes-theorem-with-lego).\n",
|
||||||
|
"\n",
|
||||||
|
"## Discussion: the Bayesian Brain hypothesis.\n",
|
||||||
|
"\n",
|
||||||
|
"Here is an [interesting article](https://towardsdatascience.com/the-bayesian-brain-hypothesis-35b98847d331), which might serve as a starting point, about this idea.\n",
|
||||||
|
"\n",
|
||||||
|
"## Further material\n",
|
||||||
|
"\n",
|
||||||
|
"* [Bayesian Statistics the Fun Way](https://katalog.ub.uni-freiburg.de/opac/RDSIndex/Search?lookfor=Bayesian%20Statistics%20the%20Fun%20Way%20&source=homepage)\n",
|
||||||
|
"\n",
|
||||||
|
"* [Doing Bayesian Data Analysis : A Tutorial with R, JAGS, and Stan\n",
|
||||||
|
"John Kruschke](https://katalog.ub.uni-freiburg.de/opac/RDSIndex/Search?lookfor=Bayesian+Data+analysis+Kruschke&type=AllFields&limit=10&sort=py+desc)\n",
|
||||||
|
"\n",
|
||||||
|
"* https://www.3blue1brown.com/, especially https://www.youtube.com/watch?v=HZGCoVF3YvM\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"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.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 4
|
||||||
|
}
|