Skip to content

Instantly share code, notes, and snippets.

@hardingnj
Created February 27, 2018 10:01
Show Gist options
  • Save hardingnj/41b59011b511871cef855310dbe5d1c4 to your computer and use it in GitHub Desktop.
Save hardingnj/41b59011b511871cef855310dbe5d1c4 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import allel\n",
"import pomegranate"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"('0.9.0', '1.1.9')"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pomegranate.__version__, allel.__version__"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create test genotypes"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"gv = np.random.random((100000, 2)) < 0.05\n",
"gv = gv.astype(\"int8\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# Positions\n",
"pos = np.random.choice(range(0, 1000000), size=100000)\n",
"pos = allel.SortedIndex(np.sort(pos))"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### add known ROH:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"roh = [[0, 10000], [100000, 150000], [600000, 800000]]\n",
"\n",
"for start, stop in roh:\n",
" loc = pos.locate_range(start, stop)\n",
" size = loc.stop - loc.start\n",
" \n",
" new_gv = np.random.random((size, 2)) < 0.001\n",
" gv[loc] = new_gv"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"is_access = np.ones(1000000).astype(\"bool\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/home/njh/miniconda3/envs/poisson/lib/python3.6/site-packages/allel/__init__.py'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"allel.__file__"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Poisson model"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hetp [ 0.001 0.0025 0.01 ]\n",
"start [ 0.33333333 0.33333333 0.33333333]\n",
"tx [[ 9.99000000e-01 5.00000000e-04 5.00000000e-04]\n",
" [ 5.00000000e-04 9.99000000e-01 5.00000000e-04]\n",
" [ 5.00000000e-04 5.00000000e-04 9.99000000e-01]]\n",
"CPU times: user 28 ms, sys: 1.05 ms, total: 29.1 ms\n",
"Wall time: 28.7 ms\n"
]
}
],
"source": [
"%%time\n",
"pdf, pfroh = allel.roh.roh_poissionhmm(\n",
" gv, pos, transition=0.001, is_accessible=is_access, window_size=1000)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>start</th>\n",
" <th>stop</th>\n",
" <th>length</th>\n",
" <th>is_marginal</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>10000</td>\n",
" <td>9999</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>99001</td>\n",
" <td>150000</td>\n",
" <td>50999</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>600001</td>\n",
" <td>800000</td>\n",
" <td>199999</td>\n",
" <td>False</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" start stop length is_marginal\n",
"0 1 10000 9999 True\n",
"1 99001 150000 50999 False\n",
"2 600001 800000 199999 False"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pdf"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.26125825825825827"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pfroh"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Multinomial model"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/njh/miniconda3/envs/poisson/lib/python3.6/site-packages/hmmlearn/hmm.py:377: RuntimeWarning: divide by zero encountered in log\n",
" return np.log(self.emissionprob_)[:, np.concatenate(X)].T\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 8.57 s, sys: 43.1 ms, total: 8.61 s\n",
"Wall time: 8.6 s\n"
]
}
],
"source": [
"%%time\n",
"mdf, mfroh = allel.stats.roh_mhmm(gv, pos, is_accessible=is_access)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>start</th>\n",
" <th>stop</th>\n",
" <th>length</th>\n",
" <th>is_marginal</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>10171</td>\n",
" <td>10171</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>98890</td>\n",
" <td>150047</td>\n",
" <td>51158</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>599932</td>\n",
" <td>800807</td>\n",
" <td>200876</td>\n",
" <td>False</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" start stop length is_marginal\n",
"0 1 10171 10171 True\n",
"1 98890 150047 51158 False\n",
"2 599932 800807 200876 False"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mdf"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.26220500000000002"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mfroh"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## plot"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Text(0,0.5,'Multinomial model')"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAEyCAYAAADZQ4ufAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XmYHFd5L/7v2zOakWaRRrJGsqzVYNlmsbEWb4FfLjeEJZCLkwcHZAMxxmCSG9Z7fzfXDjchhktibggXEwhYXohjvBFCErOFxWF58sM20sj7BopsjUaS7dEyo9GMNEv3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FueRAyHeiVyBiHQB+EcAH1XVY3GLet7TGt6fd0TktwG8qKp99tueRbXC77gPkmlFMIX+ZVXdhCBLMu6eNvZrjcL7Gi5BEMY5DUAngN/yLMqxnY0s+nHGfc8LluAqb631eg2AAw1qy6wgIgsQXKzcoaqmkOALIrIq/P0qAC+G70f1b9z7azzvx21jrno1gLeKyHMA7kYQFvo8gB4RMUUf7f4p9mn4+yUIHipa7T44FLONuWwAwICqPhi+/gaCCxiO7fr7TQDPquqgqk4iKEj6a+DYTlsjx/KM/63lBQuwA8DG8M7xNgQ3dMU+qXo+C+8EvwXAU6r6OetX9wIwd5BfgeDeFvP+74d3iF8EYDicJvw+gDeIyNLwf1tvQBBLPghgREQuCrf1+866fNuYk1T1WlVdo6obEIzLf1PVdwL4MYBLw8Xcvjb9c2m4vIbvbwszLU4HsBHBDXPesR9+Jmobc5aqPg9gn4icFb71OgBPgmM7Df0ALhKRjrAvTF9zbKerkWM5ahvJNfqmoGb4QXD38i8R3FX+8Ua3p5l/ALwGwTTeowAeDn/ejCA2fB+AX4V/LguXFwBfCvv2MQBbrXW9F8EzqnYDuNJ6fyuAx8PPfBHT9YK825gPPwBei+ksoZcgOCnvBvAPANrD9xeGr3eHv3+J9fmPh/35DMK7+cP3vWM/ahtz/QfAeQB2huP7nxFkRnBsp9PX1wF4OuyP2xFk+nBs169/70Jwf9AkgtmNqxo5luO2kfSHheOIiIio6TEkRERERE2PFyxERETU9HjBQkRERE2PFyxERETU9HjBQkRERE2PFyxERETU9HjBQkRERE3v/wfce0upBfgw5QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f08418ccdd8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, axes = plt.subplots(3, figsize=(9, 5), sharex=True)\n",
"\n",
"ax1, ax2, ax3 = axes\n",
"\n",
"vals, windows, counts = allel.windowed_statistic(\n",
" pos, allel.GenotypeVector(gv).is_het(), statistic=np.sum, size=1000)\n",
" \n",
"ax1.scatter(windows.T[0], vals, marker=\"o\", s=5)\n",
"\n",
"ax2.broken_barh(tuple(zip(pdf.start.values, pdf.length.values)), \n",
" (0, 1))\n",
"ax2.set_ylabel(\"Poisson model\")\n",
"\n",
"ax3.broken_barh(tuple(zip(mdf.start.values, mdf.length.values)),\n",
" (0, 1))\n",
"ax3.set_ylabel(\"Multinomial model\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Test on some real data..."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"import sys, os"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"sys.path.insert(0, 'selection_paper/ag1000g-phase1-selection-paper/agam-report-base/src/python')"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"ag1k_dir = '/kwiat/vector/ag1000g/release'\n",
"from ag1k import phase1_ar3"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"phase1_ar3.init(os.path.join(ag1k_dir, \"phase1.AR3\"))"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"# get a kenyan sample"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"pos = allel.SortedIndex(phase1_ar3.callset_pass[\"2L\"][\"variants/POS\"][:])"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"kes_df = phase1_ar3.df_samples.query(\"population == 'KES'\")"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"304"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kes_ix = kes_df.index[5]\n",
"kes_ix"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"gv = allel.GenotypeVector(\n",
" phase1_ar3.callset_pass[\"2L\"][\"calldata/genotype\"][:, kes_ix])"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((10377280, 2), (10377280,))"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gv.shape, pos.shape"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"real_accessibility = phase1_ar3.accessibility[\"2L\"][\"is_accessible\"][:]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Compare to phase1 AR3.1 ROH calls"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"roh_data = \"/kwiat/vector/ag1000g/release/phase1.AR3.1/roh/main/runs_of_homozygosity.h5\""
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"import h5py"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"roh_fh = h5py.File(roh_data, \"r\")"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'AK0070-C'"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kes_sample = phase1_ar3.df_samples.loc[kes_ix]\n",
"kes_sample.ox_code"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"xx = roh_fh[\"2L\"][kes_sample.ox_code][:]\n",
"\n",
"phase1df = pd.DataFrame(xx, columns=[\"start\", \"stop\"])\n",
"phase1df[\"length\"] = phase1df.stop - phase1df.start"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>start</th>\n",
" <th>stop</th>\n",
" <th>length</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>35831727</td>\n",
" <td>35831726</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>37842374</td>\n",
" <td>37871903</td>\n",
" <td>29529</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>37905959</td>\n",
" <td>37917042</td>\n",
" <td>11083</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>38468052</td>\n",
" <td>49364325</td>\n",
" <td>10896273</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" start stop length\n",
"0 1 35831727 35831726\n",
"1 37842374 37871903 29529\n",
"2 37905959 37917042 11083\n",
"3 38468052 49364325 10896273"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phase1df"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"callset = phase1_ar3.callset_pass\n",
"accessibility = phase1_ar3.accessibility"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hetp [ 0.001 0.0025 0.01 ]\n",
"start [ 0.33333333 0.33333333 0.33333333]\n",
"tx [[ 9.99000000e-01 5.00000000e-04 5.00000000e-04]\n",
" [ 5.00000000e-04 9.99000000e-01 5.00000000e-04]\n",
" [ 5.00000000e-04 5.00000000e-04 9.99000000e-01]]\n"
]
}
],
"source": [
"df, froh = allel.roh_poissionhmm(\n",
" gv, pos, is_accessible=real_accessibility, window_size=1000)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>start</th>\n",
" <th>stop</th>\n",
" <th>length</th>\n",
" <th>is_marginal</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>25044</td>\n",
" <td>35832833</td>\n",
" <td>35807789</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>37842854</td>\n",
" <td>37869174</td>\n",
" <td>26320</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>37906143</td>\n",
" <td>37915810</td>\n",
" <td>9667</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>38468037</td>\n",
" <td>49355530</td>\n",
" <td>10887493</td>\n",
" <td>True</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" start stop length is_marginal\n",
"0 25044 35832833 35807789 True\n",
"1 37842854 37869174 26320 False\n",
"2 37906143 37915810 9667 False\n",
"3 38468037 49355530 10887493 True"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Text(0,0.5,'Multinomial model')"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAFMCAYAAADoa+cuAAAABHNCSVQICAgIfAhkiA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lLCkvrg3ZC1vRF/mMkaZWR1wGqnZqyVCwemJZ4BtwCPurn0erX8F/h5IljqQccSBh82sycwWR70xJSx5lxwI6EhIxhwzqwb+C/i0u+8udTxjXTD55qmkrlS/wMx0+jMiZvZuYJu7N5U6lnHmbHc/HXgn8PHgdH9klLCkKipHZi0fAWwqUSwikQj6UfwXcK+7a/LHGLn7TuBR4MIShzKWnQ1cHPSpWAacY2b3lDaksc/dNwU/twE/J9XFIjJKWFKdbI81s6PMbCKpK0YPeqVqkQNJ0AH0NuAld7+51PGMB2ZWa2bTgt8PAs4DXi5tVGOXu3/W3Y9w9zpS3+G/dffLSxzWmGZmU4JO/JjZFOACINKRn+M+YXH3PuBa4CFSnRH/fSxf4LEcmNlS4EngeDPbaGZXlTqmMe5s4MOkjjqfCW7vKnVQY9xs4Hdm9hypg6JH3F1DbWUsmQU8bmbPAiuBX7n7g1FucNwPaxYREZHyN+4rLCIiIlL+lLCIiIhI2VPCIiIiImVPCYuIiIiUPSUsIiIiMiLDuZitmX0ra6TiajPbOaxtaZSQiIiIjMRIL2ZrZp8ATnP3j4V9jiosIiIiMiKFLmZrZseY2YPBNYYeM7N5BZ56KbB0ONuq3I84RURERPItAf7a3f9kZguB7wPnpB80s7nAUcBvh9OoEhYREREZFcFFVt8M/EfqqiAAVOWttgj4T3fvH07bSlhERERktCSAncGVyotZBHx8JA2LiIiI7Dd33w2sM7MPQOriq2Z2SvpxMzsemE7qenLDooRFRERERqTIxWw/BFwVXBjxBeCSrKdcCizzEQxR1rBmERERKXuqsIiIiEjZU8IiIiIiZU8Ji4iIiJQ9JSwiIiJS9pSwiIiISNlTwiIiIiJlTwmLiIiIlD0lLCIiIlL2/j9GvOBxJ1Q02QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f08216fdc88>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, axes = plt.subplots(3, figsize=(9, 5), sharex=True)\n",
"\n",
"ax1, ax2, ax3 = axes\n",
"\n",
"eqw = allel.equally_accessible_windows(real_accessibility, size=1000)\n",
"\n",
"vals, windows, counts = allel.windowed_statistic(\n",
" pos, \n",
" allel.GenotypeVector(gv).is_het(), \n",
" statistic=np.sum, \n",
" windows=eqw)\n",
" \n",
"ax1.scatter(windows.T[0], vals, marker=\"o\", s=5)\n",
"ax1.set_title(kes_sample.ox_code + \": 2L\")\n",
"\n",
"ax2.broken_barh(tuple(zip(phase1df.start.values, phase1df.length.values)), \n",
" (0, 1))\n",
"ax2.set_ylabel(\"Poisson model\")\n",
"\n",
"ax3.broken_barh(tuple(zip(df.start.values, df.length.values)),\n",
" (0, 1))\n",
"ax3.set_ylabel(\"Multinomial model\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
@hardingnj
Copy link
Author

In the last plot, I have the labels the wrong way around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment