Created
March 31, 2018 22:24
-
-
Save capissimo/f13148f79cadae2cb0a4134917b16727 to your computer and use it in GitHub Desktop.
Chpater 1 from Elegant SciPy (rev 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Глава 1. \n", | |
"# Элегантный NumPy: фундамент научного программирования на Python\n", | |
"> [Библиотека NumPy] повсюду. Она окружает нас. Даже сейчас, она с нами рядом. \n", | |
"> Ты видишь ее, когда смотришь в окно или включаешь телевизор. Ты ощущаешь ее, \n", | |
"> когда работаешь, идешь в церковь, когда платишь налоги.\n", | |
">\n", | |
"> — Морфеус, к/ф «Матрица»" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def rpkm(counts, lengths):\n", | |
" \"\"\"Вычислить прочтения на тысячу оснований экзона на миллион \n", | |
" картированных прочтений (reads per kilobase transcript per million reads).\n", | |
"\n", | |
" RPKM = (10^9 * C) / (N * L)\n", | |
" где:\n", | |
"\n", | |
" C = количества прочтений, картированных на ген\n", | |
" N = суммы количеств картированных (выровненных) прочтений в эксперименте\n", | |
" L = длина экзона в парах оснований для гена\n", | |
"\n", | |
" Параметры\n", | |
" ---------\n", | |
" counts: массив, форма (N_genes, N_samples)\n", | |
" РНК-сек (или подобные) количественные данные, где столбцы являются \n", | |
" отдельными образцами, и строки - генами.\n", | |
" lengths: массив, форма (N_genes,)\n", | |
" Длины генов в парах оснований в том же порядке, что и\n", | |
" строки в counts.\n", | |
"\n", | |
" Возвращает\n", | |
" ----------\n", | |
" normed: массив, форма (N_genes, N_samples)\n", | |
" Матрица количеств counts, нормализованная согласно RPKM.\n", | |
" \"\"\"\n", | |
" N = np.sum(counts, axis=0) # просуммировать каждый столбец, чтобы \n", | |
" # получить суммы количеств прочтений на образец\n", | |
" L = lengths\n", | |
" C = counts\n", | |
"\n", | |
" normed = 1e9 * C / (N[np.newaxis, :] * L[:, np.newaxis])\n", | |
"\n", | |
" return(normed)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Введение в данные: что такое экспрессия гена?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"gene0 = [100, 200]\n", | |
"gene1 = [50, 0]\n", | |
"gene2 = [350, 100]\n", | |
"expression_data = [gene0, gene1, gene2]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"350" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"expression_data[2][0]" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## N-мерные массивы NumPy" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[1 2 3 4]\n", | |
"<class 'numpy.ndarray'>\n" | |
] | |
} | |
], | |
"source": [ | |
"import numpy as np\n", | |
"\n", | |
"array1d = np.array([1, 2, 3, 4])\n", | |
"print(array1d)\n", | |
"print(type(array1d))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(4,)\n" | |
] | |
} | |
], | |
"source": [ | |
"print(array1d.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[100 200]\n", | |
" [ 50 0]\n", | |
" [350 100]]\n", | |
"(3, 2)\n", | |
"<class 'numpy.ndarray'>\n" | |
] | |
} | |
], | |
"source": [ | |
"array2d = np.array(expression_data)\n", | |
"print(array2d)\n", | |
"print(array2d.shape)\n", | |
"print(type(array2d))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"2\n" | |
] | |
} | |
], | |
"source": [ | |
"print(array2d.ndim)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Зачем использовать массивы ndarray вместо списков Python?" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"\n", | |
"# Создать массив ndarray целочисленных в диапазоне\n", | |
"# от 0 и до (но не включая) 1 000 000\n", | |
"array = np.arange(1e6)\n", | |
"\n", | |
"# Конвертировать его в список\n", | |
"list_array = array.tolist()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"199 ms ± 9.79 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" | |
] | |
} | |
], | |
"source": [ | |
"%timeit -n10 y = [val * 5 for val in list_array]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"7.84 ms ± 1.83 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n" | |
] | |
} | |
], | |
"source": [ | |
"%timeit -n10 x = array * 5" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[1 2 3]\n", | |
"[1 2]\n", | |
"[6 2]\n" | |
] | |
} | |
], | |
"source": [ | |
"# Создать массив ndarray x\n", | |
"x = np.array([1, 2, 3], np.int32)\n", | |
"print(x)\n", | |
"\n", | |
"# Создать \"срез\" массива x\n", | |
"y = x[:2]\n", | |
"print(y)\n", | |
"\n", | |
"# Назначить первому элементу среза y значение 6\n", | |
"y[0] = 6\n", | |
"print(y)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[6 2 3]\n" | |
] | |
} | |
], | |
"source": [ | |
"# Теперь первый элемент в массиве x поменялся на 6!\n", | |
"print(x)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"y = np.copy(x[:2])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Векторизация" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[2 4 6 8]\n" | |
] | |
} | |
], | |
"source": [ | |
"x = np.array([1, 2, 3, 4])\n", | |
"print(x * 2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[1 3 5 5]\n" | |
] | |
} | |
], | |
"source": [ | |
"y = np.array([0, 1, 2, 1])\n", | |
"print(x + y)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Транслирование " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[1]\n", | |
" [2]\n", | |
" [3]\n", | |
" [4]]\n" | |
] | |
} | |
], | |
"source": [ | |
"x = np.array([1, 2, 3, 4])\n", | |
"x = np.reshape(x, (len(x), 1))\n", | |
"print(x)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[0 1 2 1]]\n" | |
] | |
} | |
], | |
"source": [ | |
"y = np.array([0, 1, 2, 1])\n", | |
"y = np.reshape(y, (1, len(y)))\n", | |
"print(y)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(4, 1)\n", | |
"(1, 4)\n" | |
] | |
} | |
], | |
"source": [ | |
"print(x.shape)\n", | |
"print(y.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[[0 1 2 1]\n", | |
" [0 2 4 2]\n", | |
" [0 3 6 3]\n", | |
" [0 4 8 4]]\n" | |
] | |
} | |
], | |
"source": [ | |
"outer = x * y\n", | |
"print(outer)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(4, 4)\n" | |
] | |
} | |
], | |
"source": [ | |
"print(outer.shape)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Исследование набора данных экспрессии генов\n", | |
"### Чтение данных при помощи библиотеки pandas" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" 00624286-41dd-476f-a63b-d2a5f484bb45 TCGA-FS-A1Z0 TCGA-D9-A3Z1 \\\n", | |
"A1BG 1272.36 452.96 288.06 \n", | |
"A1CF 0.00 0.00 0.00 \n", | |
"A2BP1 0.00 0.00 0.00 \n", | |
"A2LD1 164.38 552.43 201.83 \n", | |
"A2ML1 27.00 0.00 0.00 \n", | |
"\n", | |
" 02c76d24-f1d2-4029-95b4-8be3bda8fdbe TCGA-EB-A51B \n", | |
"A1BG 400.11 420.46 \n", | |
"A1CF 1.00 0.00 \n", | |
"A2BP1 0.00 1.00 \n", | |
"A2LD1 165.12 95.75 \n", | |
"A2ML1 0.00 8.00 \n" | |
] | |
} | |
], | |
"source": [ | |
"import numpy as np\n", | |
"import pandas as pd\n", | |
"\n", | |
"# Импортировать данные TCGA по меланоме\n", | |
"filename = 'data/counts.txt'\n", | |
"with open(filename, 'rt') as f:\n", | |
" data_table = pd.read_csv(f, index_col=0) # pandas выполняет разбор данных \n", | |
"\n", | |
"print(data_table.iloc[:5, :5])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Имена образцов\n", | |
"samples = list(data_table.columns)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" GeneID GeneLength\n", | |
"GeneSymbol \n", | |
"CPA1 1357 1724\n", | |
"GUCY2D 3000 3623\n", | |
"UBC 7316 2687\n", | |
"C11orf95 65998 5581\n", | |
"ANKMY2 57037 2611\n" | |
] | |
} | |
], | |
"source": [ | |
"# Импортировать длины генов\n", | |
"filename = 'data/genes.csv'\n", | |
"with open(filename, 'rt') as f:\n", | |
" # Разобрать файл при помощи pandas, индексировать по GeneSymbol\n", | |
" gene_info = pd.read_csv(f, index_col=0)\n", | |
"\n", | |
"print(gene_info.iloc[:5, :])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Гены в data_table: 20500\n", | |
"Гены в gene_info: 20503\n" | |
] | |
} | |
], | |
"source": [ | |
"print(\"Гены в data_table: \", data_table.shape[0])\n", | |
"print(\"Гены в gene_info: \", gene_info.shape[0])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Взять подмножество генной информации, которая \n", | |
"# совпадает с количественными данными\n", | |
"matched_index = pd.Index.intersection(gene_info.index, data_table.index)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"20500 генов измерено в 375 индивидуумах.\n" | |
] | |
} | |
], | |
"source": [ | |
"# Двумерный массив ndarray, содержащий количества экспрессии \n", | |
"# для каждого гена в каждом индивидууме\n", | |
"counts = np.asarray(data_table.loc[matched_index], dtype=int)\n", | |
"gene_names = np.array(matched_index)\n", | |
"\n", | |
"# Проверить, сколько генов и индивидуумов измерено\n", | |
"print(f'{counts.shape[0]} генов измерено в {counts.shape[1]} индивидуумах.')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Одномерный массив ndarray, содержащий длины каждого гена\n", | |
"gene_lengths = np.asarray(gene_info.loc[matched_index]['GeneLength'],\n", | |
" dtype=int)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"(20500, 375)\n", | |
"(20500,)\n" | |
] | |
} | |
], | |
"source": [ | |
"print(counts.shape)\n", | |
"print(gene_lengths.shape)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Нормализация\n", | |
"### Нормализация между образцами" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Заставить все графики в блокноте Jupyter\n", | |
"# в дальнейшем появляться локально \n", | |
"%matplotlib inline\n", | |
"# Применить к графикам собственный стилевой файл \n", | |
"import matplotlib.pyplot as plt\n", | |
"#plt.style.use('style/elegant.mplstyle')\n", | |
"\n", | |
"# переопределение стиля\n", | |
"from matplotlib import rcParams\n", | |
"rcParams['font.family'] = 'sans-serif'\n", | |
"rcParams['font.sans-serif'] = ['Ubuntu Condensed']\n", | |
"rcParams['figure.figsize'] = (4.8, 3)\n", | |
"rcParams['legend.fontsize'] = 10\n", | |
"rcParams['xtick.labelsize'] = 9\n", | |
"rcParams['ytick.labelsize'] = 9" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJzt3Xl4lOWh/vHvk43sIQnZCBAgYV8EQRABwX3B1l3RurS1i62/nu6tPce2Hu3mOdraY1trV1RaqQuuuFUUZVVA9k0ISdgSIAlJyD6ZeX5/zCAxBgiQmfedzP25rlxJXmbmvRkxd553eR5jrUVERMRtopwOICIi0hkVlIiIuJIKSkREXEkFJSIirqSCEhERV1JBiYiIK6mgRETElVxXUMaY+4wxD3fhcTcbY1YaY/4ZilwiIhJariooY0wRkB34eoAxZrEx5l1jTFonD78WuAAoMsbEhjKniIgEn3HbTBLGmJnAVUANsAoYCuyx1j7d4XGfAS4Bmq213wt1ThERCS5XjaA6yAN+CtwMJBhjHjbGLAp8nA8MA7YBfY0x0U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aeO87zF+Ifsa231m7BP8J6i2O/1xKhrLWLrLXfstbustaeY629yFpbbq39l7V2TOBccsOxnq/ZzCWsBc4JzbXWamG+TgQu/phprb03cA7sXmvt50/n+cB3gV9Za78ceMxz1tpruzO3CECM0wFETpUxJh54A/i501lcbC1QGvi6gk9e3HGqz38euAvAGDMf/xLqIt1OIygREXElnYMSERFXUkGJiIgrqaBERMSVVFAiIuJKKigREXGl/w8N3gzeVGkFmgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f10db0f0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Количественная статистика:\n", | |
" минимум: 6231205\n", | |
" среднее: 52995255.33866667\n", | |
" максимум: 103219262\n" | |
] | |
} | |
], | |
"source": [ | |
"total_counts = np.sum(counts, axis=0) # просуммировать столбцы\n", | |
" # (axis=1 будет суммировать строки)\n", | |
"\n", | |
"from scipy import stats\n", | |
"\n", | |
"# Применить гауссово сглаживание для оценки плотности\n", | |
"density = stats.kde.gaussian_kde(total_counts)\n", | |
"\n", | |
"# Создать значения, для которых оценить плотность, с целью построения графика\n", | |
"x = np.arange(min(total_counts), max(total_counts), 10000)\n", | |
"\n", | |
"# Создать график плотности\n", | |
"fig, ax = plt.subplots()\n", | |
"ax.plot(x, density(x))\n", | |
"ax.set_xlabel(\"Суммы количеств на индивидуум\")\n", | |
"ax.set_ylabel(\"Плотность\")\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_06.png', dpi=600) \n", | |
"plt.show()\n", | |
"\n", | |
"print(f'Количественная статистика:\\n минимум: {np.min(total_counts)}'\n", | |
" f'\\n среднее: {np.mean(total_counts)}'\n", | |
" f'\\n максимум: {np.max(total_counts)}')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Нормализация размера библиотеки между образцами" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAAClCAYAAAAONXX6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJztnXuUFdWd7z8/Wp4N+ODlC0l8BUhM1ETDHR8B49ywCHFlEjMxD4wkGp2JmYnkarj3+kp0TRySMZnIullzScRoEjHBoKiIuQpofGCM4APpVnkoCDbdNGDDabpp6N/9Y++Crt0NVafrnD7ntL/PWmd9e/ep2udXu3b99m/vqtpbVBXDMAyj+/QptQGGYRiVjjlSwzCMjJgjNQzDyIg5UsMwjIyYIzUMw8hIr3Gk4hgiIlJqWwzDeH9xWKkNKCCDgaampqZS22EYRu8iMTjrNRGpYRhGqTBHahiGkRFzpIZhGBkxR2oYhhGwdVcrP1m6hq27WlNtb47UMAwjYO4LG7nu4RrmvrAx1fa96a69YRhGQZh+1uiYJiG9ZfYnERmCf/xpyJAhpTbHMIzegz3+ZBiGUWzMkRqGYWTEHKlhGEZGzJEahmFkxBypYRhGRsyRGoZhZKRojlRExohIq4iMF5EXRWSRn+pukoisEJG5fruv+/StPj1TRFaKyFU+PdvvP9Wn7/fbf7xYthuGYeRDMSPS7wFvApcANwJbgNOB6cA0YIyIDAOuAD4FTPX7XQxMAL4lIgOAM4EvAFeIyIlAO3ANcGkRbTcMw0hNURypiBzl/9wKHAvUAe8Cx3VI1wHHAENVdSfQLCKDgSpVbQX6A8OBxi72jdKGYRglJ5UjFZFBXj8iItUpdvkqcE8X/w9fo0pKd/x/2m0NwzB6lMR37UXkT0CViAwHaoBTcF3xQ3EicC4wHjgVWICLPjf7z9HAKFx02eQj0YGqmhORfSLSH2jBRbRH4SLRjvtGeRmGYZScNBHpSOBf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YzuYv863Cq1p+ImYDkG+L3PZyVwmqp+V0Q24iay+C7uAfBl3s5lWSbNMCoTi0iNSuGfgbsP8l0DbiamjlzptT/wgt//Qv+/Prg3nLrafwVwGnAGzrF+xP+9AjeBxzgR+TjQ7NOGYY7UqAg+hJvWbLdPzwR+3uH7qmD7M/z2EZOBh4FlPn0RsOQg+78InAmcoqrP46YunIB7rXQI7rXhq31+h/t9bheR34lI33wPzOgdmCM1KoHJwH91SN+Gm8Mzmo9yd7D9ObjueMRi4CwORKGn4rr7nfZX1bW4CUly/l+NPr9VuCkCHwc+AWwEBvptZgDvAd2ams+ofMz5CKxZAAAAz0lEQVSRGpXAfFXdfpDv7sDN1jMP53CPxk2p1uy/b8VNr/YgsMj/7y4OTIsW21/cqgibgKf890uBLarajpvLdDUHpn8bAOzATSH4IaCm+4doVDI2aYlR0XS8uSMidwE3q+pbWfYH/hX4uaq+LSKfx61pfrDxWcMwR2pUNiJyup8QGREZC7ylqi0Z9v8icIyqXi0in8ONh35eVcPhA8PYjzlSwzCMjNgYqWEYRkbMkRqGYWTEHKlhGEZGzJEahmFkxBypYRhGRsyRGoZhZOT/A2nNJe7oUm02AAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295ec013e80>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Извлечь выборку для построения графика\n", | |
"np.random.seed(seed=7) # Задать начальное значение случайного числа, \n", | |
" # чтобы получить устойчивые результаты\n", | |
"# Случайно отобрать 70 образцов\n", | |
"samples_index = np.random.choice(range(counts.shape[1]), size=70, replace=False)\n", | |
"counts_subset = counts[:, samples_index]\n", | |
"\n", | |
"# Индивидуальная настройка меток оси Х, чтобы легче было читать графики\n", | |
"def reduce_xaxis_labels(ax, factor):\n", | |
" \"\"\"Показать только каждую i-ую метку для предотвращения скапливания на\n", | |
" оси Х, например factor = 2 будет наносить каждую вторую метку оси Х,\n", | |
" начиная с первой.\n", | |
"\n", | |
" Параметры\n", | |
" ---------\n", | |
" ax : ось графика matplotlib, подлежашая корректировке\n", | |
" factor : int, коэффициент уменьшения числа меток оси Х\n", | |
" \"\"\"\n", | |
" plt.setp(ax.xaxis.get_ticklabels(), visible=False)\n", | |
" for label in ax.xaxis.get_ticklabels()[factor-1::factor]:\n", | |
" label.set_visible(True)\n", | |
"\n", | |
"# Коробчатая диаграмма количеств экспрессии на индивидуум\n", | |
"fig, ax = plt.subplots(figsize=(4.8, 2.4))\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"ax.boxplot(counts_subset)\n", | |
"ax.set_xlabel(\"Индивидуумы\")\n", | |
"ax.set_ylabel(\"Количества экспрессии генов\")\n", | |
"reduce_xaxis_labels(ax, 5)\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_07.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 33, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAUwAAAClCAYAAAA3UsShAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAE8xJREFUeJzt3XmwJWV5x/Hv47Aqw6rDJospwhoXDCEYIsxMxoQAQ1BAiSWrBBeYSDkVRAVqRAJUUkyoQEKMBggQamRIRMfIqGS4iFYwCIKlQAKmQIkOMGzDvj75o/swh8Od2293v28v5/4+Vbfu6XtPv+/T3W8//XafPm+buyMiIsXe0HYAIiJ9oYQpIhJICVNEJJASpohIICVMEZFArSZMy8w0M2szDhGREOu0XP9GwOrVq1e3HIaICIUdN52Si4gEUsIUEQmkhCkiEkgJU0QkkBKmiExrtnBZ8HuTJUwzO8vMLjCzHc3sPjObSFWXiEgTkiRMM9sJmJVPzgAudffZ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K5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f10d6b70>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Коробчатая диаграмма количеств экспрессии генов на индивидуум\n", | |
"fig, ax = plt.subplots(figsize=(4.8, 2.4))\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"ax.boxplot(np.log(counts_subset + 1))\n", | |
"ax.set_xlabel(\"Индивидуумы\")\n", | |
"ax.set_ylabel(\"Лог-количества экспрессии генов\")\n", | |
"reduce_xaxis_labels(ax, 5)\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_08.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVgAAAClCAYAAAAZF+UzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAGmRJREFUeJztnXuQHlWZh5/XABHCICGQBBCBFckFVEC8YFAnETUbSJabCtYiRFm8hZUNZUQFKoKrVCyy7Mqu66KGRVcjsIuEmKBCMhAoUIQAJUm4BxDMVXRCgCSGd//onuSbTk/6dE/3d5vfUzXV0/11v+fX5/L26bdPnzZ3RwghRPm8rtEChBCiXZGDFUKIipCDFUKIipCDFUKIipCDFUKIimhKB2sRHWZmjdYihBBF2aXRAvpgT6C7u7u70TqEEKIvMjuATdmDFUKIdkAOVgghKkIOVgghKkIOVgghAln30ia+vfgJ1r20KWh/OVghhAhkzn3PMWP+cubc91zQ/s06ikAIIZqOqe88qNcyC2vG2bTMrIN4mFZHR0ej5QghRBoapiWEKI+8MciBjhysECKYvDHIgY5isEKIYPLGIAc6mT1YM/ukm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LHPYlyyn6bTTM7r+Q8ra33pdTTWpslaV0LDAFeBTaUpTNh10rM105gCTnaVFs7WDM73czuBjYDD5dsfi7wdSJn8FAZBs3sfDO7F+hy97/0w9R4YEIc2L+NcnRus2lml5SkEzO7wMyWAK8APyTq0T3r7utLsnku8Bvgu/3R6e7T4zjuMqIJ4vudpwmbg0vM09p6f3EZWhM231+S1iXA+4m+Uv2eMnSm2N1aVr4CI9z9JXK0fb1oIIQQFdHWPVghhGgkcrBCCFERcrBCCFERcrBCCFERcrBCCFERcrBCCFERcrCiqYgnZ5kZ//8zM+tsrCIhitPU3+QSAxczO5ZosPhCMzsHWAl0uvtMM7uV6A2lFcBM4ByiweVnAV8herliI9Eg+81Ek3MMAg5KOX4V0deNDyeaxGZ/4CexnaXAW939fDN7jmhij/OJBq13xTq7ypigRbQn6sGKZuXzwHV9/LaWaEarWj4TLwcD98XHnxBvex3RG11pxz8AvBU4msjhHhn//wDRBCdjzOwdwMvxuhDByMGKZmQU0bRwr8TrFwFX1fw+KLH/0fH+PUwE5gNd8foUYFEfx98PHAO8xd1/QzR15HuIXq/tIHrFelps7w3xMbPN7H/MbNe8JyYGFnKwohmZCHyvZv0KonlTe+b6fCWx/zii2/oebgXeyfZe6+FEYYMdjnf3J4kmcNkYb1of2/s90bSMtwHHAs8Bu8f7TAf+AvRrCkTR/sjBimbkRnd/sY/fvkM0q9FcIkc8kmhaupfj3zcRTVF3M7Ag3nYt26eV63W8RV+6eB64M/59MbDa3V8jmkt2Gdun0ns98GeiaRtHAcuLn6IYCGiyF9FS1D5UMrNrgZnuvrI/xwNfBK5y92fM7GSib933Ff8VIhg5WNFSmNlR8eTUmNloYKW7v9qP408D9nf3aWY2mSjeerK7J8MQQuRGDlYIISpCMVghhKgIOVghhKgIOVghhKgIOVghhKgIOVghhKgIOVghhKiI/weOoKeSAo1Z3wAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f2f8fef0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Нормализовать по размеру библиотеки\n", | |
"# Разделить количества экспрессии на суммы количеств\n", | |
"# для конкретного индивидуума\n", | |
"# Умножить на 1 миллион, чтобы вернуться к аналогичной шкале\n", | |
"counts_lib_norm = counts / total_counts * 1000000\n", | |
"# Обратите внимание, как здесь мы применили трансляцию дважды!\n", | |
"counts_subset_lib_norm = counts_lib_norm[:,samples_index]\n", | |
"\n", | |
"# Коробчатая диаграмма количеств экспрессии на индивидуум\n", | |
"fig, ax = plt.subplots(figsize=(4.8, 2.4))\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"ax.boxplot(np.log(counts_subset_lib_norm + 1))\n", | |
"ax.set_xlabel(\"Индивидуумы\")\n", | |
"ax.set_ylabel(\"Лог-количества экспрессии генов\")\n", | |
"reduce_xaxis_labels(ax, 5)\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_09.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import itertools as it\n", | |
"from collections import defaultdict\n", | |
"\n", | |
"def class_boxplot(data, classes, colors=None, **kwargs):\n", | |
" \"\"\"Создать коробчатую диаграмму, в которой коробки расцвечены, \n", | |
" согласно класса, к которому они принадлежат.\n", | |
"\n", | |
" Параметры\n", | |
" ---------\n", | |
" data : массивоподобный список вещественных значений\n", | |
" Входные данные. Один коробчатый график будет сгенерирован \n", | |
" для каждого элемента в `data`.\n", | |
" classes : список строковых значений той же длины, что и `data`\n", | |
" Класс, к которому принадлежит каждое распределение в `data`.\n", | |
"\n", | |
" Другие параметры\n", | |
" ----------------\n", | |
" kwargs : словарь\n", | |
" Именованные аргументы для передачи в `plt.boxplot`.\n", | |
" \"\"\"\n", | |
" all_classes = sorted(set(classes))\n", | |
" colors = plt.rcParams['axes.prop_cycle'].by_key()['color']\n", | |
" class2color = dict(zip(all_classes, it.cycle(colors)))\n", | |
"\n", | |
" # Отобразить классы на векторы данных\n", | |
" # другие классы получают пустой список в этой позиции для смещения\n", | |
" class2data = defaultdict(list)\n", | |
" for distrib, cls in zip(data, classes):\n", | |
" for c in all_classes:\n", | |
" class2data[c].append([])\n", | |
" class2data[cls][-1] = distrib\n", | |
"\n", | |
" # Затем по очереди построить каждый коробчатый график \n", | |
" # с соответствующим цветом\n", | |
" fig, ax = plt.subplots()\n", | |
" lines = []\n", | |
" for cls in all_classes:\n", | |
" # задать цвет для всех элементов коробчатого графика\n", | |
" for key in ['boxprops', 'whiskerprops', 'flierprops']:\n", | |
" kwargs.setdefault(key, {}).update(color=class2color[cls])\n", | |
" # нарисовать коробчатый график\n", | |
" box = ax.boxplot(class2data[cls], **kwargs)\n", | |
" lines.append(box['whiskers'][0])\n", | |
" ax.legend(lines, all_classes)\n", | |
" return ax" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAADQCAYAAABV2umIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAHitJREFUeJzt3Xl8VOW9x/HPD4HALWFHWRRIAhYSK41FQFrLUgQFpagVrNIKXsC22pYCLlcoDYtIVWhVbmmLAi5QXIoIFRRaDJRKFasCAoELglhlaVgMmxDCc/84kzEBAmcmnMzC9/165TWZmXPO85slvzznPOf8HnPOISIi0asU6wBERBKdEqmISDkpkYqIlJMSqYhIOSmRioiUkxKpiEg5xTSRmifVzCyWcYiIlEfloDZsZmOBms65oWZ2FTDbOZd20mI1gIKCgoKgwhAROVfK7PAF0iM1sxbAhSUeGgTsCKItEZFYCySROuc2A3MAzCwT+D/gWBBtiYjEWkUcI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uBsXiDU4VmdpmZzQMuAw7jJdOr8A4diJSiUXtJSGaW65zrHOE6M4Ec59y2CNbJAXKdc7mRtCXnF/VIRc7sZbzDACJlUo9URKScNNgkIlJOSqQiIuWkRCoiUk5KpCIi5aREKiJSTv8P+o3hwRFL77cAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f2fb07f0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"log_counts_3 = list(np.log(counts.T[:3] + 1))\n", | |
"log_ncounts_3 = list(np.log(counts_lib_norm.T[:3] + 1))\n", | |
"ax = class_boxplot(log_counts_3 + log_ncounts_3,\n", | |
" ['сырые количества'] * 3 + ['норм. по размеру библиотеки'] * 3,\n", | |
" labels=[1, 2, 3, 1, 2, 3])\n", | |
"ax.set_xlabel('номер образца')\n", | |
"ax.set_ylabel('логарифмические количества экспрессии генов')\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_10.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Нормализация между генами" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 37, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def binned_boxplot(x, y, *, # относится только к Python 3! (*см. совет в книге)\n", | |
" xlabel='длина гена (логарифмическая шкала)',\n", | |
" ylabel='срд. лог-количества'):\n", | |
" \"\"\"Построить график распределения `y` независимо от `x`, используя\n", | |
" большое число коробчатых графиков.\n", | |
" Примечание: ожидается, что все входные данные приведены в\n", | |
" логарифмическую шкалу.\n", | |
"\n", | |
" Параметры\n", | |
" ---------\n", | |
" x: Одномерный массив вещественных значений\n", | |
" Значения независимых переменных.\n", | |
" y: Одномерный массив вещественных значений\n", | |
" Значения зависимых переменных.\n", | |
" \"\"\"\n", | |
" # Определить интервалы для `x` в зависимости от плотности \n", | |
" # результатов наблюдений\n", | |
" x_hist, x_bins = np.histogram(x, bins='auto')\n", | |
"\n", | |
" # Применить `np.digitize` для нумерации интервалов\n", | |
" # Отбросить последний край интервала, потому что он нарушает допущение \n", | |
" # метода `digitize` об открытости справа. Максимальный результат наблюдения \n", | |
" # правильно попадает в последний интервал.\n", | |
" x_bin_idxs = np.digitize(x, x_bins[:-1])\n", | |
"\n", | |
" # Применить эти индексы для создания списка массивов, где каждый содержит\n", | |
" # значения`y`, соответствующие значениям `x` в последнем интервале.\n", | |
" # Этот формат входных данных ожидается на входе в `plt.boxplot`\n", | |
" binned_y = [y[x_bin_idxs == i]\n", | |
" for i in range(np.max(x_bin_idxs))]\n", | |
" fig, ax = plt.subplots(figsize=(4.8,1.3)) # \n", | |
"\n", | |
" # Создать метки оси Х, используя центры интервалов\n", | |
" x_bin_centers = (x_bins[1:] + x_bins[:-1]) / 2\n", | |
" x_ticklabels = np.round(np.exp(x_bin_centers)).astype(int)\n", | |
"\n", | |
" # Создать коробчатую диаграмму\n", | |
" ax.boxplot(binned_y, labels=x_ticklabels)\n", | |
"\n", | |
" # Показать только каждую 10-ую метку, чтобы \n", | |
" # предотвратить скапливание на оси Х\n", | |
" reduce_xaxis_labels(ax, 10)\n", | |
"\n", | |
" # Скорректировать имена осей\n", | |
" ax.set_xlabel(xlabel)\n", | |
" ax.set_ylabel(ylabel)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 38, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAABfCAYAAAC6PE+FAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAGotJREFUeJztnXmUVPWVxz9XNlllE1RExBiXxiRoghuIKCYSFAwa476gSZwo5jAwEHNiMmqYRDESJ+BMYqKA5qiDawCBGJHWCCpER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SILqRPYr+AcVTwQkY/5OKv0S7jRAb+jzmq7g0SLbr6qro5IOziHGzcE7aedgd8CL4pI+EfxIM4j1ytJ+RxOtCejE3D35GyCJoGA6iCd1wdpewVQEbkcWKmq/p9KbTkEbaOtVXV3ivQbJcScljRRRKQytC793w2NiBwB3KGq1+YRRtr8iHPT9gTwQ22iK92KyLnAV1X1Fw2dFsMs0qbM6BS/GxRV/YjcHSzHjWMHbpXbJimiAW1wTpGNMsAsUsMwjDwxi9QwDCNPTEgNwzDyxITUMAwjT0xIDcMw8sSE1DAMI09MSA3DMPLk/wG9s9OoWUWdPAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f2fb4588>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"log_counts = np.log(counts_lib_norm + 1)\n", | |
"mean_log_counts = np.mean(log_counts, axis=1) # по всем образцам\n", | |
"log_gene_lengths = np.log(gene_lengths)\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"binned_boxplot(x=log_gene_lengths, y=mean_log_counts)\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_11.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Нормализация по образцам и генам: RPKM" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 55, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Создать переменные в соответствии с формулой RPKM, чтобы легче было сравнивать\n", | |
"C = counts\n", | |
"N = np.sum(counts, axis=0)\n", | |
"#N = counts.sum(axis=0) # просуммировать каждый столбец, чтобы получить суммы (.astype(int))\n", | |
" # количеств прочтений на образец\n", | |
"L = gene_lengths # длины для каждого гена, совпадающего со строками в `C` (.astype(int))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 56, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Умножить все количества на 10^9\n", | |
"#C_tmp = 1e9 * C # 10**9 * C\n", | |
"C_tmp = 1e9 * C.astype(float)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Правила транслирования" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 57, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"C_tmp.shape (20500, 375)\n", | |
"L.shape (20500,)\n" | |
] | |
} | |
], | |
"source": [ | |
"print('C_tmp.shape', C_tmp.shape)\n", | |
"print('L.shape', L.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 58, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"C_tmp.shape (20500, 375)\n", | |
"L.shape (20500, 1)\n" | |
] | |
} | |
], | |
"source": [ | |
"L = L[:, np.newaxis] # добавить размерность в L со значением 1\n", | |
"print('C_tmp.shape', C_tmp.shape)\n", | |
"print('L.shape', L.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 59, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Разделить каждую строку на длину гена для этого гена (L)\n", | |
"C_tmp = C_tmp / L" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 60, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"C_tmp.shape (20500, 375)\n", | |
"N.shape (375,)\n" | |
] | |
} | |
], | |
"source": [ | |
"# N = counts.sum(axis=0) # просуммировать каждый столбец, чтобы получить суммы\n", | |
" # количеств прочтений на образец\n", | |
"\n", | |
"# Проверить формы массивов C_tmp и N\n", | |
"print('C_tmp.shape', C_tmp.shape)\n", | |
"print('N.shape', N.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 61, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"C_tmp.shape (20500, 375)\n", | |
"N.shape (1, 375)\n" | |
] | |
} | |
], | |
"source": [ | |
"# Добавить в N дополнительную размерность\n", | |
"N = N[np.newaxis, :]\n", | |
"print('C_tmp.shape', C_tmp.shape)\n", | |
"print('N.shape', N.shape)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 62, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"# Разделить каждый столбец на суммы количеств для этого столбца (N)\n", | |
"rpkm_counts = C_tmp / N" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 63, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def rpkm(counts, lengths):\n", | |
" \"\"\"Вычислить прочтения на тысячу оснований экзона на миллион \n", | |
" картированных прочтений.\n", | |
"\n", | |
" RPKM = (10^9 * C) / (N * L)\n", | |
"\n", | |
" где:\n", | |
" C = количества прочтений, картированных на ген\n", | |
" N = суммы количеств картированных (выровненных) прочтений в эксперименте\n", | |
" L = длина экзона в парах оснований для гена\n", | |
"\n", | |
" Параметры\n", | |
" ---------\n", | |
" counts: массив, форма (N_genes, N_samples)\n", | |
" РНК-сек (или подобные) количественные данные, где столбцы являются \n", | |
" отдельными образцами, и строки - генами.\n", | |
" lengths: массив, форма (N_genes,)\n", | |
" Длины генов в парах оснований в том же порядке, что и\n", | |
" строки в counts.\n", | |
"\n", | |
" Возвращает\n", | |
" ----------\n", | |
" normed: массив, форма (N_genes, N_samples)\n", | |
" Матрица количеств counts, нормализованная согласно RPKM.\n", | |
" \"\"\"\n", | |
" C = counts.astype(float) # use float to avoid overflow with `1e9 * C`\n", | |
" ####N = np.sum(C, axis=0) # sum each column to get total reads per sample\n", | |
" N = np.sum(counts, axis=0) # sum each column to get total reads per sample\n", | |
" L = lengths \n", | |
" \n", | |
" \n", | |
" #N = np.sum(counts, axis=0) # просуммировать каждый столбец, чтобы \n", | |
" # получить суммы количеств прочтений на образец\n", | |
" #L = lengths\n", | |
" #C = counts\n", | |
"\n", | |
" normed = 1e9 * C / (N[np.newaxis, :] * L[:, np.newaxis])\n", | |
"\n", | |
" return(normed)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 64, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"counts_rpkm = rpkm(counts, gene_lengths)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### RPKM между нормализацией генов" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 65, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAABfCAYAAAC6PE+FAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAG0FJREFUeJztnXmUFNW9xz8/YMBhk01ACAgGNQxG0YgrKqiJioLikrgrLvhiSA4Pn8S8aIKEl7hE4nviOYkboHkGEZcHiJi4jIqAEg2gDmJUQojCIAPIPgzwe3/cWz3VNdXd1dt093A/5/Spru3eW7eqvvW72++KquJwOByOzGlW6AQ4HA5HqeOE1OFwOLLECanD4XBkiRNSh8PhyBInpA6Hw5ElTkgdDocjS5yQOhwOR5Y4IXU4HI4sSSmkIvKQiLwpIjUi8rqIfNgYCXM4HI5SIYpFeoyqngZUARcDu/KbJIfD4Sgtogjpj+3yXuAJYEr+kuNwOBylR4sIx3whIucAi4E+wNK8psjhcDhKjCgW6bPAAOADYCPwWF5T5HA4HCVGFCEtBzYAmzEWbBQr1uFwOPYbJJUbPREZAXT0bdqkqrNzErmIAG2Bber8+TkcjhIlinV5kapel6f42wJbtmzZkqfgHQ6HI2dIoh1RhPQCEXnNF5Cq6hk5SZbD4XA0AaLUkS5V1TPsb6gTUUexI7fOycuxDkci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HVXxc6LfszziJt+oxN8L+gqOo/yczBcjpxbMPMdtskRdTSGuMc2VFAnEXqcDgcWeIsUofD4cgSJ6QOh8ORJU5IHQ6HI0uckDocDkeWOCF1OByOLHFC6nA4HFny/0qtVdCWs3nUAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x295f279f128>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"log_counts = np.log(counts + 1)\n", | |
"mean_log_counts = np.mean(log_counts, axis=1)\n", | |
"log_gene_lengths = np.log(gene_lengths)\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"binned_boxplot(x=log_gene_lengths, y=mean_log_counts)\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_12.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 66, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"c:\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: RuntimeWarning: invalid value encountered in log\n", | |
" \"\"\"Entry point for launching an IPython kernel.\n", | |
"c:\\python36\\lib\\site-packages\\numpy\\lib\\function_base.py:4291: RuntimeWarning: Invalid value encountered in percentile\n", | |
" interpolation=interpolation)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1856: RuntimeWarning: invalid value encountered in less_equal\n", | |
" wiskhi = np.compress(x <= hival, x)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1863: RuntimeWarning: invalid value encountered in greater_equal\n", | |
" wisklo = np.compress(x >= loval, x)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1871: RuntimeWarning: invalid value encountered in less\n", | |
" np.compress(x < stats['whislo'], x),\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1872: RuntimeWarning: invalid value encountered in greater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wuZ4bkHqxVY8DXwGcJGkEaY7TKbktIM09+thK2mEMAzRFnDXmQLp6upw0K9XFpJ7iZcAFpefcQAo89TxNCqbfJf2E7CX3zhZKekDSkXVe/xApqE6n94d9AanndzFpWriaW0g/s08E/qWU1kJJv6AnwG5PmsDiR3XqcS+pV/ox0tUBP6Sn13YuvXt090bEC3XKDmkSjlPz8dMxwA+AuZJqXxRXkWbhmleq58HUn93oo6R9sjf5kEC2PJfz5Fy2eUBIOgZ4LiKKXyor2iEfG10vIv6vn/LbAPOkJashSd213mXx9nCT9BHg3Ig4oY00VlofpanbbgK+HEO0Cu5Qk7QfsGNEnD/cZVlduEe6eprez+1hFRH/TfMTLDebx5ukFXDfl0E0W580UbINEfdIzcza5B6pmVmbHEjNzNrkQGpm1iYHUjOzNjmQmpm1yYHUzKxN/w+/qgMo2pCSfQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x29586b58978>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"log_counts = np.log(counts_rpkm + 1)\n", | |
"mean_log_counts = np.mean(log_counts, axis=1)\n", | |
"log_gene_lengths = np.log(gene_lengths)\n", | |
"\n", | |
"#with plt.style.context('style/thinner.mplstyle'):\n", | |
"binned_boxplot(x=log_gene_lengths, y=mean_log_counts)\n", | |
"plt.tight_layout()\n", | |
"#plt.savefig('pics/1_13.png', dpi=600) " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 144, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"c:\\python36\\lib\\site-packages\\ipykernel_launcher.py:7: RuntimeWarning: invalid value encountered in log\n", | |
" import sys\n" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAADPCAYAAACnWlnGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0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oa2C0v1fk+/Z5La/zulVdeoaKigr/85S/s27evxvU++eQTjj/+eBYuXMjAgQO57rrralx337593HfffaxatYpzzz2X1atX06NHj/3fl5eX8+STT7JgwQLmzZtH8+bNWb58OYMGDWLMmDEAdOrU6aBkCbBnzx6mTp3K1VdfzeGqEd5///1MmTKF9evX85Of/ITRo0ezaNEi1q5di7vzgx/8gJKSElasWEHLli256667mDt3LrNnz2bhwoWcdtpprFy5kqeffpoZM2Ywbdq0I/5dRRqj2ERayoEk6sAraQV0OEdKemlYvnw5Q4cOBaBJk3DRfvHFF9O/f3+efvrpQ9Zv3rw5AwYM4O233wZgypQpPP7448ycOXP/Olu3bmX16tX079+fHTt2sGXLloMS6b333sttt91Gu3btWLFiBWeeeSatW7fmhBNOYMOGDbRt25Z27dodcuyf/vSnDBs2DIATTjiB995776DvV61axQsvvADApZdeyvLlyznrrLMws8MmXoALLriAbdu28c4777B27VpGjRrFhg0bGD58ePTfUKQxiW3azwM2EkYmfYZ6TqT1bd++fYckmblz5/K5z32OJ5988rDbNGnShIqKCgAmTZrEpEmTuOOOO/Z/7+7079+fVatWsX79eoYMGXLQ9oMHD2bevHn7l6sff82aNZx00kmHHPe5557jyiuvBKBfv350796dvn378uGHH+4/7osvvsjq1auZNm3aYX+36srKyrj77ru5++67eeihhxgzZgyPPPLIEbcRacxiE+m/A58Ci4C5hAdODVafPn1YtGgREBJRpVatWrFnz6HjCSoqKli2bNlBV5jV1+3QoQObNm1i48aN7N69+5B9XHLJJezdu5eysjL69evH0qVL+fjjj9m8eTOdO3fm2WefPewV4dChQ2na9EDD4qmnnmLlypW0b98egL59+1JWVgbA7t276dOnD4sXL8bdOVLXtxYtWrBr1y4qKipo2bJljeuJSHwiXeDus4Hr3X0JsCLFmAruoosuYs+ePfTs2ZMFCxbQsWNHRowYQVlZ2f6rv0rLli3jlFNOYcSIEZx44om0b9+eKVOmMH78eCZMmLB/vSZNmnDHHXcwZMiQGpvIP/rRj7jzzju58MILKS8v59RTT+W73/0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JkxKpiEie/j+JtZC9C2wM6wAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x2040f5df7f0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"gene_idxs = np.array([80, 186])\n", | |
"gene1, gene2 = gene_names[gene_idxs]\n", | |
"len1, len2 = gene_lengths[gene_idxs]\n", | |
"gene_labels = [f'{gene1}, {len1}bp', f'{gene2}, {len2}bp']\n", | |
"\n", | |
"log_counts = list(np.log(counts[gene_idxs] + 1))\n", | |
"log_ncounts = list(np.log(counts_rpkm[gene_idxs] + 1))\n", | |
"\n", | |
"ax = class_boxplot(log_counts,\n", | |
" ['сырые количества'] * 3,\n", | |
" labels=gene_labels)\n", | |
"ax.set_xlabel('Гены')\n", | |
"ax.set_ylabel('лог-количества экспрессии генов по всем образцам')\n", | |
"plt.tight_layout()\n", | |
"plt.savefig('pics/1_14.png', dpi=600)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 145, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"c:\\python36\\lib\\site-packages\\numpy\\lib\\function_base.py:4291: RuntimeWarning: Invalid value encountered in percentile\n", | |
" interpolation=interpolation)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1856: RuntimeWarning: invalid value encountered in less_equal\n", | |
" wiskhi = np.compress(x <= hival, x)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1863: RuntimeWarning: invalid value encountered in greater_equal\n", | |
" wisklo = np.compress(x >= loval, x)\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1871: RuntimeWarning: invalid value encountered in less\n", | |
" np.compress(x < stats['whislo'], x),\n", | |
"c:\\python36\\lib\\site-packages\\matplotlib\\cbook\\__init__.py:1872: RuntimeWarning: invalid value encountered in greater\n", | |
" np.compress(x > stats['whishi'], x)\n" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVIAAADQCAYAAABV2umIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAGWZJREFUeJzt3Xt4VdWZx/HvK0KCELAUIQqWBAOFUEALolCUQMUCtZRSGHHsCIq0Xp7W+4ziDMUb4DNqlbGOYyuDzjjVqlweNYAdNRWv5SKCFgoUsaWBpozckoBgeOePvQmHkJAdTk5Odvh9nofnnL2yz17vCZuXtddeey1zd0RE5PidlO4ARETiTolURCRJSqQiIklSIhURSVIsEqkFsszM0h2LiEhVJ6c7gIhaA7t3796d7jhE5MRVY0MuFi1SEZHGTIlURCRJSqQiIklSIhURSZISqYhIkpRIRUSSpEQqIpIkJVIRkSQpkYqIJEmJVEQkSUqkIo1AcXExubm5dOvWjSuuuIKKigq6du1K9+7dGTVqFLt27WLz5s2cf/75APz85z/n1ltvBeCss87i7bffrjzWxRdfzFNPPZWW73GiqnMiNbNTzKxdKoIROVHt37+fjh07smHDBg4ePMiCBQsoLy9n/fr19OvXj0cffbRy388++4zHHnuMadOmAVBWVsavf/1rALZv384777zDrl270vI9TlS1JlIzW2Nm75rZfDObB/wn8LPUhyZyYurfvz8bNmyo3B40aBCbNm2q3J46dSq33XYbbdq0AaBz58588MEHuDsvvfQSI0aMOCqRTp8+nccffxyA7OxsAFavXk1+fj7nnHMOf/rTnwDo2bMneXl53HjjjQB88skntGrVin379rF582aaNWvGwYMHKS0tpWfPnuTm5rJ69WoAioqKyMrKomPHjtx+++0AFBQUAHD55ZdTVFTE/fffT9euXRk7diwHDx6sNoa8vDzy8vIYMmQIZWVlFBUV0bVrVwYOHEh5efkRLfNJkyaxePFiioqKmDBhQmWd69atY+7cuZVxAEd8rrCwkO7duz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CSV76EMxlMCm90ciJQIlUmqJ2BPNfzieY3g2ChPpswj7D1QUg9UWJVJqincAydy9w978Py+YCExL2+Q3B5BlXNnBs0gQpkUqT4+7lwIfh0i2XVrPLfmAQ8BiwsEGDkyZJz9qLiCRJLVIRkSQpkYqIJEmJVEQkSUqkIiJJUiIVEUmSEqmISJKUSEVEkvT/9vWV5E7muhgAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x2040f2475c0>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"ax = class_boxplot(log_ncounts,\n", | |
" ['RPKM-нормализованные'] * 3,\n", | |
" labels=gene_labels)\n", | |
"ax.set_xlabel('Гены')\n", | |
"ax.set_ylabel('лог.количества по всем образцам после RPKM');\n", | |
"plt.tight_layout()\n", | |
"#plt.savefig('pics/1_15.png', dpi=600)" | |
] | |
}, | |
{ | |
"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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment