{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Importing necessary packages\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib\n",
    "matplotlib.use('tkagg')\n",
    "import os\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "from sklearn.decomposition import PCA\n",
    "from sklearn.manifold import TSNE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Importing in full data set\n",
    "os.chdir('Path/To/Data')\n",
    "indA = pd.read_csv('IndA/20190517_IndA_RowSum.csv', index_col=0)\n",
    "indB = pd.read_csv('IndB/20190517_IndB_RowSum.csv', index_col=0)\n",
    "indC = pd.read_csv('IndC/20190517_IndC_RowSum.csv', index_col=0)\n",
    "unA = pd.read_csv('UnA/20190517_UnA_RowSum.csv', index_col=0)\n",
    "unB = pd.read_csv('UnB/20190517_UnB_RowSum.csv', index_col=0)\n",
    "unC = pd.read_csv('UnC/20190517_UnC_RowSum.csv', index_col=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5980\n"
     ]
    }
   ],
   "source": [
    "# Find common proteins across all six sets\n",
    "# From those common proteins, analyze potential markers and overlap with Itzhak      \n",
    "dflist = [unA, unB, unC, indA, indB, indC]\n",
    "common = pd.concat(dflist, axis=1, join='inner')\n",
    "tokeep = list(common.index)\n",
    "print(len(tokeep))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Aaron Oom\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:3: FutureWarning: The signature of `Series.to_csv` was aligned to that of `DataFrame.to_csv`, and argument 'header' will change its default value from False to True: please pass an explicit value to suppress this warning.\n",
      "  This is separate from the ipykernel package so we can avoid doing imports until\n"
     ]
    }
   ],
   "source": [
    "# Converting common proteins to csv to feed into Metascape\n",
    "uniprot = pd.Series(tokeep)\n",
    "uniprot.to_csv('CommonJurkatTREHIVwt2Proteins.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index(['Protein', 'Gene Symbol', 'Description',\n",
      "       'Subcellular Location (Protein Atlas)'],\n",
      "      dtype='object')\n"
     ]
    },
    {
     "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>Protein</th>\n",
       "      <th>Gene Symbol</th>\n",
       "      <th>Description</th>\n",
       "      <th>Subcellular Location (Protein Atlas)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>HIVNL43_GAG|gag</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>P01737</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>A0A0U1RQE8</td>\n",
       "      <td>GLYATL1B</td>\n",
       "      <td>glycine-N-acyltransferase like 1B</td>\n",
       "      <td>Cytosol;Golgi apparatus(Uncertain)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>A0A0U1RRE5</td>\n",
       "      <td>NBDY</td>\n",
       "      <td>negative regulator of P-body association</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>A0A1B0GTK4</td>\n",
       "      <td>FAM237A</td>\n",
       "      <td>family with sequence similarity 237 member A</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>A0A1B0GUA9</td>\n",
       "      <td>C13orf46</td>\n",
       "      <td>chromosome 13 open reading frame 46</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>A0A1B0GUY1</td>\n",
       "      <td>MARCOL</td>\n",
       "      <td>MARCO like</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>A0A1B0GVM5</td>\n",
       "      <td>ETDC</td>\n",
       "      <td>embryonic testis differentiation homolog C</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>A0AVT1</td>\n",
       "      <td>UBA6</td>\n",
       "      <td>ubiquitin like modifier activating enzyme 6</td>\n",
       "      <td>Cytosol;Nucleoplasm(Enhanced)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>A0FGR8</td>\n",
       "      <td>ESYT2</td>\n",
       "      <td>extended synaptotagmin 2</td>\n",
       "      <td>Cytosol(Uncertain)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>A0JLT2</td>\n",
       "      <td>MED19</td>\n",
       "      <td>mediator complex subunit 19</td>\n",
       "      <td>Nuclear bodies(Supported)Nucleus(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>A0PJZ3</td>\n",
       "      <td>GXYLT2</td>\n",
       "      <td>glucoside xylosyltransferase 2</td>\n",
       "      <td>Cytokinetic bridge;Midbody ring;Nucleoplasm(Ap...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>A0PK00</td>\n",
       "      <td>TMEM120B</td>\n",
       "      <td>transmembrane protein 120B</td>\n",
       "      <td>Cytosol;Nucleoli fibrillar center(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>A1A5C7</td>\n",
       "      <td>SLC22A23</td>\n",
       "      <td>solute carrier family 22 member 23</td>\n",
       "      <td>Cytosol;Nucleoplasm;Vesicles(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>A1L020</td>\n",
       "      <td>MEX3A</td>\n",
       "      <td>mex-3 RNA binding family member A</td>\n",
       "      <td>Cytosol(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>A1L0T0</td>\n",
       "      <td>ILVBL</td>\n",
       "      <td>ilvB acetolactate synthase like</td>\n",
       "      <td>Golgi apparatus;Vesicles(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>A1L190</td>\n",
       "      <td>SYCE3</td>\n",
       "      <td>synaptonemal complex central element protein 3</td>\n",
       "      <td>Golgi apparatus;Nucleoli;Nucleus(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>A1X283</td>\n",
       "      <td>SH3PXD2B</td>\n",
       "      <td>SH3 and PX domains 2B</td>\n",
       "      <td>Nucleoli fibrillar center;Nucleus(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>A1XBS5</td>\n",
       "      <td>FAM92A</td>\n",
       "      <td>family with sequence similarity 92 member A</td>\n",
       "      <td>Mitochondria(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>A2RRP1</td>\n",
       "      <td>NBAS</td>\n",
       "      <td>neuroblastoma amplified sequence</td>\n",
       "      <td>Golgi apparatus;Nuclear membrane;Nucleoli(Appr...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>A2RU30</td>\n",
       "      <td>TESPA1</td>\n",
       "      <td>thymocyte expressed, positive selection associ...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>A2RU67</td>\n",
       "      <td>FAM234B</td>\n",
       "      <td>family with sequence similarity 234 member B</td>\n",
       "      <td>Endoplasmic reticulum(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>A2RUS2</td>\n",
       "      <td>DENND3</td>\n",
       "      <td>DENN domain containing 3</td>\n",
       "      <td>Cytosol;Vesicles(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>A2VDJ0</td>\n",
       "      <td>TMEM131L</td>\n",
       "      <td>transmembrane 131 like</td>\n",
       "      <td>Vesicles(Approved)Nucleoli fibrillar center(Un...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>A3KMH1</td>\n",
       "      <td>VWA8</td>\n",
       "      <td>von Willebrand factor A domain containing 8</td>\n",
       "      <td>Lipid droplets;Vesicles(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>A3KN83</td>\n",
       "      <td>SBNO1</td>\n",
       "      <td>strawberry notch homolog 1</td>\n",
       "      <td>Nucleoplasm(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>A4D1E9</td>\n",
       "      <td>GTPBP10</td>\n",
       "      <td>GTP binding protein 10</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>A4D1P6</td>\n",
       "      <td>WDR91</td>\n",
       "      <td>WD repeat domain 91</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>A4D1U4</td>\n",
       "      <td>KIAA1147</td>\n",
       "      <td>KIAA1147</td>\n",
       "      <td>Golgi apparatus(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>A4FU01</td>\n",
       "      <td>MTMR11</td>\n",
       "      <td>myotubularin related protein 11</td>\n",
       "      <td>Centrosome(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5949</th>\n",
       "      <td>Q9Y6D9</td>\n",
       "      <td>MAD1L1</td>\n",
       "      <td>mitotic arrest deficient 1 like 1</td>\n",
       "      <td>Nuclear membrane;Nucleoplasm(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5950</th>\n",
       "      <td>Q9Y6E0</td>\n",
       "      <td>STK24</td>\n",
       "      <td>serine/threonine kinase 24</td>\n",
       "      <td>Cytosol;Nucleoli(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5951</th>\n",
       "      <td>Q9Y6E2</td>\n",
       "      <td>BZW2</td>\n",
       "      <td>basic leucine zipper and W2 domains 2</td>\n",
       "      <td>Actin filaments;Cytosol;Plasma membrane(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5952</th>\n",
       "      <td>Q9Y6G5</td>\n",
       "      <td>COMMD10</td>\n",
       "      <td>COMM domain containing 10</td>\n",
       "      <td>Cytosol(Supported)Plasma membrane(Uncertain)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5953</th>\n",
       "      <td>Q9Y6G9</td>\n",
       "      <td>DYNC1LI1</td>\n",
       "      <td>dynein cytoplasmic 1 light intermediate chain 1</td>\n",
       "      <td>Centrosome;Cytosol(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5954</th>\n",
       "      <td>Q9Y6H3</td>\n",
       "      <td>ATP23</td>\n",
       "      <td>ATP23 metallopeptidase and ATP synthase assemb...</td>\n",
       "      <td>Plasma membrane;Vesicles(Enhanced)Cell Junctio...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5955</th>\n",
       "      <td>Q9Y6I3</td>\n",
       "      <td>EPN1</td>\n",
       "      <td>epsin 1</td>\n",
       "      <td>Cytosol(Enhanced)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5956</th>\n",
       "      <td>Q9Y6I4</td>\n",
       "      <td>USP3</td>\n",
       "      <td>ubiquitin specific peptidase 3</td>\n",
       "      <td>Nucleoplasm(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5957</th>\n",
       "      <td>Q9Y6I8</td>\n",
       "      <td>PXMP4</td>\n",
       "      <td>peroxisomal membrane protein 4</td>\n",
       "      <td>Nucleoli fibrillar center;Peroxisomes(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5958</th>\n",
       "      <td>Q9Y6I9</td>\n",
       "      <td>TEX264</td>\n",
       "      <td>testis expressed 264</td>\n",
       "      <td>Cytosol;Nucleoli(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5959</th>\n",
       "      <td>Q9Y6J0</td>\n",
       "      <td>CABIN1</td>\n",
       "      <td>calcineurin binding protein 1</td>\n",
       "      <td>Aggresome;Cytosol;Nucleoplasm(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5960</th>\n",
       "      <td>Q9Y6J9</td>\n",
       "      <td>TAF6L</td>\n",
       "      <td>TATA-box binding protein associated factor 6 like</td>\n",
       "      <td>Nucleoplasm(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5961</th>\n",
       "      <td>Q9Y6K0</td>\n",
       "      <td>CEPT1</td>\n",
       "      <td>choline/ethanolamine phosphotransferase 1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5962</th>\n",
       "      <td>Q9Y6K5</td>\n",
       "      <td>OAS3</td>\n",
       "      <td>2'-5'-oligoadenylate synthetase 3</td>\n",
       "      <td>Cytosol;Nucleoplasm(Supported)Plasma membrane(...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5963</th>\n",
       "      <td>Q9Y6M1</td>\n",
       "      <td>IGF2BP2</td>\n",
       "      <td>insulin like growth factor 2 mRNA binding prot...</td>\n",
       "      <td>Cytosol(Enhanced)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5964</th>\n",
       "      <td>Q9Y6M4</td>\n",
       "      <td>CSNK1G3</td>\n",
       "      <td>casein kinase 1 gamma 3</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5965</th>\n",
       "      <td>Q9Y6M7</td>\n",
       "      <td>SLC4A7</td>\n",
       "      <td>solute carrier family 4 member 7</td>\n",
       "      <td>Focal adhesion sites;Plasma membrane(Supported...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5966</th>\n",
       "      <td>Q9Y6M9</td>\n",
       "      <td>NDUFB9</td>\n",
       "      <td>NADH:ubiquinone oxidoreductase subunit B9</td>\n",
       "      <td>Mitochondria(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5967</th>\n",
       "      <td>Q9Y6Q9</td>\n",
       "      <td>NCOA3</td>\n",
       "      <td>nuclear receptor coactivator 3</td>\n",
       "      <td>Cytosol;Nucleoplasm(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5968</th>\n",
       "      <td>Q9Y6R1</td>\n",
       "      <td>SLC4A4</td>\n",
       "      <td>solute carrier family 4 member 4</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5969</th>\n",
       "      <td>Q9Y6R4</td>\n",
       "      <td>MAP3K4</td>\n",
       "      <td>mitogen-activated protein kinase kinase kinase 4</td>\n",
       "      <td>Cytosol(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5970</th>\n",
       "      <td>Q9Y6R9</td>\n",
       "      <td>CCDC61</td>\n",
       "      <td>coiled-coil domain containing 61</td>\n",
       "      <td>Nucleus(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5971</th>\n",
       "      <td>Q9Y6W3</td>\n",
       "      <td>CAPN7</td>\n",
       "      <td>calpain 7</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5972</th>\n",
       "      <td>Q9Y6W5</td>\n",
       "      <td>WASF2</td>\n",
       "      <td>WASP family member 2</td>\n",
       "      <td>Cytosol;Plasma membrane(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5973</th>\n",
       "      <td>Q9Y6X1</td>\n",
       "      <td>SERP1</td>\n",
       "      <td>stress associated endoplasmic reticulum protein 1</td>\n",
       "      <td>Endoplasmic reticulum(Approved)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5974</th>\n",
       "      <td>Q9Y6X4</td>\n",
       "      <td>FAM169A</td>\n",
       "      <td>family with sequence similarity 169 member A</td>\n",
       "      <td>Nuclear membrane(Enhanced)Cytosol(Uncertain)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5975</th>\n",
       "      <td>Q9Y6X5</td>\n",
       "      <td>ENPP4</td>\n",
       "      <td>ectonucleotide pyrophosphatase/phosphodiestera...</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5976</th>\n",
       "      <td>Q9Y6X9</td>\n",
       "      <td>MORC2</td>\n",
       "      <td>MORC family CW-type zinc finger 2</td>\n",
       "      <td>Cytosol;Nucleus(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5977</th>\n",
       "      <td>Q9Y6Y0</td>\n",
       "      <td>IVNS1ABP</td>\n",
       "      <td>influenza virus NS1A binding protein</td>\n",
       "      <td>Cytosol(Supported)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5978</th>\n",
       "      <td>Q9Y6Y8</td>\n",
       "      <td>SEC23IP</td>\n",
       "      <td>SEC23 interacting protein</td>\n",
       "      <td>Vesicles(Enhanced)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5979 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              Protein Gene Symbol  \\\n",
       "0     HIVNL43_GAG|gag        None   \n",
       "1              P01737        None   \n",
       "2          A0A0U1RQE8    GLYATL1B   \n",
       "3          A0A0U1RRE5        NBDY   \n",
       "4          A0A1B0GTK4     FAM237A   \n",
       "5          A0A1B0GUA9    C13orf46   \n",
       "6          A0A1B0GUY1      MARCOL   \n",
       "7          A0A1B0GVM5        ETDC   \n",
       "8              A0AVT1        UBA6   \n",
       "9              A0FGR8       ESYT2   \n",
       "10             A0JLT2       MED19   \n",
       "11             A0PJZ3      GXYLT2   \n",
       "12             A0PK00    TMEM120B   \n",
       "13             A1A5C7    SLC22A23   \n",
       "14             A1L020       MEX3A   \n",
       "15             A1L0T0       ILVBL   \n",
       "16             A1L190       SYCE3   \n",
       "17             A1X283    SH3PXD2B   \n",
       "18             A1XBS5      FAM92A   \n",
       "19             A2RRP1        NBAS   \n",
       "20             A2RU30      TESPA1   \n",
       "21             A2RU67     FAM234B   \n",
       "22             A2RUS2      DENND3   \n",
       "23             A2VDJ0    TMEM131L   \n",
       "24             A3KMH1        VWA8   \n",
       "25             A3KN83       SBNO1   \n",
       "26             A4D1E9     GTPBP10   \n",
       "27             A4D1P6       WDR91   \n",
       "28             A4D1U4    KIAA1147   \n",
       "29             A4FU01      MTMR11   \n",
       "...               ...         ...   \n",
       "5949           Q9Y6D9      MAD1L1   \n",
       "5950           Q9Y6E0       STK24   \n",
       "5951           Q9Y6E2        BZW2   \n",
       "5952           Q9Y6G5     COMMD10   \n",
       "5953           Q9Y6G9    DYNC1LI1   \n",
       "5954           Q9Y6H3       ATP23   \n",
       "5955           Q9Y6I3        EPN1   \n",
       "5956           Q9Y6I4        USP3   \n",
       "5957           Q9Y6I8       PXMP4   \n",
       "5958           Q9Y6I9      TEX264   \n",
       "5959           Q9Y6J0      CABIN1   \n",
       "5960           Q9Y6J9       TAF6L   \n",
       "5961           Q9Y6K0       CEPT1   \n",
       "5962           Q9Y6K5        OAS3   \n",
       "5963           Q9Y6M1     IGF2BP2   \n",
       "5964           Q9Y6M4     CSNK1G3   \n",
       "5965           Q9Y6M7      SLC4A7   \n",
       "5966           Q9Y6M9      NDUFB9   \n",
       "5967           Q9Y6Q9       NCOA3   \n",
       "5968           Q9Y6R1      SLC4A4   \n",
       "5969           Q9Y6R4      MAP3K4   \n",
       "5970           Q9Y6R9      CCDC61   \n",
       "5971           Q9Y6W3       CAPN7   \n",
       "5972           Q9Y6W5       WASF2   \n",
       "5973           Q9Y6X1       SERP1   \n",
       "5974           Q9Y6X4     FAM169A   \n",
       "5975           Q9Y6X5       ENPP4   \n",
       "5976           Q9Y6X9       MORC2   \n",
       "5977           Q9Y6Y0    IVNS1ABP   \n",
       "5978           Q9Y6Y8     SEC23IP   \n",
       "\n",
       "                                            Description  \\\n",
       "0                                                  None   \n",
       "1                                                  None   \n",
       "2                     glycine-N-acyltransferase like 1B   \n",
       "3              negative regulator of P-body association   \n",
       "4          family with sequence similarity 237 member A   \n",
       "5                   chromosome 13 open reading frame 46   \n",
       "6                                            MARCO like   \n",
       "7            embryonic testis differentiation homolog C   \n",
       "8           ubiquitin like modifier activating enzyme 6   \n",
       "9                              extended synaptotagmin 2   \n",
       "10                          mediator complex subunit 19   \n",
       "11                       glucoside xylosyltransferase 2   \n",
       "12                           transmembrane protein 120B   \n",
       "13                   solute carrier family 22 member 23   \n",
       "14                    mex-3 RNA binding family member A   \n",
       "15                      ilvB acetolactate synthase like   \n",
       "16       synaptonemal complex central element protein 3   \n",
       "17                                SH3 and PX domains 2B   \n",
       "18          family with sequence similarity 92 member A   \n",
       "19                     neuroblastoma amplified sequence   \n",
       "20    thymocyte expressed, positive selection associ...   \n",
       "21         family with sequence similarity 234 member B   \n",
       "22                             DENN domain containing 3   \n",
       "23                               transmembrane 131 like   \n",
       "24          von Willebrand factor A domain containing 8   \n",
       "25                           strawberry notch homolog 1   \n",
       "26                               GTP binding protein 10   \n",
       "27                                  WD repeat domain 91   \n",
       "28                                             KIAA1147   \n",
       "29                      myotubularin related protein 11   \n",
       "...                                                 ...   \n",
       "5949                  mitotic arrest deficient 1 like 1   \n",
       "5950                         serine/threonine kinase 24   \n",
       "5951              basic leucine zipper and W2 domains 2   \n",
       "5952                          COMM domain containing 10   \n",
       "5953    dynein cytoplasmic 1 light intermediate chain 1   \n",
       "5954  ATP23 metallopeptidase and ATP synthase assemb...   \n",
       "5955                                            epsin 1   \n",
       "5956                     ubiquitin specific peptidase 3   \n",
       "5957                     peroxisomal membrane protein 4   \n",
       "5958                               testis expressed 264   \n",
       "5959                      calcineurin binding protein 1   \n",
       "5960  TATA-box binding protein associated factor 6 like   \n",
       "5961          choline/ethanolamine phosphotransferase 1   \n",
       "5962                  2'-5'-oligoadenylate synthetase 3   \n",
       "5963  insulin like growth factor 2 mRNA binding prot...   \n",
       "5964                            casein kinase 1 gamma 3   \n",
       "5965                   solute carrier family 4 member 7   \n",
       "5966          NADH:ubiquinone oxidoreductase subunit B9   \n",
       "5967                     nuclear receptor coactivator 3   \n",
       "5968                   solute carrier family 4 member 4   \n",
       "5969   mitogen-activated protein kinase kinase kinase 4   \n",
       "5970                   coiled-coil domain containing 61   \n",
       "5971                                          calpain 7   \n",
       "5972                               WASP family member 2   \n",
       "5973  stress associated endoplasmic reticulum protein 1   \n",
       "5974       family with sequence similarity 169 member A   \n",
       "5975  ectonucleotide pyrophosphatase/phosphodiestera...   \n",
       "5976                  MORC family CW-type zinc finger 2   \n",
       "5977               influenza virus NS1A binding protein   \n",
       "5978                          SEC23 interacting protein   \n",
       "\n",
       "                   Subcellular Location (Protein Atlas)  \n",
       "0                                                  None  \n",
       "1                                                  None  \n",
       "2                    Cytosol;Golgi apparatus(Uncertain)  \n",
       "3                                                   NaN  \n",
       "4                                                   NaN  \n",
       "5                                                   NaN  \n",
       "6                                                   NaN  \n",
       "7                                                   NaN  \n",
       "8                         Cytosol;Nucleoplasm(Enhanced)  \n",
       "9                                    Cytosol(Uncertain)  \n",
       "10           Nuclear bodies(Supported)Nucleus(Approved)  \n",
       "11    Cytokinetic bridge;Midbody ring;Nucleoplasm(Ap...  \n",
       "12          Cytosol;Nucleoli fibrillar center(Approved)  \n",
       "13               Cytosol;Nucleoplasm;Vesicles(Approved)  \n",
       "14                                   Cytosol(Supported)  \n",
       "15                   Golgi apparatus;Vesicles(Approved)  \n",
       "16           Golgi apparatus;Nucleoli;Nucleus(Approved)  \n",
       "17          Nucleoli fibrillar center;Nucleus(Approved)  \n",
       "18                               Mitochondria(Approved)  \n",
       "19    Golgi apparatus;Nuclear membrane;Nucleoli(Appr...  \n",
       "20                                                  NaN  \n",
       "21                      Endoplasmic reticulum(Approved)  \n",
       "22                           Cytosol;Vesicles(Approved)  \n",
       "23    Vesicles(Approved)Nucleoli fibrillar center(Un...  \n",
       "24                    Lipid droplets;Vesicles(Approved)  \n",
       "25                                Nucleoplasm(Approved)  \n",
       "26                                                  NaN  \n",
       "27                                                  NaN  \n",
       "28                            Golgi apparatus(Approved)  \n",
       "29                                 Centrosome(Approved)  \n",
       "...                                                 ...  \n",
       "5949            Nuclear membrane;Nucleoplasm(Supported)  \n",
       "5950                        Cytosol;Nucleoli(Supported)  \n",
       "5951  Actin filaments;Cytosol;Plasma membrane(Approved)  \n",
       "5952       Cytosol(Supported)Plasma membrane(Uncertain)  \n",
       "5953                      Centrosome;Cytosol(Supported)  \n",
       "5954  Plasma membrane;Vesicles(Enhanced)Cell Junctio...  \n",
       "5955                                  Cytosol(Enhanced)  \n",
       "5956                             Nucleoplasm(Supported)  \n",
       "5957    Nucleoli fibrillar center;Peroxisomes(Approved)  \n",
       "5958                        Cytosol;Nucleoli(Supported)  \n",
       "5959            Aggresome;Cytosol;Nucleoplasm(Approved)  \n",
       "5960                             Nucleoplasm(Supported)  \n",
       "5961                                                NaN  \n",
       "5962  Cytosol;Nucleoplasm(Supported)Plasma membrane(...  \n",
       "5963                                  Cytosol(Enhanced)  \n",
       "5964                                                NaN  \n",
       "5965  Focal adhesion sites;Plasma membrane(Supported...  \n",
       "5966                            Mitochondria(Supported)  \n",
       "5967                     Cytosol;Nucleoplasm(Supported)  \n",
       "5968                                                NaN  \n",
       "5969                                  Cytosol(Approved)  \n",
       "5970                                  Nucleus(Approved)  \n",
       "5971                                                NaN  \n",
       "5972                  Cytosol;Plasma membrane(Approved)  \n",
       "5973                    Endoplasmic reticulum(Approved)  \n",
       "5974       Nuclear membrane(Enhanced)Cytosol(Uncertain)  \n",
       "5975                                                NaN  \n",
       "5976                         Cytosol;Nucleus(Supported)  \n",
       "5977                                 Cytosol(Supported)  \n",
       "5978                                 Vesicles(Enhanced)  \n",
       "\n",
       "[5979 rows x 4 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Reading in Metascape results with annotations\n",
    "annot_data = pd.read_csv('metascape_result.csv', sep = ',')\n",
    "print(annot_data.columns)\n",
    "display(annot_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     Protein Gene Symbol                                        Description  \\\n",
      "0     A0FGR8       ESYT2                           extended synaptotagmin 2   \n",
      "1     A1L020       MEX3A                  mex-3 RNA binding family member A   \n",
      "2     A1XBS5      FAM92A        family with sequence similarity 92 member A   \n",
      "3     A2RU67     FAM234B       family with sequence similarity 234 member B   \n",
      "4     A3KN83       SBNO1                         strawberry notch homolog 1   \n",
      "5     A4D1U4    KIAA1147                                           KIAA1147   \n",
      "6     A4FU01      MTMR11                    myotubularin related protein 11   \n",
      "7     A5YKK6       CNOT1           CCR4-NOT transcription complex subunit 1   \n",
      "8     A6NDG6         PGP                       phosphoglycolate phosphatase   \n",
      "9     A6NEL2      SOWAHB   sosondowah ankyrin repeat domain family member B   \n",
      "10    A6QL63      BTBD11                           BTB domain containing 11   \n",
      "11    P62308       SNRPG      small nuclear ribonucleoprotein polypeptide G   \n",
      "12    P0CG08      GPR89B                     G protein-coupled receptor 89B   \n",
      "13    C9JCN9     HSBP1L1         heat shock factor binding protein 1 like 1   \n",
      "14    C9JLW8      MCRIP1   MAPK regulated corepressor interacting protein 1   \n",
      "15    L0R6Q1     SLC35A4                 solute carrier family 35 member A4   \n",
      "16    L0R819      ASNSD1          asparagine synthetase domain containing 1   \n",
      "17    O00148      DDX39A                              DExD-box helicase 39A   \n",
      "18    O00161      SNAP23                  synaptosome associated protein 23   \n",
      "19    O00165        HAX1                       HCLS1 associated protein X-1   \n",
      "20    O00170         AIP      aryl hydrocarbon receptor interacting protein   \n",
      "21    O00180       KCNK1  potassium two pore domain channel subfamily K ...   \n",
      "22    O00182      LGALS9                                         galectin 9   \n",
      "23    O00214      LGALS8                                         galectin 8   \n",
      "24    O00267      SUPT5H       SPT5 homolog, DSIF elongation factor subunit   \n",
      "25    O00291        HIP1                   huntingtin interacting protein 1   \n",
      "26    O00299       CLIC1                   chloride intracellular channel 1   \n",
      "27    O00400     SLC33A1                  solute carrier family 33 member 1   \n",
      "28    O00418       EEF2K              eukaryotic elongation factor 2 kinase   \n",
      "29    O00425     IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "...      ...         ...                                                ...   \n",
      "2191  Q9Y5V3      MAGED1                              MAGE family member D1   \n",
      "2192  Q9Y5W7       SNX14                                   sorting nexin 14   \n",
      "2193  Q9Y5W9       SNX11                                   sorting nexin 11   \n",
      "2194  Q9Y5X2        SNX8                                    sorting nexin 8   \n",
      "2195  Q9Y5Y0      FLVCR1  feline leukemia virus subgroup C cellular rece...   \n",
      "2196  Q9Y5Z9      UBIAD1         UbiA prenyltransferase domain containing 1   \n",
      "2197  Q9Y613       FHOD1              formin homology 2 domain containing 1   \n",
      "2198  Q9Y617       PSAT1                   phosphoserine aminotransferase 1   \n",
      "2199  Q9Y618       NCOR2                     nuclear receptor corepressor 2   \n",
      "2200  Q9Y620      RAD54B                                    RAD54 homolog B   \n",
      "2201  Q9Y657       SPIN1                                         spindlin 1   \n",
      "2202  Q9Y666     SLC12A7                  solute carrier family 12 member 7   \n",
      "2203  Q9Y673        ALG5   ALG5 dolichyl-phosphate beta-glucosyltransferase   \n",
      "2204  Q9Y680       FKBP7                            FKBP prolyl isomerase 7   \n",
      "2205  Q9Y696       CLIC4                   chloride intracellular channel 4   \n",
      "2206  Q9Y6A4      CFAP20           cilia and flagella associated protein 20   \n",
      "2207  Q9Y6B6       SAR1B         secretion associated Ras related GTPase 1B   \n",
      "2208  Q9Y6B7       AP4B1   adaptor related protein complex 4 subunit beta 1   \n",
      "2209  Q9Y6C9       MTCH2                            mitochondrial carrier 2   \n",
      "2210  Q9Y6D5     ARFGEF2  ADP ribosylation factor guanine nucleotide exc...   \n",
      "2211  Q9Y6I3        EPN1                                            epsin 1   \n",
      "2212  Q9Y6I4        USP3                     ubiquitin specific peptidase 3   \n",
      "2213  Q9Y6J9       TAF6L  TATA-box binding protein associated factor 6 like   \n",
      "2214  Q9Y6M1     IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "2215  Q9Y6M9      NDUFB9          NADH:ubiquinone oxidoreductase subunit B9   \n",
      "2216  Q9Y6R4      MAP3K4   mitogen-activated protein kinase kinase kinase 4   \n",
      "2217  Q9Y6R9      CCDC61                   coiled-coil domain containing 61   \n",
      "2218  Q9Y6X1       SERP1  stress associated endoplasmic reticulum protein 1   \n",
      "2219  Q9Y6Y0    IVNS1ABP               influenza virus NS1A binding protein   \n",
      "2220  Q9Y6Y8     SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "     Subcellular Location (Protein Atlas)  \n",
      "0                      Cytosol(Uncertain)  \n",
      "1                      Cytosol(Supported)  \n",
      "2                  Mitochondria(Approved)  \n",
      "3         Endoplasmic reticulum(Approved)  \n",
      "4                   Nucleoplasm(Approved)  \n",
      "5               Golgi apparatus(Approved)  \n",
      "6                    Centrosome(Approved)  \n",
      "7                      Cytosol(Supported)  \n",
      "8                Nuclear bodies(Approved)  \n",
      "9     Nucleoli fibrillar center(Approved)  \n",
      "10                  Nucleoplasm(Approved)  \n",
      "11                  Nucleoplasm(Approved)  \n",
      "12        Endoplasmic reticulum(Approved)  \n",
      "13                  Nucleoplasm(Approved)  \n",
      "14                      Cytosol(Approved)  \n",
      "15                  Nucleoplasm(Approved)  \n",
      "16                      Cytosol(Approved)  \n",
      "17             Nuclear speckles(Approved)  \n",
      "18             Plasma membrane(Supported)  \n",
      "19                Mitochondria(Supported)  \n",
      "20                     Cytosol(Supported)  \n",
      "21                     Vesicles(Approved)  \n",
      "22                      Cytosol(Approved)  \n",
      "23              Plasma membrane(Approved)  \n",
      "24                  Nucleoplasm(Enhanced)  \n",
      "25                     Vesicles(Enhanced)  \n",
      "26                     Cytosol(Supported)  \n",
      "27                      Nucleus(Approved)  \n",
      "28                  Nucleoplasm(Approved)  \n",
      "29                      Cytosol(Enhanced)  \n",
      "...                                   ...  \n",
      "2191                    Cytosol(Approved)  \n",
      "2192                   Cytosol(Supported)  \n",
      "2193                    Cytosol(Approved)  \n",
      "2194                  Vesicles(Supported)  \n",
      "2195             Cell Junctions(Approved)  \n",
      "2196                   Vesicles(Approved)  \n",
      "2197                   Cytosol(Supported)  \n",
      "2198                    Cytosol(Enhanced)  \n",
      "2199               Nucleoplasm(Supported)  \n",
      "2200                   Nucleus(Supported)  \n",
      "2201               Nucleoplasm(Supported)  \n",
      "2202                   Cytosol(Uncertain)  \n",
      "2203                    Cytosol(Approved)  \n",
      "2204     Endoplasmic reticulum(Supported)  \n",
      "2205                   Cytosol(Supported)  \n",
      "2206                   Nucleus(Supported)  \n",
      "2207      Endoplasmic reticulum(Approved)  \n",
      "2208                   Vesicles(Approved)  \n",
      "2209              Mitochondria(Supported)  \n",
      "2210           Golgi apparatus(Supported)  \n",
      "2211                    Cytosol(Enhanced)  \n",
      "2212               Nucleoplasm(Supported)  \n",
      "2213               Nucleoplasm(Supported)  \n",
      "2214                    Cytosol(Enhanced)  \n",
      "2215              Mitochondria(Supported)  \n",
      "2216                    Cytosol(Approved)  \n",
      "2217                    Nucleus(Approved)  \n",
      "2218      Endoplasmic reticulum(Approved)  \n",
      "2219                   Cytosol(Supported)  \n",
      "2220                   Vesicles(Enhanced)  \n",
      "\n",
      "[2221 rows x 4 columns]\n"
     ]
    }
   ],
   "source": [
    "# Filtering out those genes with multiple subcelular localization assignments\n",
    "tokeep = []\n",
    "for item in annot_data.index:\n",
    "    if str(annot_data.at[item, 'Subcellular Location (Protein Atlas)']).count(')') == 1:\n",
    "        if str(annot_data.at[item, 'Subcellular Location (Protein Atlas)']).count(';') == 0:\n",
    "            tokeep.append(annot_data.loc[item, :])\n",
    "putative_markers = pd.DataFrame.from_records(tokeep, columns=annot_data.columns)\n",
    "print(putative_markers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     Protein Gene Symbol                                        Description  \\\n",
      "0     A0FGR8       ESYT2                           extended synaptotagmin 2   \n",
      "1     A1L020       MEX3A                  mex-3 RNA binding family member A   \n",
      "2     A1XBS5      FAM92A        family with sequence similarity 92 member A   \n",
      "3     A2RU67     FAM234B       family with sequence similarity 234 member B   \n",
      "4     A4D1U4    KIAA1147                                           KIAA1147   \n",
      "5     A4FU01      MTMR11                    myotubularin related protein 11   \n",
      "6     A5YKK6       CNOT1           CCR4-NOT transcription complex subunit 1   \n",
      "7     P0CG08      GPR89B                     G protein-coupled receptor 89B   \n",
      "8     C9JLW8      MCRIP1   MAPK regulated corepressor interacting protein 1   \n",
      "9     L0R819      ASNSD1          asparagine synthetase domain containing 1   \n",
      "10    O00161      SNAP23                  synaptosome associated protein 23   \n",
      "11    O00165        HAX1                       HCLS1 associated protein X-1   \n",
      "12    O00170         AIP      aryl hydrocarbon receptor interacting protein   \n",
      "13    O00180       KCNK1  potassium two pore domain channel subfamily K ...   \n",
      "14    O00182      LGALS9                                         galectin 9   \n",
      "15    O00214      LGALS8                                         galectin 8   \n",
      "16    O00291        HIP1                   huntingtin interacting protein 1   \n",
      "17    O00299       CLIC1                   chloride intracellular channel 1   \n",
      "18    O00425     IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "19    O00459      PIK3R2     phosphoinositide-3-kinase regulatory subunit 2   \n",
      "20    O00462       MANBA                                   mannosidase beta   \n",
      "21    O00463       TRAF5                   TNF receptor associated factor 5   \n",
      "22    O00481      BTN3A1                 butyrophilin subfamily 3 member A1   \n",
      "23    O00483      NDUFA4            NDUFA4 mitochondrial complex associated   \n",
      "24    O00522       KRIT1                    KRIT1 ankyrin repeat containing   \n",
      "25    O00559       EBAG9  estrogen receptor binding site associated anti...   \n",
      "26    O00767         SCD                            stearoyl-CoA desaturase   \n",
      "27    O14494       PLPP1                         phospholipid phosphatase 1   \n",
      "28    O14530      TXNDC9                    thioredoxin domain containing 9   \n",
      "29    O14578         CIT     citron rho-interacting serine/threonine kinase   \n",
      "...      ...         ...                                                ...   \n",
      "1231  Q9Y5B8        NME7                           NME/NM23 family member 7   \n",
      "1232  Q9Y5J7       TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "1233  Q9Y5L0       TNPO3                                      transportin 3   \n",
      "1234  Q9Y5M8       SRPRB                          SRP receptor subunit beta   \n",
      "1235  Q9Y5S1       TRPV2  transient receptor potential cation channel su...   \n",
      "1236  Q9Y5U9     IER3IP1   immediate early response 3 interacting protein 1   \n",
      "1237  Q9Y5V0      ZNF706                            zinc finger protein 706   \n",
      "1238  Q9Y5V3      MAGED1                              MAGE family member D1   \n",
      "1239  Q9Y5W7       SNX14                                   sorting nexin 14   \n",
      "1240  Q9Y5W9       SNX11                                   sorting nexin 11   \n",
      "1241  Q9Y5X2        SNX8                                    sorting nexin 8   \n",
      "1242  Q9Y5Y0      FLVCR1  feline leukemia virus subgroup C cellular rece...   \n",
      "1243  Q9Y5Z9      UBIAD1         UbiA prenyltransferase domain containing 1   \n",
      "1244  Q9Y613       FHOD1              formin homology 2 domain containing 1   \n",
      "1245  Q9Y617       PSAT1                   phosphoserine aminotransferase 1   \n",
      "1246  Q9Y666     SLC12A7                  solute carrier family 12 member 7   \n",
      "1247  Q9Y673        ALG5   ALG5 dolichyl-phosphate beta-glucosyltransferase   \n",
      "1248  Q9Y680       FKBP7                            FKBP prolyl isomerase 7   \n",
      "1249  Q9Y696       CLIC4                   chloride intracellular channel 4   \n",
      "1250  Q9Y6B6       SAR1B         secretion associated Ras related GTPase 1B   \n",
      "1251  Q9Y6B7       AP4B1   adaptor related protein complex 4 subunit beta 1   \n",
      "1252  Q9Y6C9       MTCH2                            mitochondrial carrier 2   \n",
      "1253  Q9Y6D5     ARFGEF2  ADP ribosylation factor guanine nucleotide exc...   \n",
      "1254  Q9Y6I3        EPN1                                            epsin 1   \n",
      "1255  Q9Y6M1     IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "1256  Q9Y6M9      NDUFB9          NADH:ubiquinone oxidoreductase subunit B9   \n",
      "1257  Q9Y6R4      MAP3K4   mitogen-activated protein kinase kinase kinase 4   \n",
      "1258  Q9Y6X1       SERP1  stress associated endoplasmic reticulum protein 1   \n",
      "1259  Q9Y6Y0    IVNS1ABP               influenza virus NS1A binding protein   \n",
      "1260  Q9Y6Y8     SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "     Subcellular Location (Protein Atlas)  \n",
      "0                      Cytosol(Uncertain)  \n",
      "1                      Cytosol(Supported)  \n",
      "2                  Mitochondria(Approved)  \n",
      "3         Endoplasmic reticulum(Approved)  \n",
      "4               Golgi apparatus(Approved)  \n",
      "5                    Centrosome(Approved)  \n",
      "6                      Cytosol(Supported)  \n",
      "7         Endoplasmic reticulum(Approved)  \n",
      "8                       Cytosol(Approved)  \n",
      "9                       Cytosol(Approved)  \n",
      "10             Plasma membrane(Supported)  \n",
      "11                Mitochondria(Supported)  \n",
      "12                     Cytosol(Supported)  \n",
      "13                     Vesicles(Approved)  \n",
      "14                      Cytosol(Approved)  \n",
      "15              Plasma membrane(Approved)  \n",
      "16                     Vesicles(Enhanced)  \n",
      "17                     Cytosol(Supported)  \n",
      "18                      Cytosol(Enhanced)  \n",
      "19              Golgi apparatus(Approved)  \n",
      "20                    Vesicles(Supported)  \n",
      "21                     Cytosol(Supported)  \n",
      "22                    Vesicles(Uncertain)  \n",
      "23                Mitochondria(Supported)  \n",
      "24                    Vesicles(Uncertain)  \n",
      "25              Golgi apparatus(Enhanced)  \n",
      "26        Endoplasmic reticulum(Enhanced)  \n",
      "27             Plasma membrane(Supported)  \n",
      "28                      Cytosol(Enhanced)  \n",
      "29                      Cytosol(Approved)  \n",
      "...                                   ...  \n",
      "1231               Mitochondria(Approved)  \n",
      "1232               Mitochondria(Enhanced)  \n",
      "1233                   Vesicles(Enhanced)  \n",
      "1234            Plasma membrane(Approved)  \n",
      "1235           Plasma membrane(Supported)  \n",
      "1236     Endoplasmic reticulum(Supported)  \n",
      "1237            Plasma membrane(Approved)  \n",
      "1238                    Cytosol(Approved)  \n",
      "1239                   Cytosol(Supported)  \n",
      "1240                    Cytosol(Approved)  \n",
      "1241                  Vesicles(Supported)  \n",
      "1242             Cell Junctions(Approved)  \n",
      "1243                   Vesicles(Approved)  \n",
      "1244                   Cytosol(Supported)  \n",
      "1245                    Cytosol(Enhanced)  \n",
      "1246                   Cytosol(Uncertain)  \n",
      "1247                    Cytosol(Approved)  \n",
      "1248     Endoplasmic reticulum(Supported)  \n",
      "1249                   Cytosol(Supported)  \n",
      "1250      Endoplasmic reticulum(Approved)  \n",
      "1251                   Vesicles(Approved)  \n",
      "1252              Mitochondria(Supported)  \n",
      "1253           Golgi apparatus(Supported)  \n",
      "1254                    Cytosol(Enhanced)  \n",
      "1255                    Cytosol(Enhanced)  \n",
      "1256              Mitochondria(Supported)  \n",
      "1257                    Cytosol(Approved)  \n",
      "1258      Endoplasmic reticulum(Approved)  \n",
      "1259                   Cytosol(Supported)  \n",
      "1260                   Vesicles(Enhanced)  \n",
      "\n",
      "[1261 rows x 4 columns]\n"
     ]
    }
   ],
   "source": [
    "# Filtering out nuclear proteins\n",
    "tokeep = []\n",
    "for item in putative_markers.index:\n",
    "    if 'nucl' not in putative_markers.at[item, 'Subcellular Location (Protein Atlas)'].lower():\n",
    "        tokeep.append(putative_markers.loc[item, :])\n",
    "postnucl_markers = pd.DataFrame.from_records(tokeep, columns=annot_data.columns)\n",
    "print(postnucl_markers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     Protein Gene Symbol                                        Description  \\\n",
      "0     A1L020       MEX3A                  mex-3 RNA binding family member A   \n",
      "1     A1XBS5      FAM92A        family with sequence similarity 92 member A   \n",
      "2     A2RU67     FAM234B       family with sequence similarity 234 member B   \n",
      "3     A4D1U4    KIAA1147                                           KIAA1147   \n",
      "4     A4FU01      MTMR11                    myotubularin related protein 11   \n",
      "5     A5YKK6       CNOT1           CCR4-NOT transcription complex subunit 1   \n",
      "6     P0CG08      GPR89B                     G protein-coupled receptor 89B   \n",
      "7     C9JLW8      MCRIP1   MAPK regulated corepressor interacting protein 1   \n",
      "8     L0R819      ASNSD1          asparagine synthetase domain containing 1   \n",
      "9     O00161      SNAP23                  synaptosome associated protein 23   \n",
      "10    O00165        HAX1                       HCLS1 associated protein X-1   \n",
      "11    O00170         AIP      aryl hydrocarbon receptor interacting protein   \n",
      "12    O00180       KCNK1  potassium two pore domain channel subfamily K ...   \n",
      "13    O00182      LGALS9                                         galectin 9   \n",
      "14    O00214      LGALS8                                         galectin 8   \n",
      "15    O00291        HIP1                   huntingtin interacting protein 1   \n",
      "16    O00299       CLIC1                   chloride intracellular channel 1   \n",
      "17    O00425     IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "18    O00459      PIK3R2     phosphoinositide-3-kinase regulatory subunit 2   \n",
      "19    O00462       MANBA                                   mannosidase beta   \n",
      "20    O00463       TRAF5                   TNF receptor associated factor 5   \n",
      "21    O00483      NDUFA4            NDUFA4 mitochondrial complex associated   \n",
      "22    O00559       EBAG9  estrogen receptor binding site associated anti...   \n",
      "23    O00767         SCD                            stearoyl-CoA desaturase   \n",
      "24    O14494       PLPP1                         phospholipid phosphatase 1   \n",
      "25    O14530      TXNDC9                    thioredoxin domain containing 9   \n",
      "26    O14578         CIT     citron rho-interacting serine/threonine kinase   \n",
      "27    O14579        COPE           coatomer protein complex subunit epsilon   \n",
      "28    O14617       AP3D1  adaptor related protein complex 3 subunit delta 1   \n",
      "29    O14639      ABLIM1                        actin binding LIM protein 1   \n",
      "...      ...         ...                                                ...   \n",
      "1186  Q9Y597       KCTD3  potassium channel tetramerization domain conta...   \n",
      "1187  Q9Y5B8        NME7                           NME/NM23 family member 7   \n",
      "1188  Q9Y5J7       TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "1189  Q9Y5L0       TNPO3                                      transportin 3   \n",
      "1190  Q9Y5M8       SRPRB                          SRP receptor subunit beta   \n",
      "1191  Q9Y5S1       TRPV2  transient receptor potential cation channel su...   \n",
      "1192  Q9Y5U9     IER3IP1   immediate early response 3 interacting protein 1   \n",
      "1193  Q9Y5V0      ZNF706                            zinc finger protein 706   \n",
      "1194  Q9Y5V3      MAGED1                              MAGE family member D1   \n",
      "1195  Q9Y5W7       SNX14                                   sorting nexin 14   \n",
      "1196  Q9Y5W9       SNX11                                   sorting nexin 11   \n",
      "1197  Q9Y5X2        SNX8                                    sorting nexin 8   \n",
      "1198  Q9Y5Y0      FLVCR1  feline leukemia virus subgroup C cellular rece...   \n",
      "1199  Q9Y5Z9      UBIAD1         UbiA prenyltransferase domain containing 1   \n",
      "1200  Q9Y613       FHOD1              formin homology 2 domain containing 1   \n",
      "1201  Q9Y617       PSAT1                   phosphoserine aminotransferase 1   \n",
      "1202  Q9Y673        ALG5   ALG5 dolichyl-phosphate beta-glucosyltransferase   \n",
      "1203  Q9Y680       FKBP7                            FKBP prolyl isomerase 7   \n",
      "1204  Q9Y696       CLIC4                   chloride intracellular channel 4   \n",
      "1205  Q9Y6B6       SAR1B         secretion associated Ras related GTPase 1B   \n",
      "1206  Q9Y6B7       AP4B1   adaptor related protein complex 4 subunit beta 1   \n",
      "1207  Q9Y6C9       MTCH2                            mitochondrial carrier 2   \n",
      "1208  Q9Y6D5     ARFGEF2  ADP ribosylation factor guanine nucleotide exc...   \n",
      "1209  Q9Y6I3        EPN1                                            epsin 1   \n",
      "1210  Q9Y6M1     IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "1211  Q9Y6M9      NDUFB9          NADH:ubiquinone oxidoreductase subunit B9   \n",
      "1212  Q9Y6R4      MAP3K4   mitogen-activated protein kinase kinase kinase 4   \n",
      "1213  Q9Y6X1       SERP1  stress associated endoplasmic reticulum protein 1   \n",
      "1214  Q9Y6Y0    IVNS1ABP               influenza virus NS1A binding protein   \n",
      "1215  Q9Y6Y8     SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "     Subcellular Location (Protein Atlas)  \n",
      "0                      Cytosol(Supported)  \n",
      "1                  Mitochondria(Approved)  \n",
      "2         Endoplasmic reticulum(Approved)  \n",
      "3               Golgi apparatus(Approved)  \n",
      "4                    Centrosome(Approved)  \n",
      "5                      Cytosol(Supported)  \n",
      "6         Endoplasmic reticulum(Approved)  \n",
      "7                       Cytosol(Approved)  \n",
      "8                       Cytosol(Approved)  \n",
      "9              Plasma membrane(Supported)  \n",
      "10                Mitochondria(Supported)  \n",
      "11                     Cytosol(Supported)  \n",
      "12                     Vesicles(Approved)  \n",
      "13                      Cytosol(Approved)  \n",
      "14              Plasma membrane(Approved)  \n",
      "15                     Vesicles(Enhanced)  \n",
      "16                     Cytosol(Supported)  \n",
      "17                      Cytosol(Enhanced)  \n",
      "18              Golgi apparatus(Approved)  \n",
      "19                    Vesicles(Supported)  \n",
      "20                     Cytosol(Supported)  \n",
      "21                Mitochondria(Supported)  \n",
      "22              Golgi apparatus(Enhanced)  \n",
      "23        Endoplasmic reticulum(Enhanced)  \n",
      "24             Plasma membrane(Supported)  \n",
      "25                      Cytosol(Enhanced)  \n",
      "26                      Cytosol(Approved)  \n",
      "27              Golgi apparatus(Enhanced)  \n",
      "28                      Cytosol(Approved)  \n",
      "29                     Cytosol(Supported)  \n",
      "...                                   ...  \n",
      "1186                    Cytosol(Approved)  \n",
      "1187               Mitochondria(Approved)  \n",
      "1188               Mitochondria(Enhanced)  \n",
      "1189                   Vesicles(Enhanced)  \n",
      "1190            Plasma membrane(Approved)  \n",
      "1191           Plasma membrane(Supported)  \n",
      "1192     Endoplasmic reticulum(Supported)  \n",
      "1193            Plasma membrane(Approved)  \n",
      "1194                    Cytosol(Approved)  \n",
      "1195                   Cytosol(Supported)  \n",
      "1196                    Cytosol(Approved)  \n",
      "1197                  Vesicles(Supported)  \n",
      "1198             Cell Junctions(Approved)  \n",
      "1199                   Vesicles(Approved)  \n",
      "1200                   Cytosol(Supported)  \n",
      "1201                    Cytosol(Enhanced)  \n",
      "1202                    Cytosol(Approved)  \n",
      "1203     Endoplasmic reticulum(Supported)  \n",
      "1204                   Cytosol(Supported)  \n",
      "1205      Endoplasmic reticulum(Approved)  \n",
      "1206                   Vesicles(Approved)  \n",
      "1207              Mitochondria(Supported)  \n",
      "1208           Golgi apparatus(Supported)  \n",
      "1209                    Cytosol(Enhanced)  \n",
      "1210                    Cytosol(Enhanced)  \n",
      "1211              Mitochondria(Supported)  \n",
      "1212                    Cytosol(Approved)  \n",
      "1213      Endoplasmic reticulum(Approved)  \n",
      "1214                   Cytosol(Supported)  \n",
      "1215                   Vesicles(Enhanced)  \n",
      "\n",
      "[1216 rows x 4 columns]\n"
     ]
    }
   ],
   "source": [
    "# Filtering out uncertain assignments\n",
    "tokeep =[]\n",
    "for item in postnucl_markers.index:\n",
    "    if 'uncertain' not in postnucl_markers.at[item, 'Subcellular Location (Protein Atlas)'].lower():\n",
    "        tokeep.append(postnucl_markers.loc[item,:])\n",
    "quality_markers = pd.DataFrame.from_records(tokeep, columns=annot_data.columns)\n",
    "print(quality_markers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "        Gene Symbol                                        Description  \\\n",
      "Protein                                                                  \n",
      "O00291         HIP1                   huntingtin interacting protein 1   \n",
      "O00425      IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "O00559        EBAG9  estrogen receptor binding site associated anti...   \n",
      "O00767          SCD                            stearoyl-CoA desaturase   \n",
      "O14530       TXNDC9                    thioredoxin domain containing 9   \n",
      "O14579         COPE           coatomer protein complex subunit epsilon   \n",
      "O14662        STX16                                        syntaxin 16   \n",
      "O14949        UQCRQ  ubiquinol-cytochrome c reductase complex III s...   \n",
      "O14967         CLGN                                           calmegin   \n",
      "O15258         RER1  retention in endoplasmic reticulum sorting rec...   \n",
      "O15392        BIRC5                baculoviral IAP repeat containing 5   \n",
      "O15400         STX7                                         syntaxin 7   \n",
      "O43396        TXNL1                                 thioredoxin like 1   \n",
      "O43615       TIMM44     translocase of inner mitochondrial membrane 44   \n",
      "O43795        MYO1B                                          myosin IB   \n",
      "O75534        CSDE1                    cold shock domain containing E1   \n",
      "O75821        EIF3G  eukaryotic translation initiation factor 3 sub...   \n",
      "O75822        EIF3J  eukaryotic translation initiation factor 3 sub...   \n",
      "O94822         LTN1             listerin E3 ubiquitin protein ligase 1   \n",
      "O94826       TOMM70     translocase of outer mitochondrial membrane 70   \n",
      "O95139       NDUFB6          NADH:ubiquinone oxidoreductase subunit B6   \n",
      "O95159        ZFPL1                         zinc finger protein like 1   \n",
      "O95202        LETM1  leucine zipper and EF-hand containing transmem...   \n",
      "O95292         VAPB                    VAMP associated protein B and C   \n",
      "O95613         PCNT                                        pericentrin   \n",
      "O95747        OXSR1               oxidative stress responsive kinase 1   \n",
      "P00387       CYB5R3                          cytochrome b5 reductase 3   \n",
      "P04843         RPN1                                       ribophorin I   \n",
      "P07195         LDHB                            lactate dehydrogenase B   \n",
      "P07814         EPRS                    glutamyl-prolyl-tRNA synthetase   \n",
      "...             ...                                                ...   \n",
      "Q9NTK5         OLA1                                  Obg like ATPase 1   \n",
      "Q9NUY8      TBC1D23                       TBC1 domain family member 23   \n",
      "Q9NV92       NDFIP2                 Nedd4 family interacting protein 2   \n",
      "Q9NW68        BSDC1                            BSD domain containing 1   \n",
      "Q9NX74         DUS2                          dihydrouridine synthase 2   \n",
      "Q9NXF8       ZDHHC7                 zinc finger DHHC-type containing 7   \n",
      "Q9NYP7       ELOVL5                        ELOVL fatty acid elongase 5   \n",
      "Q9NZB2      FAM120A               family with sequence similarity 120A   \n",
      "Q9P0J0      NDUFA13         NADH:ubiquinone oxidoreductase subunit A13   \n",
      "Q9P0L0         VAPA                          VAMP associated protein A   \n",
      "Q9P2E9        RRBP1                         ribosome binding protein 1   \n",
      "Q9P2R3       ANKFY1        ankyrin repeat and FYVE domain containing 1   \n",
      "Q9UHD8        9-Sep                                           septin 9   \n",
      "Q9UHV9        PFDN2                                prefoldin subunit 2   \n",
      "Q9UN86        G3BP2              G3BP stress granule assembly factor 2   \n",
      "Q9UPN7       PPP6R1         protein phosphatase 6 regulatory subunit 1   \n",
      "Q9Y266         NUDC   nuclear distribution C, dynein complex regulator   \n",
      "Q9Y371      SH3GLB1     SH3 domain containing GRB2 like, endophilin B1   \n",
      "Q9Y3D6         FIS1                           fission, mitochondrial 1   \n",
      "Q9Y3P9      RABGAP1                    RAB GTPase activating protein 1   \n",
      "Q9Y4E8        USP15                    ubiquitin specific peptidase 15   \n",
      "Q9Y4W6       AFG3L2           AFG3 like matrix AAA peptidase subunit 2   \n",
      "Q9Y512       SAMM50    SAMM50 sorting and assembly machinery component   \n",
      "Q9Y520       PRRC2C                        proline rich coiled-coil 2C   \n",
      "Q9Y5J7        TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "Q9Y5L0        TNPO3                                      transportin 3   \n",
      "Q9Y617        PSAT1                   phosphoserine aminotransferase 1   \n",
      "Q9Y6I3         EPN1                                            epsin 1   \n",
      "Q9Y6M1      IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "Q9Y6Y8      SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "        Subcellular Location (Protein Atlas)  \n",
      "Protein                                       \n",
      "O00291                    Vesicles(Enhanced)  \n",
      "O00425                     Cytosol(Enhanced)  \n",
      "O00559             Golgi apparatus(Enhanced)  \n",
      "O00767       Endoplasmic reticulum(Enhanced)  \n",
      "O14530                     Cytosol(Enhanced)  \n",
      "O14579             Golgi apparatus(Enhanced)  \n",
      "O14662                    Vesicles(Enhanced)  \n",
      "O14949                Mitochondria(Enhanced)  \n",
      "O14967       Endoplasmic reticulum(Enhanced)  \n",
      "O15258             Golgi apparatus(Enhanced)  \n",
      "O15392          Cytokinetic bridge(Enhanced)  \n",
      "O15400                   Lysosomes(Enhanced)  \n",
      "O43396                     Cytosol(Enhanced)  \n",
      "O43615                Mitochondria(Enhanced)  \n",
      "O43795             Plasma membrane(Enhanced)  \n",
      "O75534                     Cytosol(Enhanced)  \n",
      "O75821                     Cytosol(Enhanced)  \n",
      "O75822                     Cytosol(Enhanced)  \n",
      "O94822                     Cytosol(Enhanced)  \n",
      "O94826                Mitochondria(Enhanced)  \n",
      "O95139                Mitochondria(Enhanced)  \n",
      "O95159             Golgi apparatus(Enhanced)  \n",
      "O95202                Mitochondria(Enhanced)  \n",
      "O95292       Endoplasmic reticulum(Enhanced)  \n",
      "O95613                  Centrosome(Enhanced)  \n",
      "O95747                     Cytosol(Enhanced)  \n",
      "P00387       Endoplasmic reticulum(Enhanced)  \n",
      "P04843       Endoplasmic reticulum(Enhanced)  \n",
      "P07195                     Cytosol(Enhanced)  \n",
      "P07814                     Cytosol(Enhanced)  \n",
      "...                                      ...  \n",
      "Q9NTK5                     Cytosol(Enhanced)  \n",
      "Q9NUY8             Golgi apparatus(Enhanced)  \n",
      "Q9NV92                    Vesicles(Enhanced)  \n",
      "Q9NW68             Golgi apparatus(Enhanced)  \n",
      "Q9NX74                     Cytosol(Enhanced)  \n",
      "Q9NXF8             Golgi apparatus(Enhanced)  \n",
      "Q9NYP7       Endoplasmic reticulum(Enhanced)  \n",
      "Q9NZB2                     Cytosol(Enhanced)  \n",
      "Q9P0J0                Mitochondria(Enhanced)  \n",
      "Q9P0L0       Endoplasmic reticulum(Enhanced)  \n",
      "Q9P2E9       Endoplasmic reticulum(Enhanced)  \n",
      "Q9P2R3                   Endosomes(Enhanced)  \n",
      "Q9UHD8             Actin filaments(Enhanced)  \n",
      "Q9UHV9                     Cytosol(Enhanced)  \n",
      "Q9UN86                     Cytosol(Enhanced)  \n",
      "Q9UPN7                     Cytosol(Enhanced)  \n",
      "Q9Y266                     Cytosol(Enhanced)  \n",
      "Q9Y371                     Cytosol(Enhanced)  \n",
      "Q9Y3D6                Mitochondria(Enhanced)  \n",
      "Q9Y3P9                     Cytosol(Enhanced)  \n",
      "Q9Y4E8                     Cytosol(Enhanced)  \n",
      "Q9Y4W6                Mitochondria(Enhanced)  \n",
      "Q9Y512                Mitochondria(Enhanced)  \n",
      "Q9Y520                     Cytosol(Enhanced)  \n",
      "Q9Y5J7                Mitochondria(Enhanced)  \n",
      "Q9Y5L0                    Vesicles(Enhanced)  \n",
      "Q9Y617                     Cytosol(Enhanced)  \n",
      "Q9Y6I3                     Cytosol(Enhanced)  \n",
      "Q9Y6M1                     Cytosol(Enhanced)  \n",
      "Q9Y6Y8                    Vesicles(Enhanced)  \n",
      "\n",
      "[249 rows x 3 columns]\n",
      "Cytosol(Enhanced)                          95\n",
      "Mitochondria(Enhanced)                     41\n",
      "Endoplasmic reticulum(Enhanced)            35\n",
      "Vesicles(Enhanced)                         23\n",
      "Golgi apparatus(Enhanced)                  20\n",
      "Plasma membrane(Enhanced)                  14\n",
      "Peroxisomes(Enhanced)                       6\n",
      "Centrosome(Enhanced)                        5\n",
      "Actin filaments(Enhanced)                   2\n",
      "Endosomes(Enhanced)                         2\n",
      "Cytokinetic bridge(Enhanced)                1\n",
      "Focal adhesion sites(Enhanced)              1\n",
      "Microtubule organizing center(Enhanced)     1\n",
      "Microtubules(Enhanced)                      1\n",
      "Lysosomes(Enhanced)                         1\n",
      "Cell Junctions(Enhanced)                    1\n",
      "Name: Subcellular Location (Protein Atlas), dtype: int64\n"
     ]
    }
   ],
   "source": [
    "# Checking how many proteins have an Enhanced reliability score\n",
    "enhanced = []\n",
    "enhanced_supported = []\n",
    "for item in quality_markers.index:\n",
    "    if 'Enhanced' in quality_markers.at[item, 'Subcellular Location (Protein Atlas)']:\n",
    "        enhanced.append(quality_markers.loc[item,:])\n",
    "        enhanced_supported.append(quality_markers.loc[item,:])\n",
    "    elif 'Supported' in quality_markers.at[item, 'Subcellular Location (Protein Atlas)']:\n",
    "        enhanced_supported.append(quality_markers.loc[item,:])\n",
    "enhancedprot = pd.DataFrame.from_records(enhanced, index = 'Protein', columns=annot_data.columns)\n",
    "enh_supprot = pd.DataFrame.from_records(enhanced_supported, index = 'Protein', columns=annot_data.columns)\n",
    "print((enhancedprot))\n",
    "print(enhancedprot['Subcellular Location (Protein Atlas)'].value_counts())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "        Gene Symbol                                        Description  \\\n",
      "Protein                                                                  \n",
      "O00291         HIP1                   huntingtin interacting protein 1   \n",
      "O00425      IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "O00559        EBAG9  estrogen receptor binding site associated anti...   \n",
      "O00767          SCD                            stearoyl-CoA desaturase   \n",
      "O14530       TXNDC9                    thioredoxin domain containing 9   \n",
      "O14579         COPE           coatomer protein complex subunit epsilon   \n",
      "O14662        STX16                                        syntaxin 16   \n",
      "O14949        UQCRQ  ubiquinol-cytochrome c reductase complex III s...   \n",
      "O14967         CLGN                                           calmegin   \n",
      "O15258         RER1  retention in endoplasmic reticulum sorting rec...   \n",
      "O15392        BIRC5                baculoviral IAP repeat containing 5   \n",
      "O15400         STX7                                         syntaxin 7   \n",
      "O43396        TXNL1                                 thioredoxin like 1   \n",
      "O43615       TIMM44     translocase of inner mitochondrial membrane 44   \n",
      "O43795        MYO1B                                          myosin IB   \n",
      "O75534        CSDE1                    cold shock domain containing E1   \n",
      "O75821        EIF3G  eukaryotic translation initiation factor 3 sub...   \n",
      "O75822        EIF3J  eukaryotic translation initiation factor 3 sub...   \n",
      "O94822         LTN1             listerin E3 ubiquitin protein ligase 1   \n",
      "O94826       TOMM70     translocase of outer mitochondrial membrane 70   \n",
      "O95139       NDUFB6          NADH:ubiquinone oxidoreductase subunit B6   \n",
      "O95159        ZFPL1                         zinc finger protein like 1   \n",
      "O95202        LETM1  leucine zipper and EF-hand containing transmem...   \n",
      "O95292         VAPB                    VAMP associated protein B and C   \n",
      "O95613         PCNT                                        pericentrin   \n",
      "O95747        OXSR1               oxidative stress responsive kinase 1   \n",
      "P00387       CYB5R3                          cytochrome b5 reductase 3   \n",
      "P04843         RPN1                                       ribophorin I   \n",
      "P07195         LDHB                            lactate dehydrogenase B   \n",
      "P07814         EPRS                    glutamyl-prolyl-tRNA synthetase   \n",
      "...             ...                                                ...   \n",
      "Q9NTK5         OLA1                                  Obg like ATPase 1   \n",
      "Q9NUY8      TBC1D23                       TBC1 domain family member 23   \n",
      "Q9NV92       NDFIP2                 Nedd4 family interacting protein 2   \n",
      "Q9NW68        BSDC1                            BSD domain containing 1   \n",
      "Q9NX74         DUS2                          dihydrouridine synthase 2   \n",
      "Q9NXF8       ZDHHC7                 zinc finger DHHC-type containing 7   \n",
      "Q9NYP7       ELOVL5                        ELOVL fatty acid elongase 5   \n",
      "Q9NZB2      FAM120A               family with sequence similarity 120A   \n",
      "Q9P0J0      NDUFA13         NADH:ubiquinone oxidoreductase subunit A13   \n",
      "Q9P0L0         VAPA                          VAMP associated protein A   \n",
      "Q9P2E9        RRBP1                         ribosome binding protein 1   \n",
      "Q9P2R3       ANKFY1        ankyrin repeat and FYVE domain containing 1   \n",
      "Q9UHD8        9-Sep                                           septin 9   \n",
      "Q9UHV9        PFDN2                                prefoldin subunit 2   \n",
      "Q9UN86        G3BP2              G3BP stress granule assembly factor 2   \n",
      "Q9UPN7       PPP6R1         protein phosphatase 6 regulatory subunit 1   \n",
      "Q9Y266         NUDC   nuclear distribution C, dynein complex regulator   \n",
      "Q9Y371      SH3GLB1     SH3 domain containing GRB2 like, endophilin B1   \n",
      "Q9Y3D6         FIS1                           fission, mitochondrial 1   \n",
      "Q9Y3P9      RABGAP1                    RAB GTPase activating protein 1   \n",
      "Q9Y4E8        USP15                    ubiquitin specific peptidase 15   \n",
      "Q9Y4W6       AFG3L2           AFG3 like matrix AAA peptidase subunit 2   \n",
      "Q9Y512       SAMM50    SAMM50 sorting and assembly machinery component   \n",
      "Q9Y520       PRRC2C                        proline rich coiled-coil 2C   \n",
      "Q9Y5J7        TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "Q9Y5L0        TNPO3                                      transportin 3   \n",
      "Q9Y617        PSAT1                   phosphoserine aminotransferase 1   \n",
      "Q9Y6I3         EPN1                                            epsin 1   \n",
      "Q9Y6M1      IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "Q9Y6Y8      SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "        Subcellular Location (Protein Atlas)        Subcellular_Loc  \n",
      "Protein                                                              \n",
      "O00291                    Vesicles(Enhanced)               Vesicles  \n",
      "O00425                     Cytosol(Enhanced)                Cytosol  \n",
      "O00559             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O00767       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "O14530                     Cytosol(Enhanced)                Cytosol  \n",
      "O14579             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O14662                    Vesicles(Enhanced)               Vesicles  \n",
      "O14949                Mitochondria(Enhanced)           Mitochondria  \n",
      "O14967       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "O15258             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O15392          Cytokinetic bridge(Enhanced)     Cytokinetic bridge  \n",
      "O15400                   Lysosomes(Enhanced)              Lysosomes  \n",
      "O43396                     Cytosol(Enhanced)                Cytosol  \n",
      "O43615                Mitochondria(Enhanced)           Mitochondria  \n",
      "O43795             Plasma membrane(Enhanced)        Plasma membrane  \n",
      "O75534                     Cytosol(Enhanced)                Cytosol  \n",
      "O75821                     Cytosol(Enhanced)                Cytosol  \n",
      "O75822                     Cytosol(Enhanced)                Cytosol  \n",
      "O94822                     Cytosol(Enhanced)                Cytosol  \n",
      "O94826                Mitochondria(Enhanced)           Mitochondria  \n",
      "O95139                Mitochondria(Enhanced)           Mitochondria  \n",
      "O95159             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O95202                Mitochondria(Enhanced)           Mitochondria  \n",
      "O95292       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "O95613                  Centrosome(Enhanced)             Centrosome  \n",
      "O95747                     Cytosol(Enhanced)                Cytosol  \n",
      "P00387       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "P04843       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "P07195                     Cytosol(Enhanced)                Cytosol  \n",
      "P07814                     Cytosol(Enhanced)                Cytosol  \n",
      "...                                      ...                    ...  \n",
      "Q9NTK5                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9NUY8             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "Q9NV92                    Vesicles(Enhanced)               Vesicles  \n",
      "Q9NW68             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "Q9NX74                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9NXF8             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "Q9NYP7       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "Q9NZB2                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9P0J0                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9P0L0       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "Q9P2E9       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "Q9P2R3                   Endosomes(Enhanced)              Endosomes  \n",
      "Q9UHD8             Actin filaments(Enhanced)        Actin filaments  \n",
      "Q9UHV9                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9UN86                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9UPN7                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y266                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y371                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y3D6                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y3P9                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y4E8                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y4W6                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y512                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y520                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y5J7                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y5L0                    Vesicles(Enhanced)               Vesicles  \n",
      "Q9Y617                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y6I3                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y6M1                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y6Y8                    Vesicles(Enhanced)               Vesicles  \n",
      "\n",
      "[249 rows x 4 columns]\n",
      "        Gene Symbol                                        Description  \\\n",
      "Protein                                                                  \n",
      "O00291         HIP1                   huntingtin interacting protein 1   \n",
      "O00425      IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "O00559        EBAG9  estrogen receptor binding site associated anti...   \n",
      "O00767          SCD                            stearoyl-CoA desaturase   \n",
      "O14530       TXNDC9                    thioredoxin domain containing 9   \n",
      "O14579         COPE           coatomer protein complex subunit epsilon   \n",
      "O14662        STX16                                        syntaxin 16   \n",
      "O14949        UQCRQ  ubiquinol-cytochrome c reductase complex III s...   \n",
      "O14967         CLGN                                           calmegin   \n",
      "O15258         RER1  retention in endoplasmic reticulum sorting rec...   \n",
      "O15392        BIRC5                baculoviral IAP repeat containing 5   \n",
      "O15400         STX7                                         syntaxin 7   \n",
      "O43396        TXNL1                                 thioredoxin like 1   \n",
      "O43615       TIMM44     translocase of inner mitochondrial membrane 44   \n",
      "O43795        MYO1B                                          myosin IB   \n",
      "O75534        CSDE1                    cold shock domain containing E1   \n",
      "O75821        EIF3G  eukaryotic translation initiation factor 3 sub...   \n",
      "O75822        EIF3J  eukaryotic translation initiation factor 3 sub...   \n",
      "O94822         LTN1             listerin E3 ubiquitin protein ligase 1   \n",
      "O94826       TOMM70     translocase of outer mitochondrial membrane 70   \n",
      "O95139       NDUFB6          NADH:ubiquinone oxidoreductase subunit B6   \n",
      "O95159        ZFPL1                         zinc finger protein like 1   \n",
      "O95202        LETM1  leucine zipper and EF-hand containing transmem...   \n",
      "O95292         VAPB                    VAMP associated protein B and C   \n",
      "O95613         PCNT                                        pericentrin   \n",
      "O95747        OXSR1               oxidative stress responsive kinase 1   \n",
      "P00387       CYB5R3                          cytochrome b5 reductase 3   \n",
      "P04843         RPN1                                       ribophorin I   \n",
      "P07195         LDHB                            lactate dehydrogenase B   \n",
      "P07814         EPRS                    glutamyl-prolyl-tRNA synthetase   \n",
      "...             ...                                                ...   \n",
      "Q9NTK5         OLA1                                  Obg like ATPase 1   \n",
      "Q9NUY8      TBC1D23                       TBC1 domain family member 23   \n",
      "Q9NV92       NDFIP2                 Nedd4 family interacting protein 2   \n",
      "Q9NW68        BSDC1                            BSD domain containing 1   \n",
      "Q9NX74         DUS2                          dihydrouridine synthase 2   \n",
      "Q9NXF8       ZDHHC7                 zinc finger DHHC-type containing 7   \n",
      "Q9NYP7       ELOVL5                        ELOVL fatty acid elongase 5   \n",
      "Q9NZB2      FAM120A               family with sequence similarity 120A   \n",
      "Q9P0J0      NDUFA13         NADH:ubiquinone oxidoreductase subunit A13   \n",
      "Q9P0L0         VAPA                          VAMP associated protein A   \n",
      "Q9P2E9        RRBP1                         ribosome binding protein 1   \n",
      "Q9P2R3       ANKFY1        ankyrin repeat and FYVE domain containing 1   \n",
      "Q9UHD8        9-Sep                                           septin 9   \n",
      "Q9UHV9        PFDN2                                prefoldin subunit 2   \n",
      "Q9UN86        G3BP2              G3BP stress granule assembly factor 2   \n",
      "Q9UPN7       PPP6R1         protein phosphatase 6 regulatory subunit 1   \n",
      "Q9Y266         NUDC   nuclear distribution C, dynein complex regulator   \n",
      "Q9Y371      SH3GLB1     SH3 domain containing GRB2 like, endophilin B1   \n",
      "Q9Y3D6         FIS1                           fission, mitochondrial 1   \n",
      "Q9Y3P9      RABGAP1                    RAB GTPase activating protein 1   \n",
      "Q9Y4E8        USP15                    ubiquitin specific peptidase 15   \n",
      "Q9Y4W6       AFG3L2           AFG3 like matrix AAA peptidase subunit 2   \n",
      "Q9Y512       SAMM50    SAMM50 sorting and assembly machinery component   \n",
      "Q9Y520       PRRC2C                        proline rich coiled-coil 2C   \n",
      "Q9Y5J7        TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "Q9Y5L0        TNPO3                                      transportin 3   \n",
      "Q9Y617        PSAT1                   phosphoserine aminotransferase 1   \n",
      "Q9Y6I3         EPN1                                            epsin 1   \n",
      "Q9Y6M1      IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "Q9Y6Y8      SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "               Subcellular_Loc  \n",
      "Protein                         \n",
      "O00291                Vesicles  \n",
      "O00425                 Cytosol  \n",
      "O00559         Golgi apparatus  \n",
      "O00767   Endoplasmic reticulum  \n",
      "O14530                 Cytosol  \n",
      "O14579         Golgi apparatus  \n",
      "O14662                Vesicles  \n",
      "O14949            Mitochondria  \n",
      "O14967   Endoplasmic reticulum  \n",
      "O15258         Golgi apparatus  \n",
      "O15392      Cytokinetic bridge  \n",
      "O15400               Lysosomes  \n",
      "O43396                 Cytosol  \n",
      "O43615            Mitochondria  \n",
      "O43795         Plasma membrane  \n",
      "O75534                 Cytosol  \n",
      "O75821                 Cytosol  \n",
      "O75822                 Cytosol  \n",
      "O94822                 Cytosol  \n",
      "O94826            Mitochondria  \n",
      "O95139            Mitochondria  \n",
      "O95159         Golgi apparatus  \n",
      "O95202            Mitochondria  \n",
      "O95292   Endoplasmic reticulum  \n",
      "O95613              Centrosome  \n",
      "O95747                 Cytosol  \n",
      "P00387   Endoplasmic reticulum  \n",
      "P04843   Endoplasmic reticulum  \n",
      "P07195                 Cytosol  \n",
      "P07814                 Cytosol  \n",
      "...                        ...  \n",
      "Q9NTK5                 Cytosol  \n",
      "Q9NUY8         Golgi apparatus  \n",
      "Q9NV92                Vesicles  \n",
      "Q9NW68         Golgi apparatus  \n",
      "Q9NX74                 Cytosol  \n",
      "Q9NXF8         Golgi apparatus  \n",
      "Q9NYP7   Endoplasmic reticulum  \n",
      "Q9NZB2                 Cytosol  \n",
      "Q9P0J0            Mitochondria  \n",
      "Q9P0L0   Endoplasmic reticulum  \n",
      "Q9P2E9   Endoplasmic reticulum  \n",
      "Q9P2R3               Endosomes  \n",
      "Q9UHD8         Actin filaments  \n",
      "Q9UHV9                 Cytosol  \n",
      "Q9UN86                 Cytosol  \n",
      "Q9UPN7                 Cytosol  \n",
      "Q9Y266                 Cytosol  \n",
      "Q9Y371                 Cytosol  \n",
      "Q9Y3D6            Mitochondria  \n",
      "Q9Y3P9                 Cytosol  \n",
      "Q9Y4E8                 Cytosol  \n",
      "Q9Y4W6            Mitochondria  \n",
      "Q9Y512            Mitochondria  \n",
      "Q9Y520                 Cytosol  \n",
      "Q9Y5J7            Mitochondria  \n",
      "Q9Y5L0                Vesicles  \n",
      "Q9Y617                 Cytosol  \n",
      "Q9Y6I3                 Cytosol  \n",
      "Q9Y6M1                 Cytosol  \n",
      "Q9Y6Y8                Vesicles  \n",
      "\n",
      "[249 rows x 3 columns]\n",
      "        Gene Symbol                                        Description  \\\n",
      "Protein                                                                  \n",
      "A1L020        MEX3A                  mex-3 RNA binding family member A   \n",
      "A5YKK6        CNOT1           CCR4-NOT transcription complex subunit 1   \n",
      "O00161       SNAP23                  synaptosome associated protein 23   \n",
      "O00165         HAX1                       HCLS1 associated protein X-1   \n",
      "O00170          AIP      aryl hydrocarbon receptor interacting protein   \n",
      "O00291         HIP1                   huntingtin interacting protein 1   \n",
      "O00299        CLIC1                   chloride intracellular channel 1   \n",
      "O00425      IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "O00462        MANBA                                   mannosidase beta   \n",
      "O00463        TRAF5                   TNF receptor associated factor 5   \n",
      "O00483       NDUFA4            NDUFA4 mitochondrial complex associated   \n",
      "O00559        EBAG9  estrogen receptor binding site associated anti...   \n",
      "O00767          SCD                            stearoyl-CoA desaturase   \n",
      "O14494        PLPP1                         phospholipid phosphatase 1   \n",
      "O14530       TXNDC9                    thioredoxin domain containing 9   \n",
      "O14579         COPE           coatomer protein complex subunit epsilon   \n",
      "O14639       ABLIM1                        actin binding LIM protein 1   \n",
      "O14662        STX16                                        syntaxin 16   \n",
      "O14828       SCAMP3               secretory carrier membrane protein 3   \n",
      "O14925       TIMM23     translocase of inner mitochondrial membrane 23   \n",
      "O14949        UQCRQ  ubiquinol-cytochrome c reductase complex III s...   \n",
      "O14967         CLGN                                           calmegin   \n",
      "O15078       CEP290                            centrosomal protein 290   \n",
      "O15121        DEGS1                 delta 4-desaturase, sphingolipid 1   \n",
      "O15182        CETN3                                          centrin 3   \n",
      "O15258         RER1  retention in endoplasmic reticulum sorting rec...   \n",
      "O15269       SPTLC1  serine palmitoyltransferase long chain base su...   \n",
      "O15371        EIF3D  eukaryotic translation initiation factor 3 sub...   \n",
      "O15392        BIRC5                baculoviral IAP repeat containing 5   \n",
      "O15400         STX7                                         syntaxin 7   \n",
      "...             ...                                                ...   \n",
      "Q9Y285        FARSA         phenylalanyl-tRNA synthetase subunit alpha   \n",
      "Q9Y2Q0       ATP8A1               ATPase phospholipid transporting 8A1   \n",
      "Q9Y2Q3        GSTK1                  glutathione S-transferase kappa 1   \n",
      "Q9Y371      SH3GLB1     SH3 domain containing GRB2 like, endophilin B1   \n",
      "Q9Y3C4        TPRKB                             TP53RK binding protein   \n",
      "Q9Y3D6         FIS1                           fission, mitochondrial 1   \n",
      "Q9Y3P9      RABGAP1                    RAB GTPase activating protein 1   \n",
      "Q9Y3Q3        TMED3            transmembrane p24 trafficking protein 3   \n",
      "Q9Y4E8        USP15                    ubiquitin specific peptidase 15   \n",
      "Q9Y4P3         TBL2                             transducin beta like 2   \n",
      "Q9Y4W6       AFG3L2           AFG3 like matrix AAA peptidase subunit 2   \n",
      "Q9Y512       SAMM50    SAMM50 sorting and assembly machinery component   \n",
      "Q9Y520       PRRC2C                        proline rich coiled-coil 2C   \n",
      "Q9Y5J7        TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "Q9Y5L0        TNPO3                                      transportin 3   \n",
      "Q9Y5S1        TRPV2  transient receptor potential cation channel su...   \n",
      "Q9Y5U9      IER3IP1   immediate early response 3 interacting protein 1   \n",
      "Q9Y5W7        SNX14                                   sorting nexin 14   \n",
      "Q9Y5X2         SNX8                                    sorting nexin 8   \n",
      "Q9Y613        FHOD1              formin homology 2 domain containing 1   \n",
      "Q9Y617        PSAT1                   phosphoserine aminotransferase 1   \n",
      "Q9Y680        FKBP7                            FKBP prolyl isomerase 7   \n",
      "Q9Y696        CLIC4                   chloride intracellular channel 4   \n",
      "Q9Y6C9        MTCH2                            mitochondrial carrier 2   \n",
      "Q9Y6D5      ARFGEF2  ADP ribosylation factor guanine nucleotide exc...   \n",
      "Q9Y6I3         EPN1                                            epsin 1   \n",
      "Q9Y6M1      IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "Q9Y6M9       NDUFB9          NADH:ubiquinone oxidoreductase subunit B9   \n",
      "Q9Y6Y0     IVNS1ABP               influenza virus NS1A binding protein   \n",
      "Q9Y6Y8      SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "        Subcellular Location (Protein Atlas)        Subcellular_Loc  \n",
      "Protein                                                              \n",
      "A1L020                    Cytosol(Supported)                Cytosol  \n",
      "A5YKK6                    Cytosol(Supported)                Cytosol  \n",
      "O00161            Plasma membrane(Supported)        Plasma membrane  \n",
      "O00165               Mitochondria(Supported)           Mitochondria  \n",
      "O00170                    Cytosol(Supported)                Cytosol  \n",
      "O00291                    Vesicles(Enhanced)               Vesicles  \n",
      "O00299                    Cytosol(Supported)                Cytosol  \n",
      "O00425                     Cytosol(Enhanced)                Cytosol  \n",
      "O00462                   Vesicles(Supported)               Vesicles  \n",
      "O00463                    Cytosol(Supported)                Cytosol  \n",
      "O00483               Mitochondria(Supported)           Mitochondria  \n",
      "O00559             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O00767       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "O14494            Plasma membrane(Supported)        Plasma membrane  \n",
      "O14530                     Cytosol(Enhanced)                Cytosol  \n",
      "O14579             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O14639                    Cytosol(Supported)                Cytosol  \n",
      "O14662                    Vesicles(Enhanced)               Vesicles  \n",
      "O14828                   Vesicles(Supported)               Vesicles  \n",
      "O14925               Mitochondria(Supported)           Mitochondria  \n",
      "O14949                Mitochondria(Enhanced)           Mitochondria  \n",
      "O14967       Endoplasmic reticulum(Enhanced)  Endoplasmic reticulum  \n",
      "O15078                 Centrosome(Supported)             Centrosome  \n",
      "O15121               Mitochondria(Supported)           Mitochondria  \n",
      "O15182                 Centrosome(Supported)             Centrosome  \n",
      "O15258             Golgi apparatus(Enhanced)        Golgi apparatus  \n",
      "O15269      Endoplasmic reticulum(Supported)  Endoplasmic reticulum  \n",
      "O15371                    Cytosol(Supported)                Cytosol  \n",
      "O15392          Cytokinetic bridge(Enhanced)     Cytokinetic bridge  \n",
      "O15400                   Lysosomes(Enhanced)              Lysosomes  \n",
      "...                                      ...                    ...  \n",
      "Q9Y285                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y2Q0                   Vesicles(Supported)               Vesicles  \n",
      "Q9Y2Q3                Peroxisomes(Supported)            Peroxisomes  \n",
      "Q9Y371                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y3C4                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y3D6                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y3P9                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y3Q3            Golgi apparatus(Supported)        Golgi apparatus  \n",
      "Q9Y4E8                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y4P3                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y4W6                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y512                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y520                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y5J7                Mitochondria(Enhanced)           Mitochondria  \n",
      "Q9Y5L0                    Vesicles(Enhanced)               Vesicles  \n",
      "Q9Y5S1            Plasma membrane(Supported)        Plasma membrane  \n",
      "Q9Y5U9      Endoplasmic reticulum(Supported)  Endoplasmic reticulum  \n",
      "Q9Y5W7                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y5X2                   Vesicles(Supported)               Vesicles  \n",
      "Q9Y613                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y617                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y680      Endoplasmic reticulum(Supported)  Endoplasmic reticulum  \n",
      "Q9Y696                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y6C9               Mitochondria(Supported)           Mitochondria  \n",
      "Q9Y6D5            Golgi apparatus(Supported)        Golgi apparatus  \n",
      "Q9Y6I3                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y6M1                     Cytosol(Enhanced)                Cytosol  \n",
      "Q9Y6M9               Mitochondria(Supported)           Mitochondria  \n",
      "Q9Y6Y0                    Cytosol(Supported)                Cytosol  \n",
      "Q9Y6Y8                    Vesicles(Enhanced)               Vesicles  \n",
      "\n",
      "[681 rows x 4 columns]\n",
      "        Gene Symbol                                        Description  \\\n",
      "Protein                                                                  \n",
      "A1L020        MEX3A                  mex-3 RNA binding family member A   \n",
      "A5YKK6        CNOT1           CCR4-NOT transcription complex subunit 1   \n",
      "O00161       SNAP23                  synaptosome associated protein 23   \n",
      "O00165         HAX1                       HCLS1 associated protein X-1   \n",
      "O00170          AIP      aryl hydrocarbon receptor interacting protein   \n",
      "O00291         HIP1                   huntingtin interacting protein 1   \n",
      "O00299        CLIC1                   chloride intracellular channel 1   \n",
      "O00425      IGF2BP3  insulin like growth factor 2 mRNA binding prot...   \n",
      "O00462        MANBA                                   mannosidase beta   \n",
      "O00463        TRAF5                   TNF receptor associated factor 5   \n",
      "O00483       NDUFA4            NDUFA4 mitochondrial complex associated   \n",
      "O00559        EBAG9  estrogen receptor binding site associated anti...   \n",
      "O00767          SCD                            stearoyl-CoA desaturase   \n",
      "O14494        PLPP1                         phospholipid phosphatase 1   \n",
      "O14530       TXNDC9                    thioredoxin domain containing 9   \n",
      "O14579         COPE           coatomer protein complex subunit epsilon   \n",
      "O14639       ABLIM1                        actin binding LIM protein 1   \n",
      "O14662        STX16                                        syntaxin 16   \n",
      "O14828       SCAMP3               secretory carrier membrane protein 3   \n",
      "O14925       TIMM23     translocase of inner mitochondrial membrane 23   \n",
      "O14949        UQCRQ  ubiquinol-cytochrome c reductase complex III s...   \n",
      "O14967         CLGN                                           calmegin   \n",
      "O15078       CEP290                            centrosomal protein 290   \n",
      "O15121        DEGS1                 delta 4-desaturase, sphingolipid 1   \n",
      "O15182        CETN3                                          centrin 3   \n",
      "O15258         RER1  retention in endoplasmic reticulum sorting rec...   \n",
      "O15269       SPTLC1  serine palmitoyltransferase long chain base su...   \n",
      "O15371        EIF3D  eukaryotic translation initiation factor 3 sub...   \n",
      "O15392        BIRC5                baculoviral IAP repeat containing 5   \n",
      "O15400         STX7                                         syntaxin 7   \n",
      "...             ...                                                ...   \n",
      "Q9Y285        FARSA         phenylalanyl-tRNA synthetase subunit alpha   \n",
      "Q9Y2Q0       ATP8A1               ATPase phospholipid transporting 8A1   \n",
      "Q9Y2Q3        GSTK1                  glutathione S-transferase kappa 1   \n",
      "Q9Y371      SH3GLB1     SH3 domain containing GRB2 like, endophilin B1   \n",
      "Q9Y3C4        TPRKB                             TP53RK binding protein   \n",
      "Q9Y3D6         FIS1                           fission, mitochondrial 1   \n",
      "Q9Y3P9      RABGAP1                    RAB GTPase activating protein 1   \n",
      "Q9Y3Q3        TMED3            transmembrane p24 trafficking protein 3   \n",
      "Q9Y4E8        USP15                    ubiquitin specific peptidase 15   \n",
      "Q9Y4P3         TBL2                             transducin beta like 2   \n",
      "Q9Y4W6       AFG3L2           AFG3 like matrix AAA peptidase subunit 2   \n",
      "Q9Y512       SAMM50    SAMM50 sorting and assembly machinery component   \n",
      "Q9Y520       PRRC2C                        proline rich coiled-coil 2C   \n",
      "Q9Y5J7        TIMM9      translocase of inner mitochondrial membrane 9   \n",
      "Q9Y5L0        TNPO3                                      transportin 3   \n",
      "Q9Y5S1        TRPV2  transient receptor potential cation channel su...   \n",
      "Q9Y5U9      IER3IP1   immediate early response 3 interacting protein 1   \n",
      "Q9Y5W7        SNX14                                   sorting nexin 14   \n",
      "Q9Y5X2         SNX8                                    sorting nexin 8   \n",
      "Q9Y613        FHOD1              formin homology 2 domain containing 1   \n",
      "Q9Y617        PSAT1                   phosphoserine aminotransferase 1   \n",
      "Q9Y680        FKBP7                            FKBP prolyl isomerase 7   \n",
      "Q9Y696        CLIC4                   chloride intracellular channel 4   \n",
      "Q9Y6C9        MTCH2                            mitochondrial carrier 2   \n",
      "Q9Y6D5      ARFGEF2  ADP ribosylation factor guanine nucleotide exc...   \n",
      "Q9Y6I3         EPN1                                            epsin 1   \n",
      "Q9Y6M1      IGF2BP2  insulin like growth factor 2 mRNA binding prot...   \n",
      "Q9Y6M9       NDUFB9          NADH:ubiquinone oxidoreductase subunit B9   \n",
      "Q9Y6Y0     IVNS1ABP               influenza virus NS1A binding protein   \n",
      "Q9Y6Y8      SEC23IP                          SEC23 interacting protein   \n",
      "\n",
      "               Subcellular_Loc  \n",
      "Protein                         \n",
      "A1L020                 Cytosol  \n",
      "A5YKK6                 Cytosol  \n",
      "O00161         Plasma membrane  \n",
      "O00165            Mitochondria  \n",
      "O00170                 Cytosol  \n",
      "O00291                Vesicles  \n",
      "O00299                 Cytosol  \n",
      "O00425                 Cytosol  \n",
      "O00462                Vesicles  \n",
      "O00463                 Cytosol  \n",
      "O00483            Mitochondria  \n",
      "O00559         Golgi apparatus  \n",
      "O00767   Endoplasmic reticulum  \n",
      "O14494         Plasma membrane  \n",
      "O14530                 Cytosol  \n",
      "O14579         Golgi apparatus  \n",
      "O14639                 Cytosol  \n",
      "O14662                Vesicles  \n",
      "O14828                Vesicles  \n",
      "O14925            Mitochondria  \n",
      "O14949            Mitochondria  \n",
      "O14967   Endoplasmic reticulum  \n",
      "O15078              Centrosome  \n",
      "O15121            Mitochondria  \n",
      "O15182              Centrosome  \n",
      "O15258         Golgi apparatus  \n",
      "O15269   Endoplasmic reticulum  \n",
      "O15371                 Cytosol  \n",
      "O15392      Cytokinetic bridge  \n",
      "O15400               Lysosomes  \n",
      "...                        ...  \n",
      "Q9Y285                 Cytosol  \n",
      "Q9Y2Q0                Vesicles  \n",
      "Q9Y2Q3             Peroxisomes  \n",
      "Q9Y371                 Cytosol  \n",
      "Q9Y3C4                 Cytosol  \n",
      "Q9Y3D6            Mitochondria  \n",
      "Q9Y3P9                 Cytosol  \n",
      "Q9Y3Q3         Golgi apparatus  \n",
      "Q9Y4E8                 Cytosol  \n",
      "Q9Y4P3                 Cytosol  \n",
      "Q9Y4W6            Mitochondria  \n",
      "Q9Y512            Mitochondria  \n",
      "Q9Y520                 Cytosol  \n",
      "Q9Y5J7            Mitochondria  \n",
      "Q9Y5L0                Vesicles  \n",
      "Q9Y5S1         Plasma membrane  \n",
      "Q9Y5U9   Endoplasmic reticulum  \n",
      "Q9Y5W7                 Cytosol  \n",
      "Q9Y5X2                Vesicles  \n",
      "Q9Y613                 Cytosol  \n",
      "Q9Y617                 Cytosol  \n",
      "Q9Y680   Endoplasmic reticulum  \n",
      "Q9Y696                 Cytosol  \n",
      "Q9Y6C9            Mitochondria  \n",
      "Q9Y6D5         Golgi apparatus  \n",
      "Q9Y6I3                 Cytosol  \n",
      "Q9Y6M1                 Cytosol  \n",
      "Q9Y6M9            Mitochondria  \n",
      "Q9Y6Y0                 Cytosol  \n",
      "Q9Y6Y8                Vesicles  \n",
      "\n",
      "[681 rows x 3 columns]\n"
     ]
    }
   ],
   "source": [
    "# Rewriting subcellular location column to remove reliability score\n",
    "for item in enhancedprot.index:\n",
    "    string = enhancedprot.at[item, 'Subcellular Location (Protein Atlas)'].split('(')[0]\n",
    "    enhancedprot.at[item, 'Subcellular_Loc'] = string\n",
    "print(enhancedprot)\n",
    "enhancedprot.drop(columns=['Subcellular Location (Protein Atlas)'], inplace=True)\n",
    "print(enhancedprot)\n",
    "\n",
    "for item in enh_supprot.index:\n",
    "    string = enh_supprot.at[item, 'Subcellular Location (Protein Atlas)'].split('(')[0]\n",
    "    enh_supprot.at[item, 'Subcellular_Loc'] = string\n",
    "print(enh_supprot)\n",
    "enh_supprot.drop(columns=['Subcellular Location (Protein Atlas)'], inplace=True)\n",
    "print(enh_supprot)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Cytosol                          95\n",
      "Mitochondria                     41\n",
      "Endoplasmic reticulum            35\n",
      "Vesicles                         23\n",
      "Golgi apparatus                  20\n",
      "Plasma membrane                  14\n",
      "Peroxisomes                       6\n",
      "Centrosome                        5\n",
      "Endosomes                         2\n",
      "Actin filaments                   2\n",
      "Microtubule organizing center     1\n",
      "Microtubules                      1\n",
      "Lysosomes                         1\n",
      "Cell Junctions                    1\n",
      "Focal adhesion sites              1\n",
      "Cytokinetic bridge                1\n",
      "Name: Subcellular_Loc, dtype: int64\n",
      "['Actin filaments', 'Cell Junctions', 'Centrosome', 'Cytokinetic bridge', 'Cytosol', 'Endoplasmic reticulum', 'Endosomes', 'Focal adhesion sites', 'Golgi apparatus', 'Lysosomes', 'Microtubule organizing center', 'Microtubules', 'Mitochondria', 'Peroxisomes', 'Plasma membrane', 'Vesicles']\n",
      "Cytosol                          256\n",
      "Mitochondria                     100\n",
      "Vesicles                          87\n",
      "Endoplasmic reticulum             78\n",
      "Plasma membrane                   49\n",
      "Golgi apparatus                   48\n",
      "Centrosome                        19\n",
      "Peroxisomes                       10\n",
      "Microtubules                       9\n",
      "Cell Junctions                     4\n",
      "Cytoplasmic bodies                 3\n",
      "Actin filaments                    3\n",
      "Lipid droplets                     3\n",
      "Focal adhesion sites               3\n",
      "Microtubule organizing center      3\n",
      "Lysosomes                          2\n",
      "Endosomes                          2\n",
      "Cytokinetic bridge                 1\n",
      "Intermediate filaments             1\n",
      "Name: Subcellular_Loc, dtype: int64\n",
      "['Actin filaments', 'Cell Junctions', 'Centrosome', 'Cytokinetic bridge', 'Cytoplasmic bodies', 'Cytosol', 'Endoplasmic reticulum', 'Endosomes', 'Focal adhesion sites', 'Golgi apparatus', 'Intermediate filaments', 'Lipid droplets', 'Lysosomes', 'Microtubule organizing center', 'Microtubules', 'Mitochondria', 'Peroxisomes', 'Plasma membrane', 'Vesicles']\n"
     ]
    }
   ],
   "source": [
    "# Counting unique values in Subcellular_Loc column\n",
    "print(enhancedprot.Subcellular_Loc.value_counts())\n",
    "compartment_list = list(enhancedprot.Subcellular_Loc.unique())\n",
    "compartment_list.sort()\n",
    "print(compartment_list)\n",
    "\n",
    "print(enh_supprot.Subcellular_Loc.value_counts())\n",
    "compartment_list2 = list(enh_supprot.Subcellular_Loc.unique())\n",
    "compartment_list2.sort()\n",
    "print(compartment_list2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "There are 60 common proteins between the Itzhak et al. reference markers and our putative markers (enh only)\n",
      "There are 147 common proteins between the Itzhak et al. reference markers and our putative markers (enh_sup)\n",
      "There are 725 common proteins between the Itzhak et al. reference markers and replicate common proteins\n"
     ]
    }
   ],
   "source": [
    "# Checking concordance between Itzhak markers and putative markers\n",
    "Itzhakmarkers = pd.read_csv('Itzhak_HelaOrganelleMarkers.csv', index_col=3)\n",
    "Itzindex = Itzhakmarkers.index\n",
    "concordance = Itzindex.intersection(enhancedprot.index)\n",
    "concordance3 = Itzindex.intersection(enh_supprot.index)\n",
    "concordance2 = Itzindex.intersection(uniprot)\n",
    "print(\"There are {:d} common proteins between the Itzhak et al. reference markers and our putative markers (enh only)\".format(len(concordance)))\n",
    "print(\"There are {:d} common proteins between the Itzhak et al. reference markers and our putative markers (enh_sup)\".format(len(concordance3)))\n",
    "print(\"There are {:d} common proteins between the Itzhak et al. reference markers and replicate common proteins\".format(len(concordance2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "189\n",
      "['O00291', 'O00425', 'O00559', 'O14530', 'O14662', 'O14967', 'O15392', 'O43396', 'O43615', 'O43795', 'O75534', 'O75822', 'O94822', 'O95139', 'O95159', 'O95613', 'O95747', 'P00387', 'P07195', 'P07900', 'P08243', 'P12235', 'P13798', 'P14314', 'P14618', 'P14635', 'P15311', 'P18031', 'P18206', 'P19367', 'P22307', 'P23921', 'P26038', 'P26640', 'P28161', 'P29353', 'P30566', 'P34913', 'P35222', 'P35241', 'P36871', 'P36896', 'P40306', 'P40855', 'P43034', 'P47897', 'P48147', 'P49815', 'P50502', 'P51114', 'P51148', 'P51572', 'P51970', 'P52565', 'P54886', 'P55283', 'P61221', 'P62072', 'P62166', 'P62879', 'P63279', 'P80303', 'P83436', 'P98196', 'Q01433', 'Q04206', 'Q04637', 'Q04759', 'Q06787', 'Q07820', 'Q12792', 'Q12849', 'Q12933', 'Q13283', 'Q13310', 'Q13561', 'Q13586', 'Q14764', 'Q14789', 'Q15276', 'Q15293', 'Q15388', 'Q15785', 'Q15833', 'Q16543', 'Q16667', 'Q16891', 'Q460N5', 'Q49A88', 'Q49B96', 'Q56VL3', 'Q5PRF9', 'Q5T5C0', 'Q5T8D3', 'Q66K74', 'Q6IA69', 'Q6IQ20', 'Q6NXE6', 'Q6NXR4', 'Q6NXT4', 'Q6Y7W6', 'Q70UQ0', 'Q71RC2', 'Q7KZF4', 'Q86UE4', 'Q86UP2', 'Q86XZ4', 'Q8IUH4', 'Q8N0Z8', 'Q8N183', 'Q8N1F8', 'Q8N3C7', 'Q8N490', 'Q8N5M1', 'Q8NC51', 'Q8NE71', 'Q8TB72', 'Q8TEW0', 'Q8WU90', 'Q8WUF5', 'Q8WUM4', 'Q8WV92', 'Q8WWM7', 'Q8WXE0', 'Q92520', 'Q92530', 'Q92574', 'Q92616', 'Q92890', 'Q92934', 'Q969Z0', 'Q96A33', 'Q96A57', 'Q96AG4', 'Q96H55', 'Q96H79', 'Q96II8', 'Q96K37', 'Q96MW1', 'Q96NW4', 'Q96RD7', 'Q96S66', 'Q96TC7', 'Q99614', 'Q99623', 'Q99700', 'Q99961', 'Q9BQE4', 'Q9BQS8', 'Q9BSH4', 'Q9BSQ5', 'Q9BUN8', 'Q9BWM7', 'Q9BX10', 'Q9BX67', 'Q9BXI6', 'Q9H0X9', 'Q9H9B4', 'Q9HBM1', 'Q9HBR0', 'Q9NPB0', 'Q9NQW7', 'Q9NSI8', 'Q9NTK5', 'Q9NUY8', 'Q9NV92', 'Q9NW68', 'Q9NX74', 'Q9NXF8', 'Q9NYP7', 'Q9NZB2', 'Q9P0J0', 'Q9P0L0', 'Q9UN86', 'Q9UPN7', 'Q9Y266', 'Q9Y371', 'Q9Y3D6', 'Q9Y3P9', 'Q9Y4E8', 'Q9Y4W6', 'Q9Y512', 'Q9Y520', 'Q9Y5J7', 'Q9Y5L0', 'Q9Y617', 'Q9Y6I3', 'Q9Y6M1', 'Q9Y6Y8']\n",
      "534\n",
      "['A1L020', 'O00165', 'O00170', 'O00291', 'O00299', 'O00425', 'O00462', 'O00463', 'O00483', 'O00559', 'O14494', 'O14530', 'O14662', 'O14967', 'O15078', 'O15121', 'O15182', 'O15392', 'O43164', 'O43303', 'O43396', 'O43402', 'O43488', 'O43615', 'O43795', 'O43852', 'O60337', 'O60343', 'O60502', 'O60518', 'O60566', 'O75116', 'O75323', 'O75354', 'O75534', 'O75822', 'O94822', 'O94874', 'O94986', 'O95139', 'O95159', 'O95182', 'O95208', 'O95298', 'O95433', 'O95470', 'O95476', 'O95613', 'O95684', 'O95747', 'O95772', 'O95786', 'O95793', 'O95900', 'O95980', 'P00374', 'P00387', 'P00491', 'P00492', 'P04075', 'P04350', 'P06396', 'P07195', 'P07203', 'P07384', 'P07737', 'P07900', 'P08236', 'P08238', 'P08243', 'P10721', 'P11172', 'P11940', 'P12235', 'P12429', 'P13164', 'P13693', 'P13798', 'P14314', 'P14618', 'P14635', 'P14854', 'P15311', 'P15813', 'P16591', 'P16949', 'P16989', 'P18031', 'P18206', 'P19367', 'P19634', 'P20290', 'P21266', 'P21580', 'P22061', 'P22307', 'P22681', 'P23526', 'P23921', 'P26038', 'P26640', 'P28065', 'P28161', 'P28328', 'P28907', 'P29353', 'P29597', 'P30086', 'P30566', 'P31350', 'P32121', 'P33241', 'P33527', 'P34913', 'P35222', 'P35241', 'P35475', 'P36507', 'P36871', 'P36896', 'P36915', 'P37173', 'P40306', 'P40855', 'P41250', 'P43007', 'P43034', 'P43307', 'P43487', 'P46459', 'P46976', 'P47897', 'P48147', 'P49281', 'P49642', 'P49815', 'P49914', 'P50502', 'P51114', 'P51116', 'P51148', 'P51149', 'P51530', 'P51572', 'P51957', 'P51970', 'P52306', 'P52565', 'P52566', 'P52594', 'P52888', 'P53004', 'P53384', 'P53611', 'P53990', 'P54578', 'P54886', 'P55145', 'P55283', 'P55786', 'P55957', 'P60033', 'P61020', 'P61221', 'P61599', 'P62072', 'P62166', 'P62879', 'P63010', 'P63279', 'P78381', 'P80303', 'P82094', 'P83436', 'P98095', 'P98172', 'P98194', 'P98196', 'Q00341', 'Q00688', 'Q01433', 'Q01518', 'Q02833', 'Q03113', 'Q04206', 'Q04637', 'Q04759', 'Q05469', 'Q06787', 'Q06830', 'Q07617', 'Q07820', 'Q07960', 'Q08257', 'Q12792', 'Q12802', 'Q12849', 'Q12893', 'Q12933', 'Q12981', 'Q13283', 'Q13310', 'Q13371', 'Q13438', 'Q13459', 'Q13492', 'Q13496', 'Q13505', 'Q13561', 'Q13586', 'Q13614', 'Q13795', 'Q13885', 'Q14344', 'Q14653', 'Q14764', 'Q14789', 'Q147X3', 'Q14C86', 'Q14CB8', 'Q15004', 'Q15018', 'Q15036', 'Q15172', 'Q15181', 'Q15276', 'Q15293', 'Q15388', 'Q15599', 'Q155Q3', 'Q15785', 'Q15833', 'Q15942', 'Q16204', 'Q16537', 'Q16543', 'Q16667', 'Q16760', 'Q16891', 'Q1MSJ5', 'Q2VPK5', 'Q32MZ4', 'Q3T906', 'Q460N5', 'Q49A88', 'Q49B96', 'Q53FA7', 'Q53GL0', 'Q56VL3', 'Q5BJF6', 'Q5JSH3', 'Q5JTJ3', 'Q5PRF9', 'Q5SXH7', 'Q5T0N5', 'Q5T5C0', 'Q5T8D3', 'Q5T9A4', 'Q5VSL9', 'Q5VT06', 'Q5VWZ2', 'Q63HN8', 'Q63HQ0', 'Q66K74', 'Q6FI81', 'Q6IA69', 'Q6IBS0', 'Q6IQ20', 'Q6NXE6', 'Q6NXR4', 'Q6NXT4', 'Q6P1K1', 'Q6P1M0', 'Q6P4A7', 'Q6P4E1', 'Q6PJW8', 'Q6RW13', 'Q6Y7W6', 'Q6YN16', 'Q6ZUT1', 'Q70UQ0', 'Q71RC2', 'Q765P7', 'Q7KZF4', 'Q7L099', 'Q7L3B6', 'Q7Z6I6', 'Q7Z6L1', 'Q86TB9', 'Q86TI2', 'Q86TP1', 'Q86UB9', 'Q86UE4', 'Q86UP2', 'Q86V86', 'Q86VX2', 'Q86WA6', 'Q86XZ4', 'Q8IUH4', 'Q8IWF6', 'Q8IWR0', 'Q8IYD1', 'Q8IZ07', 'Q8IZ83', 'Q8N0U8', 'Q8N0Z3', 'Q8N0Z8', 'Q8N183', 'Q8N1F8', 'Q8N2F6', 'Q8N3C7', 'Q8N490', 'Q8N4S9', 'Q8N573', 'Q8N5K1', 'Q8N5M1', 'Q8N6H7', 'Q8N8J7', 'Q8NBN3', 'Q8NBQ5', 'Q8NC51', 'Q8NC60', 'Q8NCA5', 'Q8NCG7', 'Q8NCM8', 'Q8NE71', 'Q8NEW0', 'Q8NFV4', 'Q8NG11', 'Q8TAE8', 'Q8TAF3', 'Q8TB03', 'Q8TB72', 'Q8TCT8', 'Q8TCY9', 'Q8TCZ2', 'Q8TD31', 'Q8TDM6', 'Q8TE02', 'Q8TEW0', 'Q8WU90', 'Q8WUF5', 'Q8WUI4', 'Q8WUK0', 'Q8WUM4', 'Q8WV92', 'Q8WWM7', 'Q8WWP7', 'Q8WXE0', 'Q8WZA9', 'Q92520', 'Q92530', 'Q92538', 'Q92543', 'Q92574', 'Q92581', 'Q92616', 'Q92743', 'Q92834', 'Q92882', 'Q92890', 'Q92896', 'Q92934', 'Q93063', 'Q969J3', 'Q969Z0', 'Q96A33', 'Q96A57', 'Q96AG3', 'Q96AG4', 'Q96B36', 'Q96B97', 'Q96BD8', 'Q96CU9', 'Q96D31', 'Q96DH6', 'Q96F86', 'Q96GZ6', 'Q96H55', 'Q96H79', 'Q96II8', 'Q96JB5', 'Q96JJ3', 'Q96K37', 'Q96KG9', 'Q96LW7', 'Q96MW1', 'Q96NW4', 'Q96NY8', 'Q96RD7', 'Q96RG2', 'Q96RR4', 'Q96S66', 'Q96T83', 'Q96TC7', 'Q99426', 'Q99543', 'Q99614', 'Q99623', 'Q99700', 'Q99704', 'Q99707', 'Q99942', 'Q99961', 'Q9BPZ3', 'Q9BQE4', 'Q9BQP7', 'Q9BQS8', 'Q9BRQ6', 'Q9BSH4', 'Q9BSJ8', 'Q9BSQ5', 'Q9BT17', 'Q9BTT6', 'Q9BUN8', 'Q9BUT1', 'Q9BV73', 'Q9BVN2', 'Q9BWM7', 'Q9BX10', 'Q9BX67', 'Q9BXI6', 'Q9BXK5', 'Q9BY32', 'Q9BY49', 'Q9BYG5', 'Q9BZ72', 'Q9GZP9', 'Q9GZY4', 'Q9H0X9', 'Q9H2C0', 'Q9H2D1', 'Q9H3G5', 'Q9H3K2', 'Q9H3P7', 'Q9H425', 'Q9H4A3', 'Q9H4G0', 'Q9H5Y7', 'Q9H6L5', 'Q9H6X4', 'Q9H8H3', 'Q9H9B4', 'Q9HBD1', 'Q9HBF4', 'Q9HBM1', 'Q9HBR0', 'Q9HCM4', 'Q9HCP0', 'Q9NPB0', 'Q9NPI6', 'Q9NPQ8', 'Q9NQ48', 'Q9NQW7', 'Q9NR31', 'Q9NSI8', 'Q9NSU2', 'Q9NTK5', 'Q9NUY8', 'Q9NV92', 'Q9NV96', 'Q9NVI7', 'Q9NVT9', 'Q9NW68', 'Q9NWS8', 'Q9NX47', 'Q9NX74', 'Q9NXF8', 'Q9NXR7', 'Q9NXS2', 'Q9NXW2', 'Q9NYL2', 'Q9NYP7', 'Q9NZ52', 'Q9NZB2', 'Q9NZD2', 'Q9NZI8', 'Q9P032', 'Q9P0J0', 'Q9P0L0', 'Q9P0S3', 'Q9P209', 'Q9UBB6', 'Q9UBF8', 'Q9UBS0', 'Q9UBS8', 'Q9UEY8', 'Q9UG63', 'Q9UGJ1', 'Q9UHD1', 'Q9UHY1', 'Q9UI09', 'Q9UKG9', 'Q9UKK3', 'Q9UL15', 'Q9ULA0', 'Q9UM00', 'Q9UN86', 'Q9UNY4', 'Q9UP38', 'Q9UPN7', 'Q9UPU7', 'Q9UPY3', 'Q9UQN3', 'Q9Y223', 'Q9Y243', 'Q9Y266', 'Q9Y285', 'Q9Y2Q0', 'Q9Y2Q3', 'Q9Y371', 'Q9Y3C4', 'Q9Y3D6', 'Q9Y3P9', 'Q9Y4E8', 'Q9Y4P3', 'Q9Y4W6', 'Q9Y512', 'Q9Y520', 'Q9Y5J7', 'Q9Y5L0', 'Q9Y5S1', 'Q9Y5U9', 'Q9Y5W7', 'Q9Y613', 'Q9Y617', 'Q9Y680', 'Q9Y696', 'Q9Y6D5', 'Q9Y6I3', 'Q9Y6M1', 'Q9Y6M9', 'Q9Y6Y0', 'Q9Y6Y8']\n"
     ]
    }
   ],
   "source": [
    "# Pulling out enhanced proteins that aren't already in Itzhak to concatenate with detected Itzhak proteins\n",
    "exclusive_enhprot = [x for x in enhancedprot.index if x not in concordance2]\n",
    "print(len(exclusive_enhprot))\n",
    "print(exclusive_enhprot)\n",
    "\n",
    "exclusive_enh_supprot = [x for x in enh_supprot.index if x not in concordance2]\n",
    "print(len(exclusive_enh_supprot))\n",
    "print(exclusive_enh_supprot)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "914\n",
      "1259\n"
     ]
    }
   ],
   "source": [
    "# Appending exclusively enhanced proteins to concordance2, the list of Itzhak markers in common replicate proteins\n",
    "# (concordance2 also contains enhanced proteins common to Itzhak)\n",
    "concordance2 = list(concordance2)\n",
    "exclusive_enhprot = list(exclusive_enhprot)\n",
    "fullmarkers = concordance2 + exclusive_enhprot\n",
    "print(len(fullmarkers))\n",
    "\n",
    "exclusive_enh_supprot = list(exclusive_enh_supprot)\n",
    "fullmarkers_plus = concordance2 + exclusive_enh_supprot\n",
    "print(len(fullmarkers_plus))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "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>Organelle</th>\n",
       "      <th>HPA</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ProteinID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>O14639</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P12814</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O43707</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BR76</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q92828</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q14247</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q16643</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P21333</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P35579</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8WX93</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NR12</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q14651</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6NYC8</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96SB3</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y490</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P46939</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P2R3</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O00203</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y2T2</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P05067</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96BM9</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NVJ2</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q7Z3C6</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15904</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y487</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P61421</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P38606</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P21283</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P36543</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75348</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y223</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y243</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y266</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y285</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y2Q0</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y2Q3</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y371</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3C4</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3D6</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3P9</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y4E8</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y4P3</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y4W6</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y512</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y520</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5J7</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5L0</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5S1</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5U9</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5W7</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y613</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y617</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y680</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y696</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6D5</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6I3</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6M1</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6M9</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6Y0</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6Y8</th>\n",
       "      <td></td>\n",
       "      <td>NA</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1259 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Organelle HPA\n",
       "ProteinID              \n",
       "O14639               NA\n",
       "P12814               NA\n",
       "O43707               NA\n",
       "Q9BR76               NA\n",
       "Q92828               NA\n",
       "Q14247               NA\n",
       "Q16643               NA\n",
       "P21333               NA\n",
       "P35579               NA\n",
       "Q8WX93               NA\n",
       "Q9NR12               NA\n",
       "Q14651               NA\n",
       "Q6NYC8               NA\n",
       "Q96SB3               NA\n",
       "Q9Y490               NA\n",
       "P46939               NA\n",
       "Q9P2R3               NA\n",
       "O00203               NA\n",
       "Q9Y2T2               NA\n",
       "P05067               NA\n",
       "Q96BM9               NA\n",
       "Q9NVJ2               NA\n",
       "Q7Z3C6               NA\n",
       "Q15904               NA\n",
       "Q9Y487               NA\n",
       "P61421               NA\n",
       "P38606               NA\n",
       "P21283               NA\n",
       "P36543               NA\n",
       "O75348               NA\n",
       "...             ...  ..\n",
       "Q9Y223               NA\n",
       "Q9Y243               NA\n",
       "Q9Y266               NA\n",
       "Q9Y285               NA\n",
       "Q9Y2Q0               NA\n",
       "Q9Y2Q3               NA\n",
       "Q9Y371               NA\n",
       "Q9Y3C4               NA\n",
       "Q9Y3D6               NA\n",
       "Q9Y3P9               NA\n",
       "Q9Y4E8               NA\n",
       "Q9Y4P3               NA\n",
       "Q9Y4W6               NA\n",
       "Q9Y512               NA\n",
       "Q9Y520               NA\n",
       "Q9Y5J7               NA\n",
       "Q9Y5L0               NA\n",
       "Q9Y5S1               NA\n",
       "Q9Y5U9               NA\n",
       "Q9Y5W7               NA\n",
       "Q9Y613               NA\n",
       "Q9Y617               NA\n",
       "Q9Y680               NA\n",
       "Q9Y696               NA\n",
       "Q9Y6D5               NA\n",
       "Q9Y6I3               NA\n",
       "Q9Y6M1               NA\n",
       "Q9Y6M9               NA\n",
       "Q9Y6Y0               NA\n",
       "Q9Y6Y8               NA\n",
       "\n",
       "[1259 rows x 2 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Generate df from fullmarkers list\n",
    "markerdf = pd.DataFrame({'ProteinID':fullmarkers})\n",
    "markerdf['Organelle'] = ''\n",
    "markerdf['HPA'] = 'NA'\n",
    "markerdf.set_index('ProteinID', inplace=True)\n",
    "markerdf\n",
    "\n",
    "markerdf_plus = pd.DataFrame({'ProteinID':fullmarkers_plus})\n",
    "markerdf_plus['Organelle'] = ''\n",
    "markerdf_plus['HPA'] = 'NA'\n",
    "markerdf_plus.set_index('ProteinID', inplace=True)\n",
    "markerdf_plus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enh+Itzhak:\n",
      "Large Protein Complex            281\n",
      "ER                               104\n",
      "Cytosol                           88\n",
      "Endosome                          78\n",
      "Plasma membrane                   77\n",
      "Mitochondrion                     51\n",
      "Lysosome                          37\n",
      "Mitochondria                      27\n",
      "Golgi                             25\n",
      "Ergic/cisGolgi                    25\n",
      "Endoplasmic reticulum             19\n",
      "Peroxisome                        17\n",
      "Nuclear pore complex              17\n",
      "Actin binding proteins            16\n",
      "Vesicles                          16\n",
      "Golgi apparatus                   13\n",
      "ER_high_curvature                  9\n",
      "Centrosome                         5\n",
      "Peroxisomes                        3\n",
      "Cell Junctions                     1\n",
      "Focal adhesion sites               1\n",
      "Cytokinetic bridge                 1\n",
      "Actin filaments                    1\n",
      "Endosomes                          1\n",
      "Microtubule organizing center      1\n",
      "Name: Organelle, dtype: int64\n",
      "--------------------------------\n",
      "Enh+Itzhak w/ HPA annotation:\n",
      "NA                               665\n",
      "Cytosol                           95\n",
      "Mitochondria                      41\n",
      "Endoplasmic reticulum             35\n",
      "Vesicles                          23\n",
      "Golgi apparatus                   20\n",
      "Plasma membrane                   14\n",
      "Peroxisomes                        6\n",
      "Centrosome                         5\n",
      "Endosomes                          2\n",
      "Actin filaments                    2\n",
      "Cytokinetic bridge                 1\n",
      "Lysosomes                          1\n",
      "Microtubules                       1\n",
      "Cell Junctions                     1\n",
      "Focal adhesion sites               1\n",
      "Microtubule organizing center      1\n",
      "Name: HPA, dtype: int64\n",
      "--------------------------------\n",
      "Enh_Supp+Itzhak:\n",
      "Large Protein Complex            281\n",
      "Cytosol                          231\n",
      "Plasma membrane                  105\n",
      "ER                               104\n",
      "Endosome                          78\n",
      "Mitochondria                      72\n",
      "Vesicles                          63\n",
      "Mitochondrion                     51\n",
      "Endoplasmic reticulum             43\n",
      "Lysosome                          37\n",
      "Golgi apparatus                   36\n",
      "Ergic/cisGolgi                    25\n",
      "Golgi                             25\n",
      "Centrosome                        19\n",
      "Nuclear pore complex              17\n",
      "Peroxisome                        17\n",
      "Actin binding proteins            16\n",
      "ER_high_curvature                  9\n",
      "Peroxisomes                        5\n",
      "Microtubules                       4\n",
      "Focal adhesion sites               3\n",
      "Cell Junctions                     3\n",
      "Microtubule organizing center      3\n",
      "Lipid droplets                     3\n",
      "Cytoplasmic bodies                 3\n",
      "Actin filaments                    2\n",
      "Cytokinetic bridge                 1\n",
      "Intermediate filaments             1\n",
      "Lysosomes                          1\n",
      "Endosomes                          1\n",
      "Name: Organelle, dtype: int64\n",
      "--------------------------------\n",
      "Enh_Supp+Itzhak w/ HPA annotation:\n",
      "NA                               578\n",
      "Cytosol                          256\n",
      "Mitochondria                     100\n",
      "Vesicles                          87\n",
      "Endoplasmic reticulum             78\n",
      "Plasma membrane                   49\n",
      "Golgi apparatus                   48\n",
      "Centrosome                        19\n",
      "Peroxisomes                       10\n",
      "Microtubules                       9\n",
      "Cell Junctions                     4\n",
      "Cytoplasmic bodies                 3\n",
      "Microtubule organizing center      3\n",
      "Focal adhesion sites               3\n",
      "Actin filaments                    3\n",
      "Lipid droplets                     3\n",
      "Endosomes                          2\n",
      "Lysosomes                          2\n",
      "Cytokinetic bridge                 1\n",
      "Intermediate filaments             1\n",
      "Name: HPA, dtype: int64\n",
      "--------------------------------\n"
     ]
    }
   ],
   "source": [
    "# Adding on organelle assignment from Itzhak then from Metascape for those beyond\n",
    "for item in markerdf.index:\n",
    "    if item in Itzhakmarkers.index:\n",
    "        markerdf.at[item, 'Organelle'] = Itzhakmarkers.at[item, 'Compartment']\n",
    "    elif item in enhancedprot.index:\n",
    "        markerdf.at[item, 'Organelle'] = enhancedprot.at[item, 'Subcellular_Loc']\n",
    "\n",
    "for item in markerdf.index:\n",
    "    if item in enhancedprot.index:\n",
    "        markerdf.at[item, 'HPA'] = enhancedprot.at[item, 'Subcellular_Loc']\n",
    "\n",
    "print(\"Enh+Itzhak:\")\n",
    "print(markerdf.Organelle.value_counts(), end='\\n--------------------------------\\n')\n",
    "print(\"Enh+Itzhak w/ HPA annotation:\")\n",
    "print(markerdf.HPA.value_counts(), end='\\n--------------------------------\\n')\n",
    "\n",
    "for item in markerdf_plus.index:\n",
    "    if item in Itzhakmarkers.index:\n",
    "        markerdf_plus.at[item, 'Organelle'] = Itzhakmarkers.at[item, 'Compartment']\n",
    "    elif item in enh_supprot.index:\n",
    "        markerdf_plus.at[item, 'Organelle'] = enh_supprot.at[item, 'Subcellular_Loc']\n",
    "\n",
    "for item in markerdf_plus.index:\n",
    "    if item in enh_supprot.index:\n",
    "        markerdf_plus.at[item, 'HPA'] = enh_supprot.at[item, 'Subcellular_Loc']\n",
    "\n",
    "print(\"Enh_Supp+Itzhak:\")\n",
    "print(markerdf_plus.Organelle.value_counts(), end='\\n--------------------------------\\n')\n",
    "print(\"Enh_Supp+Itzhak w/ HPA annotation:\")\n",
    "print(markerdf_plus.HPA.value_counts(), end='\\n--------------------------------\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Large Protein Complex     369\n",
      "ER                        132\n",
      "Endosome                   79\n",
      "Plasma membrane            79\n",
      "Mitochondrion              78\n",
      "Golgi                      38\n",
      "Lysosome                   37\n",
      "Ergic/cisGolgi             25\n",
      "Peroxisome                 20\n",
      "Actin binding proteins     17\n",
      "Nuclear pore complex       17\n",
      "Vesicles                   16\n",
      "Microtubule proteins        6\n",
      "Cytokinetic bridge          1\n",
      "Name: Organelle, dtype: int64\n",
      "\n",
      "\n",
      "Large Protein Complex     518\n",
      "ER                        156\n",
      "Mitochondrion             123\n",
      "Plasma membrane           111\n",
      "Endosome                   79\n",
      "Vesicles                   63\n",
      "Golgi                      61\n",
      "Lysosome                   38\n",
      "Microtubule proteins       26\n",
      "Ergic/cisGolgi             25\n",
      "Peroxisome                 22\n",
      "Actin binding proteins     18\n",
      "Nuclear pore complex       17\n",
      "Cytokinetic bridge          1\n",
      "Name: Organelle, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "# Reclassify cytosol as large protein complex\n",
    "# Reclassify mitochondria as mitochondrion\n",
    "# Reclassify endoplasmic reticulum and ER_high_curvature as ER\n",
    "# Reclassify golgi apparatus as golgi\n",
    "# Reclassify actin filaments as actin binding proteins\n",
    "# Reclassify centrosome, MTOC, and microtubules as Microtubule Proteins\n",
    "# Reclassify peroxisomes as peroxisome\n",
    "# Reclassify endosomes as endosome\n",
    "# Reclassify cell junctions and focal adhesion sites as plasma membrane\n",
    "markerdf.at[markerdf['Organelle'] == 'Cytosol', 'Organelle'] = 'Large Protein Complex'\n",
    "markerdf.at[markerdf['Organelle'] == 'Mitochondria', 'Organelle'] = 'Mitochondrion'\n",
    "markerdf.at[((markerdf['Organelle'] == 'Endoplasmic reticulum') | (markerdf['Organelle'] == 'ER_high_curvature')), 'Organelle'] = 'ER'\n",
    "markerdf.at[markerdf['Organelle'] == 'Golgi apparatus', 'Organelle'] = 'Golgi'\n",
    "markerdf.at[markerdf['Organelle'] == 'Actin filaments', 'Organelle'] = 'Actin binding proteins'\n",
    "markerdf.at[((markerdf['Organelle'] == 'Centrosome') | (markerdf['Organelle'] == 'Microtubule organizing center') | \n",
    "             (markerdf['Organelle'] == 'Microtubules')), 'Organelle'] = 'Microtubule proteins'\n",
    "markerdf.at[markerdf['Organelle'] == 'Peroxisomes', 'Organelle'] = 'Peroxisome'\n",
    "markerdf.at[markerdf['Organelle'] == 'Endosomes', 'Organelle'] = 'Endosome'\n",
    "markerdf.at[((markerdf['Organelle'] == 'Cell Junctions') | \n",
    "             (markerdf['Organelle'] == 'Focal adhesion sites')), 'Organelle'] = 'Plasma membrane'\n",
    "\n",
    "markerdf.at[markerdf['HPA'] == 'Cytosol', 'HPA'] = 'Large Protein Complex'\n",
    "markerdf.at[markerdf['HPA'] == 'Mitochondria', 'HPA'] = 'Mitochondrion'\n",
    "markerdf.at[((markerdf['HPA'] == 'Endoplasmic reticulum') | (markerdf['HPA'] == 'ER_high_curvature')), 'HPA'] = 'ER'\n",
    "markerdf.at[markerdf['HPA'] == 'Golgi apparatus', 'HPA'] = 'Golgi'\n",
    "markerdf.at[markerdf['HPA'] == 'Actin filaments', 'HPA'] = 'Actin binding proteins'\n",
    "markerdf.at[((markerdf['HPA'] == 'Centrosome') | (markerdf['HPA'] == 'Microtubule organizing center') | \n",
    "             (markerdf['HPA'] == 'Microtubules')), 'HPA'] = 'Microtubule proteins'\n",
    "markerdf.at[markerdf['HPA'] == 'Peroxisomes', 'HPA'] = 'Peroxisome'\n",
    "markerdf.at[markerdf['HPA'] == 'Endosomes', 'HPA'] = 'Endosome'\n",
    "markerdf.at[((markerdf['HPA'] == 'Cell Junctions') | \n",
    "             (markerdf['HPA'] == 'Focal adhesion sites')), 'HPA'] = 'Plasma membrane'\n",
    "\n",
    "print(markerdf.Organelle.value_counts(), end='\\n\\n\\n')\n",
    "\n",
    "#-----------------------------------------------------------------------------------------\n",
    "markerdf_plus.at[((markerdf_plus['Organelle'] == 'Cytosol') | (markerdf_plus['Organelle'] == 'Cytoplasmic bodies') | \n",
    "                  (markerdf_plus['Organelle'] == 'Lipid droplets')), 'Organelle'] = 'Large Protein Complex'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Mitochondria', 'Organelle'] = 'Mitochondrion'\n",
    "markerdf_plus.at[((markerdf_plus['Organelle'] == 'Endoplasmic reticulum') | \n",
    "                  (markerdf_plus['Organelle'] == 'ER_high_curvature')), 'Organelle'] = 'ER'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Golgi apparatus', 'Organelle'] = 'Golgi'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Actin filaments', 'Organelle'] = 'Actin binding proteins'\n",
    "markerdf_plus.at[((markerdf_plus['Organelle'] == 'Centrosome') | (markerdf_plus['Organelle'] == 'Microtubule organizing center') | \n",
    "                  (markerdf_plus['Organelle'] == 'Microtubules')), 'Organelle'] = 'Microtubule proteins'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Peroxisomes', 'Organelle'] = 'Peroxisome'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Endosomes', 'Organelle'] = 'Endosome'\n",
    "markerdf_plus.at[((markerdf_plus['Organelle'] == 'Cell Junctions') | \n",
    "                  (markerdf_plus['Organelle'] == 'Focal adhesion sites')), 'Organelle'] = 'Plasma membrane'\n",
    "markerdf_plus.at[markerdf_plus['Organelle'] == 'Lysosomes', 'Organelle'] = 'Lysosome'\n",
    "markerdf_plus.drop('O43164', inplace=True)\n",
    "\n",
    "markerdf_plus.at[((markerdf_plus['HPA'] == 'Cytosol') | (markerdf_plus['HPA'] == 'Cytoplasmic bodies') | \n",
    "                  (markerdf_plus['HPA'] == 'Lipid droplets')), 'HPA'] = 'Large Protein Complex'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Mitochondria', 'HPA'] = 'Mitochondrion'\n",
    "markerdf_plus.at[((markerdf_plus['HPA'] == 'Endoplasmic reticulum') | \n",
    "                  (markerdf_plus['HPA'] == 'ER_high_curvature')), 'HPA'] = 'ER'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Golgi apparatus', 'HPA'] = 'Golgi'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Actin filaments', 'HPA'] = 'Actin binding proteins'\n",
    "markerdf_plus.at[((markerdf_plus['HPA'] == 'Centrosome') | (markerdf_plus['HPA'] == 'Microtubule organizing center') | \n",
    "                  (markerdf_plus['HPA'] == 'Microtubules')), 'HPA'] = 'Microtubule proteins'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Peroxisomes', 'HPA'] = 'Peroxisome'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Endosomes', 'HPA'] = 'Endosome'\n",
    "markerdf_plus.at[((markerdf_plus['HPA'] == 'Cell Junctions') | \n",
    "                  (markerdf_plus['HPA'] == 'Focal adhesion sites')), 'HPA'] = 'Plasma membrane'\n",
    "markerdf_plus.at[markerdf_plus['HPA'] == 'Lysosomes', 'HPA'] = 'Lysosome'\n",
    "\n",
    "print(markerdf_plus.Organelle.value_counts())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "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>Organelle</th>\n",
       "      <th>HPA</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ProteinID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>P86791</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6WKZ4</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15400</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Lysosomes</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q5JRA6</th>\n",
       "      <td>ER</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15258</th>\n",
       "      <td>Ergic/cisGolgi</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14579</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NRA8</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P49720</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Mitochondrion</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UHD8</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Actin binding proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P68366</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P10619</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q0VGL1</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H8M5</th>\n",
       "      <td>Plasma membrane</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                       Organelle                     HPA\n",
       "ProteinID                                               \n",
       "P86791                  Endosome                Vesicles\n",
       "Q6WKZ4                  Endosome                Vesicles\n",
       "O15400                  Endosome               Lysosomes\n",
       "Q5JRA6                        ER                Vesicles\n",
       "O15258            Ergic/cisGolgi                   Golgi\n",
       "O14579     Large Protein Complex                   Golgi\n",
       "Q9NRA8     Large Protein Complex                Vesicles\n",
       "P49720     Large Protein Complex           Mitochondrion\n",
       "Q9UHD8     Large Protein Complex  Actin binding proteins\n",
       "P68366     Large Protein Complex    Microtubule proteins\n",
       "P10619                  Lysosome                Vesicles\n",
       "Q0VGL1                  Lysosome                Vesicles\n",
       "Q9H8M5           Plasma membrane                Vesicles"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Checking agreement between Human Protein Atlas enhanced annotations and Itzhak annotations\n",
    "nonempty = markerdf[markerdf['HPA'] != 'NA']\n",
    "nonempty[nonempty['Organelle'] != nonempty['HPA']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "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>Organelle</th>\n",
       "      <th>HPA</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ProteinID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>O14639</th>\n",
       "      <td>Actin binding proteins</td>\n",
       "      <td>Large Protein Complex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q7Z3C6</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P86791</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15075</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H4M9</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Plasma membrane</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6WKZ4</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P61106</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14828</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5X2</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q92783</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15400</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Lysosome</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P51809</th>\n",
       "      <td>Endosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q5JRA6</th>\n",
       "      <td>ER</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15258</th>\n",
       "      <td>Ergic/cisGolgi</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P49755</th>\n",
       "      <td>Ergic/cisGolgi</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15363</th>\n",
       "      <td>Ergic/cisGolgi</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3Q3</th>\n",
       "      <td>Ergic/cisGolgi</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14579</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Golgi</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NRA8</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96KP1</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P49720</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Mitochondrion</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15437</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P53992</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UHD8</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Actin binding proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P68363</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BQE3</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P68366</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P07437</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P68371</th>\n",
       "      <td>Large Protein Complex</td>\n",
       "      <td>Microtubule proteins</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P10619</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P53634</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q0VGL1</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O43504</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Large Protein Complex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P38571</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P07602</th>\n",
       "      <td>Lysosome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8IXI1</th>\n",
       "      <td>Mitochondrion</td>\n",
       "      <td>Large Protein Complex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q92968</th>\n",
       "      <td>Peroxisome</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P78536</th>\n",
       "      <td>Plasma membrane</td>\n",
       "      <td>Large Protein Complex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O95782</th>\n",
       "      <td>Plasma membrane</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H8M5</th>\n",
       "      <td>Plasma membrane</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q14118</th>\n",
       "      <td>Plasma membrane</td>\n",
       "      <td>Vesicles</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                        Organelle                     HPA\n",
       "ProteinID                                                \n",
       "O14639     Actin binding proteins   Large Protein Complex\n",
       "Q7Z3C6                   Endosome                Vesicles\n",
       "P86791                   Endosome                Vesicles\n",
       "Q15075                   Endosome                Vesicles\n",
       "Q9H4M9                   Endosome         Plasma membrane\n",
       "Q6WKZ4                   Endosome                Vesicles\n",
       "P61106                   Endosome                Vesicles\n",
       "O14828                   Endosome                Vesicles\n",
       "Q9Y5X2                   Endosome                Vesicles\n",
       "Q92783                   Endosome                Vesicles\n",
       "O15400                   Endosome                Lysosome\n",
       "P51809                   Endosome                Vesicles\n",
       "Q5JRA6                         ER                Vesicles\n",
       "O15258             Ergic/cisGolgi                   Golgi\n",
       "P49755             Ergic/cisGolgi                   Golgi\n",
       "Q15363             Ergic/cisGolgi                Vesicles\n",
       "Q9Y3Q3             Ergic/cisGolgi                   Golgi\n",
       "O14579      Large Protein Complex                   Golgi\n",
       "Q9NRA8      Large Protein Complex                Vesicles\n",
       "Q96KP1      Large Protein Complex                Vesicles\n",
       "P49720      Large Protein Complex           Mitochondrion\n",
       "Q15437      Large Protein Complex                Vesicles\n",
       "P53992      Large Protein Complex                Vesicles\n",
       "Q9UHD8      Large Protein Complex  Actin binding proteins\n",
       "P68363      Large Protein Complex    Microtubule proteins\n",
       "Q9BQE3      Large Protein Complex    Microtubule proteins\n",
       "P68366      Large Protein Complex    Microtubule proteins\n",
       "P07437      Large Protein Complex    Microtubule proteins\n",
       "P68371      Large Protein Complex    Microtubule proteins\n",
       "P10619                   Lysosome                Vesicles\n",
       "P53634                   Lysosome                Vesicles\n",
       "Q0VGL1                   Lysosome                Vesicles\n",
       "O43504                   Lysosome   Large Protein Complex\n",
       "P38571                   Lysosome                Vesicles\n",
       "P07602                   Lysosome                Vesicles\n",
       "Q8IXI1              Mitochondrion   Large Protein Complex\n",
       "Q92968                 Peroxisome                Vesicles\n",
       "P78536            Plasma membrane   Large Protein Complex\n",
       "O95782            Plasma membrane                Vesicles\n",
       "Q9H8M5            Plasma membrane                Vesicles\n",
       "Q14118            Plasma membrane                Vesicles"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Checking agreement between Human Protein Atlas enh_supp annotations and Itzhak annotations\n",
    "nonempty_plus = markerdf_plus[markerdf_plus['HPA'] != 'NA']\n",
    "nonempty_plus[nonempty_plus['Organelle'] != nonempty_plus['HPA']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index(['O00291', 'O14662', 'P98196', 'Q15276', 'Q8IUH4', 'Q8N0Z8', 'Q8N1F8',\n",
      "       'Q8N3C7', 'Q8WV92', 'Q9BQS8', 'Q9BX10', 'Q9H0X9', 'Q9NPB0', 'Q9NV92',\n",
      "       'Q9Y5L0', 'Q9Y6Y8'],\n",
      "      dtype='object', name='ProteinID')\n",
      "Index(['O15155', 'Q969X5', 'Q96RQ1', 'Q9Y282', 'Q9BS26', 'Q9Y3E0', 'O14653',\n",
      "       'P24390', 'P49257', 'Q12907', 'Q9H0V9', 'P61019', 'Q8WUD1', 'O15258',\n",
      "       'Q13190', 'O15260', 'Q13445', 'P49755', 'Q15363', 'Q9Y3Q3', 'Q7Z7H5',\n",
      "       'Q9Y3A6', 'Q9Y3B3', 'Q9BVK6', 'Q969M3'],\n",
      "      dtype='object', name='ProteinID')\n"
     ]
    }
   ],
   "source": [
    "# Examining Vesicles proteins to sort into more articulated organelles\n",
    "# Also examined Ergic/cisGolgi proteins but didn't appear to be easily differentiable one way or the other\n",
    "print(markerdf[markerdf['Organelle'] == 'Vesicles'].index)\n",
    "print(markerdf[markerdf['Organelle'] == 'Ergic/cisGolgi'].index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Large Protein Complex     369\n",
       "ER                        135\n",
       "Endosome                   81\n",
       "Plasma membrane            79\n",
       "Mitochondrion              78\n",
       "Golgi                      43\n",
       "Lysosome                   38\n",
       "Ergic/cisGolgi             21\n",
       "Peroxisome                 20\n",
       "Actin binding proteins     17\n",
       "Nuclear pore complex       17\n",
       "Microtubule proteins        6\n",
       "Cytokinetic bridge          1\n",
       "Name: Organelle, dtype: int64"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## Itzhak+Enhanced only proteins\n",
    "\n",
    "# Proteins for Endosome:\n",
    "# Q15276, Q8WV92\n",
    "markerdf.at['Q15276', 'Organelle'] = 'Endosome'\n",
    "markerdf.at['Q8WV92', 'Organelle'] = 'Endosome'\n",
    "\n",
    "# Proteins for Lysosome:\n",
    "# Q8N1F8\n",
    "markerdf.at['Q8N1F8', 'Organelle'] = 'Lysosome'\n",
    "\n",
    "# Proteins for ER:\n",
    "# Q9H0X9, Q9Y6Y8, Q9BS26\n",
    "markerdf.at['Q9H0X9', 'Organelle'] = 'ER'\n",
    "markerdf.at['Q9Y6Y8', 'Organelle'] = 'ER'\n",
    "markerdf.at['Q9BS26', 'Organelle'] = 'ER'\n",
    "\n",
    "# Proteins for Golgi:\n",
    "# O14662, Q8IUH4, Q9Y3E0, O15258, Q13190\n",
    "markerdf.at['O14662', 'Organelle'] = 'Golgi'\n",
    "markerdf.at['Q8IUH4', 'Organelle'] = 'Golgi'\n",
    "markerdf.at['Q9Y3E0', 'Organelle'] = 'Golgi'\n",
    "markerdf.at['O15258', 'Organelle'] = 'Golgi'\n",
    "markerdf.at['Q13190', 'Organelle'] = 'Golgi'\n",
    "\n",
    "# Proteins to discard:\n",
    "# O00291, P98196, Q8N0Z8, Q9BQS8, Q9BX10, Q9NPB0, Q9NV92, Q9Y5L0\n",
    "markerdf.drop(['O00291', 'P98196', 'Q8N0Z8', 'Q8N3C7', 'Q9BQS8', 'Q9BX10', 'Q9NPB0', 'Q9NV92', 'Q9Y5L0'], inplace=True)\n",
    "\n",
    "markerdf.Organelle.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Dropping microtubule proteins as the class is too small\n",
    "# Saving Itzhak+enhanced markers csv file\n",
    "markerdf = markerdf[markerdf['Organelle'] != 'Microtubule proteins']\n",
    "markerdf = markerdf[markerdf['Organelle'] != 'Ergic/cisGolgi']\n",
    "markerdf = markerdf[markerdf['Organelle'] != 'Actin binding proteins']\n",
    "markerdf = markerdf[markerdf['Organelle'] != 'Nuclear pore complex']\n",
    "markerdf = markerdf[markerdf['Organelle'] != 'Cytokinetic bridge']\n",
    "markerdf.drop(columns='HPA', inplace=True)\n",
    "markerdf.to_csv('ExpandedMarkerSet_ItzhakWithEnhanced.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Saving just Itzhak markers and just enhanced markers\n",
    "intersect = markerdf.index.intersection(Itzhakmarkers.index)\n",
    "itzmark = markerdf.loc[intersect, :]\n",
    "itzmark.to_csv('DetectedItzhakMarkerSet.csv')\n",
    "intersect2 = markerdf.index.intersection(enhancedprot.index)\n",
    "enhmark = markerdf.loc[intersect2, :]\n",
    "enhmark.to_csv('EnhancedMarkerSet.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Large Protein Complex    369\n",
       "ER                       135\n",
       "Endosome                  81\n",
       "Plasma membrane           79\n",
       "Mitochondrion             78\n",
       "Golgi                     43\n",
       "Lysosome                  38\n",
       "Peroxisome                20\n",
       "Name: Organelle, dtype: int64"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "markerdf.Organelle.value_counts()"
   ]
  }
 ],
 "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.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
