diff --git a/interactomes/PCNet.05_2018.oi2 b/interactomes/PCNet.05_2018.oi2 new file mode 100644 index 0000000..c169121 --- /dev/null +++ b/interactomes/PCNet.05_2018.oi2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18bba1b9612ffde9b729deac04216a666da50c8ac4571e7726cd6bb9ca406d41 +size 44161527 diff --git a/interactomes/PreProcess_PCNet_For_OmicsIntegrator.ipynb b/interactomes/PreProcess_PCNet_For_OmicsIntegrator.ipynb new file mode 100644 index 0000000..86b270d --- /dev/null +++ b/interactomes/PreProcess_PCNet_For_OmicsIntegrator.ipynb @@ -0,0 +1,242 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# PreProcessing PCNet for OmicsIntegrator\n", + "\n", + "All Fraenkel-lab interactomes have been pre-processed to have 3 columns: 2 interactors and a scalar confidence\n", + "However, OmicsIntegrator requires that edges have a cost, not a confidence. This notebook sets costs on the edges and augments those interactomes for use in OmicsIntegrator." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
protein1protein2confidence
0A1BGA2MNaN
1A1BGABCC6NaN
2A1BGACOT12NaN
3A1BGADH1ANaN
4A1BGADH4NaN
\n", + "
" + ], + "text/plain": [ + " protein1 protein2 confidence\n", + "0 A1BG A2M NaN\n", + "1 A1BG ABCC6 NaN\n", + "2 A1BG ACOT12 NaN\n", + "3 A1BG ADH1A NaN\n", + "4 A1BG ADH4 NaN" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pcnet = pd.read_pickle(\"../../interactomes/PCNet/PCNet.05_2018.cleaned.namespace-mapped.full.pickle\")\n", + "pcnet.head()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### PCNet is relatively unique in that we don't have confidences for the edges. We'll need to set them arbitrarily" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
protein1protein2cost
0A1BGA2M1.0
1A1BGABCC61.0
2A1BGACOT121.0
3A1BGADH1A1.0
4A1BGADH41.0
\n", + "
" + ], + "text/plain": [ + " protein1 protein2 cost\n", + "0 A1BG A2M 1.0\n", + "1 A1BG ABCC6 1.0\n", + "2 A1BG ACOT12 1.0\n", + "3 A1BG ADH1A 1.0\n", + "4 A1BG ADH4 1.0" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pcnet['cost'] = 1.0\n", + "del pcnet['confidence']\n", + "\n", + "pcnet.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "pcnet.to_csv('PCNet.05_2018.oi2', sep='\\t', index=False)\n" + ] + }, + { + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}