{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Inline matplotlib backend\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import packages\n",
    "import os\n",
    "import math\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.covariance import MinCovDet\n",
    "from scipy.stats import percentileofscore\n",
    "from scipy.stats import rankdata\n",
    "from scipy.stats import t\n",
    "from scipy.spatial.distance import euclidean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set working directory\n",
    "os.getcwd()\n",
    "os.chdir('Path/To/Data')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Read in replicates; using just row-normalized data\n",
    "ua = pd.read_csv('UnA/20190517_UnA_rowsum.csv', index_col=0)\n",
    "ub = pd.read_csv('UnB/20190517_UnB_rowsum.csv', index_col=0)\n",
    "uc = pd.read_csv('UnC/20190517_UnC_rowsum.csv', index_col=0)\n",
    "ia = pd.read_csv('IndA/20190517_IndA_rowsum.csv', index_col=0)\n",
    "ib = pd.read_csv('IndB/20190517_IndB_rowsum.csv', index_col=0)\n",
    "ic = pd.read_csv('IndC/20190517_IndC_rowsum.csv', index_col=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Labeling replicate columns for ease of identification in joined dataframe\n",
    "ua.columns = ['Gene_ua', 'Protein information_ua', '3K_ua', '5.4K_ua', '12.2K_ua', \n",
    "              '24K_ua', '78.4K_ua', '110K_ua', '195.5K_ua']\n",
    "ub.columns = ['Gene_ub', 'Protein information_ub', '3K_ub', '5.4K_ub', '12.2K_ub', \n",
    "              '24K_ub', '78.4K_ub', '110K_ub', '195.5K_ub']\n",
    "uc.columns = ['Gene_uc', 'Protein information_uc', '3K_uc', '5.4K_uc', '12.2K_uc', \n",
    "              '24K_uc', '78.4K_uc', '110K_uc', '195.5K_uc']\n",
    "ia.columns = ['Gene_ia', 'Protein information_ia', '3K_ia', '5.4K_ia', '12.2K_ia', \n",
    "              '24K_ia', '78.4K_ia', '110K_ia', '195.5K_ia']\n",
    "ib.columns = ['Gene_ib', 'Protein information_ib', '3K_ib', '5.4K_ib', '12.2K_ib', \n",
    "              '24K_ib', '78.4K_ib', '110K_ib', '195.5K_ib']\n",
    "ic.columns = ['Gene_ic', 'Protein information_ic', '3K_ic', '5.4K_ic', '12.2K_ic', \n",
    "              '24K_ic', '78.4K_ic', '110K_ic', '195.5K_ic']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Pull out proteins common across all six replicates\n",
    "dflist = [ua, ub, uc, ia, ib, ic]\n",
    "common = pd.concat(dflist, axis=1, join='inner')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Redefine replicates with only common proteins\n",
    "ua = common.loc[:, 'Gene_ua':'195.5K_ua']\n",
    "ub = common.loc[:, 'Gene_ub':'195.5K_ub']\n",
    "uc = common.loc[:, 'Gene_uc':'195.5K_uc']\n",
    "ia = common.loc[:, 'Gene_ia':'195.5K_ia']\n",
    "ib = common.loc[:, 'Gene_ib':'195.5K_ib']\n",
    "ic = common.loc[:, 'Gene_ic':'195.5K_ic']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Changing columns back to replicate invariant names\n",
    "ua.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "ub.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "uc.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "ia.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "ib.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "ic.columns = ['Gene', 'Protein information', '3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate centroid arrays for uninduced and induced\n",
    "un_cent = np.zeros((len(common.index), 7))\n",
    "ind_cent = np.zeros((len(common.index), 7))\n",
    "\n",
    "fractlist = ['3K', '5.4K', '12.2K', '24K', '78.4K', '110K', '195.5K']\n",
    "\n",
    "for protein, row in zip(common.index, range(0, len(common.index))):\n",
    "    for fraction, col in zip(fractlist, range(0, 7)):\n",
    "        tempa = ua.at[protein, fraction]\n",
    "        tempb = ub.at[protein, fraction]\n",
    "        tempc = uc.at[protein, fraction]\n",
    "        un_cent[row, col] = np.mean([tempa, tempb, tempc])\n",
    "\n",
    "for protein, row in zip(common.index, range(0, len(common.index))):\n",
    "    for fraction, col in zip(fractlist, range(0, 7)):\n",
    "        tempa = ia.at[protein, fraction]\n",
    "        tempb = ib.at[protein, fraction]\n",
    "        tempc = ic.at[protein, fraction]\n",
    "        ind_cent[row, col] = np.mean([tempa, tempb, tempc])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate Euclidean distance from each replicate to its respective centroid\n",
    "un_stats = np.zeros((len(common.index), 4))\n",
    "ind_stats = np.zeros((len(common.index), 4))\n",
    "\n",
    "unlist = [ua, ub, uc]\n",
    "indlist = [ia, ib, ic]\n",
    "\n",
    "for protein, row in zip(common.index, range(0, len(common.index))):\n",
    "    for df, col in zip(unlist, range(0,3)):\n",
    "        temp = df.loc[protein, '3K':'195.5K']\n",
    "        avg = un_cent[row]\n",
    "        un_stats[row, col] = euclidean(temp, avg)\n",
    "\n",
    "for protein, row in zip(common.index, range(0, len(common.index))):\n",
    "    for df, col in zip(indlist, range(0,3)):\n",
    "        temp = df.loc[protein, '3K':'195.5K']\n",
    "        avg = ind_cent[row]\n",
    "        ind_stats[row, col] = euclidean(temp, avg)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate standard deviation of distances for each condition\n",
    "un_stats[:, 3] = np.std(un_stats[:, 0:3], axis=1, ddof=1)\n",
    "ind_stats[:, 3] = np.std(ind_stats[:, 0:3], axis=1, ddof=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate t-statistic and p-value for each protein\n",
    "# Using Benjamini-Hochberg correction for p-values\n",
    "mvmt_stats = np.zeros((len(common.index), 5))\n",
    "\n",
    "# Column 0 will contain the Euclidean distance between the uninduced and induced centroids\n",
    "for row in range(0, len(common.index)):\n",
    "    mvmt_stats[row, 0] = euclidean(un_cent[row], ind_cent[row])\n",
    "\n",
    "# Column 1 will contain the t-statistic\n",
    "for row in range(0, len(common.index)):\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    mvmt_stats[row, 1] = ((mvmt_stats[row, 0])/np.sqrt((unvar+indvar)/3))\n",
    "\n",
    "# Column 2 will contain the p-value\n",
    "for row in range(0, len(common.index)):\n",
    "    tstat = mvmt_stats[row, 1]\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    dof = (2*((unvar**2+(2*unvar*indvar)+indvar**2)/(unvar**2+indvar**2)))\n",
    "    mvmt_stats[row, 2] = t.sf(x=tstat, df=dof)\n",
    "\n",
    "# Column 3 will contain the rank value for each p-value\n",
    "mvmt_stats[:, 3] = rankdata(mvmt_stats[:, 2])\n",
    "\n",
    "# Column 4 will contain the Benjamini-Hochberg critical values; using an FDR of 0.01 or 1%\n",
    "mvmt_stats[:, 4] = (mvmt_stats[:, 3]/len(common.index))*0.01"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate t-statistic and p-value for each protein\n",
    "# Using Benjamini-Hochberg correction for p-values\n",
    "mvmt_stats2 = np.zeros((len(common.index), 5))\n",
    "\n",
    "# Column 0 will contain the Euclidean distance between the uninduced and induced centroids\n",
    "for row in range(0, len(common.index)):\n",
    "    mvmt_stats2[row, 0] = euclidean(un_cent[row], ind_cent[row])\n",
    "\n",
    "# Column 1 will contain the t-statistic\n",
    "for row in range(0, len(common.index)):\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    mvmt_stats2[row, 1] = ((mvmt_stats2[row, 0])/np.sqrt((unvar+indvar)/3))\n",
    "\n",
    "# Column 2 will contain the p-value\n",
    "for row in range(0, len(common.index)):\n",
    "    tstat = mvmt_stats2[row, 1]\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    dof = (2*((unvar**2+(2*unvar*indvar)+indvar**2)/(unvar**2+indvar**2)))\n",
    "    mvmt_stats2[row, 2] = t.sf(tstat, df=dof)\n",
    "\n",
    "# Column 3 will contain the rank value for each p-value\n",
    "mvmt_stats2[:, 3] = rankdata(mvmt_stats2[:, 2])\n",
    "\n",
    "# Column 4 will contain the Benjamini-Hochberg critical values; using an FDR of 0.015 or 1.5%\n",
    "mvmt_stats2[:, 4] = (mvmt_stats2[:, 3]/len(common.index))*0.015"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calculate t-statistic and p-value for each protein\n",
    "# Using Benjamini-Hochberg correction for p-values\n",
    "mvmt_stats3 = np.zeros((len(common.index), 5))\n",
    "\n",
    "# Column 0 will contain the Euclidean distance between the uninduced and induced centroids\n",
    "for row in range(0, len(common.index)):\n",
    "    mvmt_stats3[row, 0] = euclidean(un_cent[row], ind_cent[row])\n",
    "\n",
    "# Column 1 will contain the t-statistic\n",
    "for row in range(0, len(common.index)):\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    mvmt_stats3[row, 1] = ((mvmt_stats3[row, 0])/np.sqrt((unvar+indvar)/3))\n",
    "\n",
    "# Column 2 will contain the p-value\n",
    "for row in range(0, len(common.index)):\n",
    "    tstat = mvmt_stats3[row, 1]\n",
    "    unvar = (un_stats[row, 3])**2\n",
    "    indvar = (ind_stats[row, 3])**2\n",
    "    dof = (2*((unvar**2+(2*unvar*indvar)+indvar**2)/(unvar**2+indvar**2)))\n",
    "    mvmt_stats3[row, 2] = t.sf(tstat, df=dof)\n",
    "\n",
    "# Column 3 will contain the rank value for each p-value\n",
    "mvmt_stats3[:, 3] = rankdata(mvmt_stats3[:, 2])\n",
    "\n",
    "# Column 4 will contain the Benjamini-Hochberg critical values; using an FDR of 0.02 or 2%\n",
    "mvmt_stats3[:, 4] = (mvmt_stats3[:, 3]/len(common.index))*0.02"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Adding the p-value and critical value for each protein, then sorting by p-value; FDR of 1%\n",
    "sigmvmt = common.loc[:, 'Gene_ua':'Protein information_ua']\n",
    "sigmvmt['p-value'] = mvmt_stats[:, 2]\n",
    "sigmvmt['CritValue'] = mvmt_stats[:, 4]\n",
    "sigmvmt.sort_values(by='p-value', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Adding the p-value and critical value for each protein, then sorting by p-value; FDR of 1.5%\n",
    "sigmvmt2 = common.loc[:, 'Gene_ua':'Protein information_ua']\n",
    "sigmvmt2['p-value'] = mvmt_stats2[:, 2]\n",
    "sigmvmt2['CritValue'] = mvmt_stats2[:, 4]\n",
    "sigmvmt2.sort_values(by='p-value', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Adding the p-value and critical value for each protein, then sorting by p-value; FDR of 2%\n",
    "sigmvmt3 = common.loc[:, 'Gene_ua':'Protein information_ua']\n",
    "sigmvmt3['p-value'] = mvmt_stats3[:, 2]\n",
    "sigmvmt3['CritValue'] = mvmt_stats3[:, 4]\n",
    "sigmvmt3.sort_values(by='p-value', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "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>Gene_ua</th>\n",
       "      <th>Protein information_ua</th>\n",
       "      <th>p-value</th>\n",
       "      <th>CritValue</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Protein IDs</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>P55795</th>\n",
       "      <td>HNRH2</td>\n",
       "      <td>Heterogeneous nuclear ribonucleoprotein H2</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>0.000002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P55265</th>\n",
       "      <td>DSRAD</td>\n",
       "      <td>Double-stranded RNA-specific adenosine deaminase</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>0.000003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33241</th>\n",
       "      <td>LSP1</td>\n",
       "      <td>Lymphocyte-specific protein 1</td>\n",
       "      <td>0.000005</td>\n",
       "      <td>0.000005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33121</th>\n",
       "      <td>ACSL1</td>\n",
       "      <td>Long-chain-fatty-acid--CoA ligase 1</td>\n",
       "      <td>0.000010</td>\n",
       "      <td>0.000007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P78559</th>\n",
       "      <td>MAP1A</td>\n",
       "      <td>Microtubule-associated protein 1A</td>\n",
       "      <td>0.000012</td>\n",
       "      <td>0.000008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A6NFD8</th>\n",
       "      <td>HELT</td>\n",
       "      <td>Hairy and enhancer of split-related protein HELT</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UJX2</th>\n",
       "      <td>CDC23</td>\n",
       "      <td>Cell division cycle protein 23 homolog</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P53618</th>\n",
       "      <td>COPB</td>\n",
       "      <td>Coatomer subunit beta</td>\n",
       "      <td>0.000014</td>\n",
       "      <td>0.000013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14733</th>\n",
       "      <td>MP2K7</td>\n",
       "      <td>Dual specificity mitogen-activated protein kin...</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13740</th>\n",
       "      <td>CD166</td>\n",
       "      <td>CD166 antigen</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000017</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8NG68</th>\n",
       "      <td>TTL</td>\n",
       "      <td>Tubulin--tyrosine ligase</td>\n",
       "      <td>0.000024</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H0U4</th>\n",
       "      <td>RAB1B</td>\n",
       "      <td>Ras-related protein Rab-1B</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q06136</th>\n",
       "      <td>KDSR</td>\n",
       "      <td>3-ketodihydrosphingosine reductase</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P26358</th>\n",
       "      <td>DNMT1</td>\n",
       "      <td>DNA (cytosine-5)-methyltransferase 1</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P01034</th>\n",
       "      <td>CYTC</td>\n",
       "      <td>Cystatin-C</td>\n",
       "      <td>0.000028</td>\n",
       "      <td>0.000025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6P6C2</th>\n",
       "      <td>ALKB5</td>\n",
       "      <td>RNA demethylase ALKBH5</td>\n",
       "      <td>0.000030</td>\n",
       "      <td>0.000027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P35523</th>\n",
       "      <td>CLCN1</td>\n",
       "      <td>Chloride channel protein 1</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>0.000028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P41240</th>\n",
       "      <td>CSK</td>\n",
       "      <td>Tyrosine-protein kinase CSK</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NUV9</th>\n",
       "      <td>GIMA4</td>\n",
       "      <td>GTPase IMAP family member 4</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NPE2</th>\n",
       "      <td>NGRN</td>\n",
       "      <td>Neugrin</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y294</th>\n",
       "      <td>ASF1A</td>\n",
       "      <td>Histone chaperone ASF1A</td>\n",
       "      <td>0.000033</td>\n",
       "      <td>0.000035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8IZ73</th>\n",
       "      <td>RUSD2</td>\n",
       "      <td>RNA pseudouridylate synthase domain-containing...</td>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15526</th>\n",
       "      <td>SURF1</td>\n",
       "      <td>Surfeit locus protein 1</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3T9</th>\n",
       "      <td>NOC2L</td>\n",
       "      <td>Nucleolar complex protein 2 homolog</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6I8</th>\n",
       "      <td>PXMP4</td>\n",
       "      <td>Peroxisomal membrane protein 4</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000042</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P2C4</th>\n",
       "      <td>TM181</td>\n",
       "      <td>Transmembrane protein 181</td>\n",
       "      <td>0.000039</td>\n",
       "      <td>0.000043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P50570</th>\n",
       "      <td>DYN2</td>\n",
       "      <td>Dynamin-2</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000045</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75446</th>\n",
       "      <td>SAP30</td>\n",
       "      <td>Histone deacetylase complex subunit SAP30</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NVH1</th>\n",
       "      <td>DJC11</td>\n",
       "      <td>DnaJ homolog subfamily C member 11</td>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75319</th>\n",
       "      <td>DUS11</td>\n",
       "      <td>RNA/RNP complex-1-interacting phosphatase</td>\n",
       "      <td>0.000043</td>\n",
       "      <td>0.000050</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>Q14CB8</th>\n",
       "      <td>RHG19</td>\n",
       "      <td>Rho GTPase-activating protein 19</td>\n",
       "      <td>0.001498</td>\n",
       "      <td>0.001515</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O60218</th>\n",
       "      <td>AK1BA</td>\n",
       "      <td>Aldo-keto reductase family 1 member B10</td>\n",
       "      <td>0.001499</td>\n",
       "      <td>0.001517</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P62753</th>\n",
       "      <td>RS6</td>\n",
       "      <td>40S ribosomal protein S6</td>\n",
       "      <td>0.001501</td>\n",
       "      <td>0.001518</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P31943</th>\n",
       "      <td>HNRH1</td>\n",
       "      <td>Heterogeneous nuclear ribonucleoprotein H</td>\n",
       "      <td>0.001503</td>\n",
       "      <td>0.001520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6NXR4</th>\n",
       "      <td>TTI2</td>\n",
       "      <td>TELO2-interacting protein 2</td>\n",
       "      <td>0.001504</td>\n",
       "      <td>0.001522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6P0Q8</th>\n",
       "      <td>MAST2</td>\n",
       "      <td>Microtubule-associated serine/threonine-protei...</td>\n",
       "      <td>0.001505</td>\n",
       "      <td>0.001523</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P47736</th>\n",
       "      <td>RPGP1</td>\n",
       "      <td>Rap1 GTPase-activating protein 1</td>\n",
       "      <td>0.001507</td>\n",
       "      <td>0.001525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NTK5</th>\n",
       "      <td>OLA1</td>\n",
       "      <td>Obg-like ATPase 1</td>\n",
       "      <td>0.001515</td>\n",
       "      <td>0.001527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P51809</th>\n",
       "      <td>VAMP7</td>\n",
       "      <td>Vesicle-associated membrane protein 7</td>\n",
       "      <td>0.001516</td>\n",
       "      <td>0.001528</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6PJW8</th>\n",
       "      <td>CNST</td>\n",
       "      <td>Consortin</td>\n",
       "      <td>0.001518</td>\n",
       "      <td>0.001530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q92536</th>\n",
       "      <td>YLAT2</td>\n",
       "      <td>Y+L amino acid transporter 2</td>\n",
       "      <td>0.001519</td>\n",
       "      <td>0.001532</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BYG5</th>\n",
       "      <td>PAR6B</td>\n",
       "      <td>Partitioning defective 6 homolog beta</td>\n",
       "      <td>0.001525</td>\n",
       "      <td>0.001533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P26641</th>\n",
       "      <td>EF1G</td>\n",
       "      <td>Elongation factor 1-gamma</td>\n",
       "      <td>0.001527</td>\n",
       "      <td>0.001535</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H6F5</th>\n",
       "      <td>CCD86</td>\n",
       "      <td>Coiled-coil domain-containing protein 86</td>\n",
       "      <td>0.001528</td>\n",
       "      <td>0.001537</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UBD5</th>\n",
       "      <td>ORC3</td>\n",
       "      <td>Origin recognition complex subunit 3</td>\n",
       "      <td>0.001529</td>\n",
       "      <td>0.001538</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q14738</th>\n",
       "      <td>2A5D</td>\n",
       "      <td>Serine/threonine-protein phosphatase 2A 56 kDa...</td>\n",
       "      <td>0.001534</td>\n",
       "      <td>0.001540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q5DX21</th>\n",
       "      <td>IGS11</td>\n",
       "      <td>Immunoglobulin superfamily member 11</td>\n",
       "      <td>0.001536</td>\n",
       "      <td>0.001542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15226</th>\n",
       "      <td>NKRF</td>\n",
       "      <td>NF-kappa-B-repressing factor</td>\n",
       "      <td>0.001538</td>\n",
       "      <td>0.001543</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NX47</th>\n",
       "      <td>MARH5</td>\n",
       "      <td>E3 ubiquitin-protein ligase MARCH5</td>\n",
       "      <td>0.001546</td>\n",
       "      <td>0.001545</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BVJ6</th>\n",
       "      <td>UT14A</td>\n",
       "      <td>U3 small nucleolar RNA-associated protein 14 h...</td>\n",
       "      <td>0.001546</td>\n",
       "      <td>0.001547</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P43359</th>\n",
       "      <td>MAGA5</td>\n",
       "      <td>Melanoma-associated antigen 5</td>\n",
       "      <td>0.001546</td>\n",
       "      <td>0.001548</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6PCB8</th>\n",
       "      <td>EMB</td>\n",
       "      <td>Embigin</td>\n",
       "      <td>0.001548</td>\n",
       "      <td>0.001550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6ZNE5</th>\n",
       "      <td>BAKOR</td>\n",
       "      <td>Beclin 1-associated autophagy-related key regu...</td>\n",
       "      <td>0.001548</td>\n",
       "      <td>0.001552</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P13591</th>\n",
       "      <td>NCAM1</td>\n",
       "      <td>Neural cell adhesion molecule 1</td>\n",
       "      <td>0.001549</td>\n",
       "      <td>0.001554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8IXT5</th>\n",
       "      <td>RB12B</td>\n",
       "      <td>RNA-binding protein 12B</td>\n",
       "      <td>0.001550</td>\n",
       "      <td>0.001555</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q14554</th>\n",
       "      <td>PDIA5</td>\n",
       "      <td>Protein disulfide-isomerase A5</td>\n",
       "      <td>0.001552</td>\n",
       "      <td>0.001557</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96GX2</th>\n",
       "      <td>A7L3B</td>\n",
       "      <td>Ataxin-7-like protein 3B</td>\n",
       "      <td>0.001552</td>\n",
       "      <td>0.001559</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8WXA9</th>\n",
       "      <td>SREK1</td>\n",
       "      <td>Splicing regulatory glutamine/lysine-rich prot...</td>\n",
       "      <td>0.001558</td>\n",
       "      <td>0.001560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UBI1</th>\n",
       "      <td>COMD3</td>\n",
       "      <td>COMM domain-containing protein 3</td>\n",
       "      <td>0.001560</td>\n",
       "      <td>0.001562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q5JSQ8</th>\n",
       "      <td>KHDCL</td>\n",
       "      <td>Putative KHDC1-like protein</td>\n",
       "      <td>0.001563</td>\n",
       "      <td>0.001564</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>935 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            Gene_ua                             Protein information_ua  \\\n",
       "Protein IDs                                                              \n",
       "P55795        HNRH2         Heterogeneous nuclear ribonucleoprotein H2   \n",
       "P55265        DSRAD   Double-stranded RNA-specific adenosine deaminase   \n",
       "P33241         LSP1                      Lymphocyte-specific protein 1   \n",
       "P33121        ACSL1                Long-chain-fatty-acid--CoA ligase 1   \n",
       "P78559        MAP1A                  Microtubule-associated protein 1A   \n",
       "A6NFD8         HELT   Hairy and enhancer of split-related protein HELT   \n",
       "Q9UJX2        CDC23             Cell division cycle protein 23 homolog   \n",
       "P53618         COPB                              Coatomer subunit beta   \n",
       "O14733        MP2K7  Dual specificity mitogen-activated protein kin...   \n",
       "Q13740        CD166                                      CD166 antigen   \n",
       "Q8NG68          TTL                           Tubulin--tyrosine ligase   \n",
       "Q9H0U4        RAB1B                         Ras-related protein Rab-1B   \n",
       "Q06136         KDSR                 3-ketodihydrosphingosine reductase   \n",
       "P26358        DNMT1               DNA (cytosine-5)-methyltransferase 1   \n",
       "P01034         CYTC                                         Cystatin-C   \n",
       "Q6P6C2        ALKB5                             RNA demethylase ALKBH5   \n",
       "P35523        CLCN1                         Chloride channel protein 1   \n",
       "P41240          CSK                        Tyrosine-protein kinase CSK   \n",
       "Q9NUV9        GIMA4                        GTPase IMAP family member 4   \n",
       "Q9NPE2         NGRN                                            Neugrin   \n",
       "Q9Y294        ASF1A                            Histone chaperone ASF1A   \n",
       "Q8IZ73        RUSD2  RNA pseudouridylate synthase domain-containing...   \n",
       "Q15526        SURF1                            Surfeit locus protein 1   \n",
       "Q9Y3T9        NOC2L                Nucleolar complex protein 2 homolog   \n",
       "Q9Y6I8        PXMP4                     Peroxisomal membrane protein 4   \n",
       "Q9P2C4        TM181                          Transmembrane protein 181   \n",
       "P50570         DYN2                                          Dynamin-2   \n",
       "O75446        SAP30          Histone deacetylase complex subunit SAP30   \n",
       "Q9NVH1        DJC11                 DnaJ homolog subfamily C member 11   \n",
       "O75319        DUS11          RNA/RNP complex-1-interacting phosphatase   \n",
       "...             ...                                                ...   \n",
       "Q14CB8        RHG19                   Rho GTPase-activating protein 19   \n",
       "O60218        AK1BA            Aldo-keto reductase family 1 member B10   \n",
       "P62753          RS6                           40S ribosomal protein S6   \n",
       "P31943        HNRH1          Heterogeneous nuclear ribonucleoprotein H   \n",
       "Q6NXR4         TTI2                        TELO2-interacting protein 2   \n",
       "Q6P0Q8        MAST2  Microtubule-associated serine/threonine-protei...   \n",
       "P47736        RPGP1                   Rap1 GTPase-activating protein 1   \n",
       "Q9NTK5         OLA1                                  Obg-like ATPase 1   \n",
       "P51809        VAMP7              Vesicle-associated membrane protein 7   \n",
       "Q6PJW8         CNST                                          Consortin   \n",
       "Q92536        YLAT2                       Y+L amino acid transporter 2   \n",
       "Q9BYG5        PAR6B              Partitioning defective 6 homolog beta   \n",
       "P26641         EF1G                          Elongation factor 1-gamma   \n",
       "Q9H6F5        CCD86           Coiled-coil domain-containing protein 86   \n",
       "Q9UBD5         ORC3               Origin recognition complex subunit 3   \n",
       "Q14738         2A5D  Serine/threonine-protein phosphatase 2A 56 kDa...   \n",
       "Q5DX21        IGS11               Immunoglobulin superfamily member 11   \n",
       "O15226         NKRF                       NF-kappa-B-repressing factor   \n",
       "Q9NX47        MARH5                 E3 ubiquitin-protein ligase MARCH5   \n",
       "Q9BVJ6        UT14A  U3 small nucleolar RNA-associated protein 14 h...   \n",
       "P43359        MAGA5                      Melanoma-associated antigen 5   \n",
       "Q6PCB8          EMB                                            Embigin   \n",
       "Q6ZNE5        BAKOR  Beclin 1-associated autophagy-related key regu...   \n",
       "P13591        NCAM1                    Neural cell adhesion molecule 1   \n",
       "Q8IXT5        RB12B                            RNA-binding protein 12B   \n",
       "Q14554        PDIA5                     Protein disulfide-isomerase A5   \n",
       "Q96GX2        A7L3B                           Ataxin-7-like protein 3B   \n",
       "Q8WXA9        SREK1  Splicing regulatory glutamine/lysine-rich prot...   \n",
       "Q9UBI1        COMD3                   COMM domain-containing protein 3   \n",
       "Q5JSQ8        KHDCL                        Putative KHDC1-like protein   \n",
       "\n",
       "              p-value  CritValue  \n",
       "Protein IDs                       \n",
       "P55795       0.000002   0.000002  \n",
       "P55265       0.000004   0.000003  \n",
       "P33241       0.000005   0.000005  \n",
       "P33121       0.000010   0.000007  \n",
       "P78559       0.000012   0.000008  \n",
       "A6NFD8       0.000013   0.000010  \n",
       "Q9UJX2       0.000013   0.000012  \n",
       "P53618       0.000014   0.000013  \n",
       "O14733       0.000020   0.000015  \n",
       "Q13740       0.000021   0.000017  \n",
       "Q8NG68       0.000024   0.000018  \n",
       "Q9H0U4       0.000025   0.000020  \n",
       "Q06136       0.000026   0.000022  \n",
       "P26358       0.000026   0.000023  \n",
       "P01034       0.000028   0.000025  \n",
       "Q6P6C2       0.000030   0.000027  \n",
       "P35523       0.000031   0.000028  \n",
       "P41240       0.000032   0.000030  \n",
       "Q9NUV9       0.000032   0.000032  \n",
       "Q9NPE2       0.000032   0.000033  \n",
       "Q9Y294       0.000033   0.000035  \n",
       "Q8IZ73       0.000035   0.000037  \n",
       "Q15526       0.000036   0.000038  \n",
       "Q9Y3T9       0.000038   0.000040  \n",
       "Q9Y6I8       0.000038   0.000042  \n",
       "Q9P2C4       0.000039   0.000043  \n",
       "P50570       0.000041   0.000045  \n",
       "O75446       0.000041   0.000047  \n",
       "Q9NVH1       0.000042   0.000048  \n",
       "O75319       0.000043   0.000050  \n",
       "...               ...        ...  \n",
       "Q14CB8       0.001498   0.001515  \n",
       "O60218       0.001499   0.001517  \n",
       "P62753       0.001501   0.001518  \n",
       "P31943       0.001503   0.001520  \n",
       "Q6NXR4       0.001504   0.001522  \n",
       "Q6P0Q8       0.001505   0.001523  \n",
       "P47736       0.001507   0.001525  \n",
       "Q9NTK5       0.001515   0.001527  \n",
       "P51809       0.001516   0.001528  \n",
       "Q6PJW8       0.001518   0.001530  \n",
       "Q92536       0.001519   0.001532  \n",
       "Q9BYG5       0.001525   0.001533  \n",
       "P26641       0.001527   0.001535  \n",
       "Q9H6F5       0.001528   0.001537  \n",
       "Q9UBD5       0.001529   0.001538  \n",
       "Q14738       0.001534   0.001540  \n",
       "Q5DX21       0.001536   0.001542  \n",
       "O15226       0.001538   0.001543  \n",
       "Q9NX47       0.001546   0.001545  \n",
       "Q9BVJ6       0.001546   0.001547  \n",
       "P43359       0.001546   0.001548  \n",
       "Q6PCB8       0.001548   0.001550  \n",
       "Q6ZNE5       0.001548   0.001552  \n",
       "P13591       0.001549   0.001554  \n",
       "Q8IXT5       0.001550   0.001555  \n",
       "Q14554       0.001552   0.001557  \n",
       "Q96GX2       0.001552   0.001559  \n",
       "Q8WXA9       0.001558   0.001560  \n",
       "Q9UBI1       0.001560   0.001562  \n",
       "Q5JSQ8       0.001563   0.001564  \n",
       "\n",
       "[935 rows x 4 columns]"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Determining the maximum p-value < CritValue and subsetting out all p-values less than that cutoff; FDR of 1%\n",
    "df = sigmvmt[sigmvmt['p-value'] < sigmvmt['CritValue']]\n",
    "cutoff = df['p-value'].max()\n",
    "moved = sigmvmt[sigmvmt['p-value'] <= cutoff]\n",
    "moved"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "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>Gene_ua</th>\n",
       "      <th>Protein information_ua</th>\n",
       "      <th>p-value</th>\n",
       "      <th>CritValue</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Protein IDs</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>P55795</th>\n",
       "      <td>HNRH2</td>\n",
       "      <td>Heterogeneous nuclear ribonucleoprotein H2</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>0.000003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P55265</th>\n",
       "      <td>DSRAD</td>\n",
       "      <td>Double-stranded RNA-specific adenosine deaminase</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>0.000005</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33241</th>\n",
       "      <td>LSP1</td>\n",
       "      <td>Lymphocyte-specific protein 1</td>\n",
       "      <td>0.000005</td>\n",
       "      <td>0.000008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33121</th>\n",
       "      <td>ACSL1</td>\n",
       "      <td>Long-chain-fatty-acid--CoA ligase 1</td>\n",
       "      <td>0.000010</td>\n",
       "      <td>0.000010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P78559</th>\n",
       "      <td>MAP1A</td>\n",
       "      <td>Microtubule-associated protein 1A</td>\n",
       "      <td>0.000012</td>\n",
       "      <td>0.000013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A6NFD8</th>\n",
       "      <td>HELT</td>\n",
       "      <td>Hairy and enhancer of split-related protein HELT</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UJX2</th>\n",
       "      <td>CDC23</td>\n",
       "      <td>Cell division cycle protein 23 homolog</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P53618</th>\n",
       "      <td>COPB</td>\n",
       "      <td>Coatomer subunit beta</td>\n",
       "      <td>0.000014</td>\n",
       "      <td>0.000020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14733</th>\n",
       "      <td>MP2K7</td>\n",
       "      <td>Dual specificity mitogen-activated protein kin...</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13740</th>\n",
       "      <td>CD166</td>\n",
       "      <td>CD166 antigen</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8NG68</th>\n",
       "      <td>TTL</td>\n",
       "      <td>Tubulin--tyrosine ligase</td>\n",
       "      <td>0.000024</td>\n",
       "      <td>0.000028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H0U4</th>\n",
       "      <td>RAB1B</td>\n",
       "      <td>Ras-related protein Rab-1B</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q06136</th>\n",
       "      <td>KDSR</td>\n",
       "      <td>3-ketodihydrosphingosine reductase</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P26358</th>\n",
       "      <td>DNMT1</td>\n",
       "      <td>DNA (cytosine-5)-methyltransferase 1</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P01034</th>\n",
       "      <td>CYTC</td>\n",
       "      <td>Cystatin-C</td>\n",
       "      <td>0.000028</td>\n",
       "      <td>0.000038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6P6C2</th>\n",
       "      <td>ALKB5</td>\n",
       "      <td>RNA demethylase ALKBH5</td>\n",
       "      <td>0.000030</td>\n",
       "      <td>0.000040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P35523</th>\n",
       "      <td>CLCN1</td>\n",
       "      <td>Chloride channel protein 1</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>0.000043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P41240</th>\n",
       "      <td>CSK</td>\n",
       "      <td>Tyrosine-protein kinase CSK</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000045</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NUV9</th>\n",
       "      <td>GIMA4</td>\n",
       "      <td>GTPase IMAP family member 4</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NPE2</th>\n",
       "      <td>NGRN</td>\n",
       "      <td>Neugrin</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y294</th>\n",
       "      <td>ASF1A</td>\n",
       "      <td>Histone chaperone ASF1A</td>\n",
       "      <td>0.000033</td>\n",
       "      <td>0.000053</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8IZ73</th>\n",
       "      <td>RUSD2</td>\n",
       "      <td>RNA pseudouridylate synthase domain-containing...</td>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000055</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15526</th>\n",
       "      <td>SURF1</td>\n",
       "      <td>Surfeit locus protein 1</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3T9</th>\n",
       "      <td>NOC2L</td>\n",
       "      <td>Nucleolar complex protein 2 homolog</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6I8</th>\n",
       "      <td>PXMP4</td>\n",
       "      <td>Peroxisomal membrane protein 4</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000063</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P2C4</th>\n",
       "      <td>TM181</td>\n",
       "      <td>Transmembrane protein 181</td>\n",
       "      <td>0.000039</td>\n",
       "      <td>0.000065</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P50570</th>\n",
       "      <td>DYN2</td>\n",
       "      <td>Dynamin-2</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75446</th>\n",
       "      <td>SAP30</td>\n",
       "      <td>Histone deacetylase complex subunit SAP30</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000070</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NVH1</th>\n",
       "      <td>DJC11</td>\n",
       "      <td>DnaJ homolog subfamily C member 11</td>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75319</th>\n",
       "      <td>DUS11</td>\n",
       "      <td>RNA/RNP complex-1-interacting phosphatase</td>\n",
       "      <td>0.000043</td>\n",
       "      <td>0.000075</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>P30825</th>\n",
       "      <td>CTR1</td>\n",
       "      <td>High affinity cationic amino acid transporter 1</td>\n",
       "      <td>0.005781</td>\n",
       "      <td>0.005804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q53GS9</th>\n",
       "      <td>SNUT2</td>\n",
       "      <td>U4/U6.U5 tri-snRNP-associated protein 2</td>\n",
       "      <td>0.005781</td>\n",
       "      <td>0.005807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P04075</th>\n",
       "      <td>ALDOA</td>\n",
       "      <td>Fructose-bisphosphate aldolase A</td>\n",
       "      <td>0.005782</td>\n",
       "      <td>0.005809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15173</th>\n",
       "      <td>2A5B</td>\n",
       "      <td>Serine/threonine-protein phosphatase 2A 56 kDa...</td>\n",
       "      <td>0.005785</td>\n",
       "      <td>0.005812</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P219</th>\n",
       "      <td>DAPLE</td>\n",
       "      <td>Protein Daple</td>\n",
       "      <td>0.005789</td>\n",
       "      <td>0.005814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y639</th>\n",
       "      <td>NPTN</td>\n",
       "      <td>Neuroplastin</td>\n",
       "      <td>0.005792</td>\n",
       "      <td>0.005817</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q99439</th>\n",
       "      <td>CNN2</td>\n",
       "      <td>Calponin-2</td>\n",
       "      <td>0.005792</td>\n",
       "      <td>0.005819</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O95470</th>\n",
       "      <td>SGPL1</td>\n",
       "      <td>Sphingosine-1-phosphate lyase 1</td>\n",
       "      <td>0.005797</td>\n",
       "      <td>0.005822</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13303</th>\n",
       "      <td>KCAB2</td>\n",
       "      <td>Voltage-gated potassium channel subunit beta-2</td>\n",
       "      <td>0.005805</td>\n",
       "      <td>0.005824</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UKB1</th>\n",
       "      <td>FBW1B</td>\n",
       "      <td>F-box/WD repeat-containing protein 11</td>\n",
       "      <td>0.005806</td>\n",
       "      <td>0.005827</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y608</th>\n",
       "      <td>LRRF2</td>\n",
       "      <td>Leucine-rich repeat flightless-interacting pro...</td>\n",
       "      <td>0.005807</td>\n",
       "      <td>0.005829</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O43175</th>\n",
       "      <td>SERA</td>\n",
       "      <td>D-3-phosphoglycerate dehydrogenase</td>\n",
       "      <td>0.005810</td>\n",
       "      <td>0.005832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P49641</th>\n",
       "      <td>MA2A2</td>\n",
       "      <td>Alpha-mannosidase 2x</td>\n",
       "      <td>0.005811</td>\n",
       "      <td>0.005834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y262</th>\n",
       "      <td>EIF3L</td>\n",
       "      <td>Eukaryotic translation initiation factor 3 sub...</td>\n",
       "      <td>0.005813</td>\n",
       "      <td>0.005837</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q7L5N1</th>\n",
       "      <td>CSN6</td>\n",
       "      <td>COP9 signalosome complex subunit 6</td>\n",
       "      <td>0.005816</td>\n",
       "      <td>0.005839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q86W56</th>\n",
       "      <td>PARG</td>\n",
       "      <td>Poly(ADP-ribose) glycohydrolase</td>\n",
       "      <td>0.005818</td>\n",
       "      <td>0.005842</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q86YQ8</th>\n",
       "      <td>CPNE8</td>\n",
       "      <td>Copine-8</td>\n",
       "      <td>0.005820</td>\n",
       "      <td>0.005844</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q16763</th>\n",
       "      <td>UBE2S</td>\n",
       "      <td>Ubiquitin-conjugating enzyme E2 S</td>\n",
       "      <td>0.005823</td>\n",
       "      <td>0.005847</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13615</th>\n",
       "      <td>MTMR3</td>\n",
       "      <td>Myotubularin-related protein 3</td>\n",
       "      <td>0.005835</td>\n",
       "      <td>0.005849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H9A7</th>\n",
       "      <td>RMI1</td>\n",
       "      <td>RecQ-mediated genome instability protein 1</td>\n",
       "      <td>0.005841</td>\n",
       "      <td>0.005852</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75874</th>\n",
       "      <td>IDHC</td>\n",
       "      <td>Isocitrate dehydrogenase [NADP] cytoplasmic</td>\n",
       "      <td>0.005846</td>\n",
       "      <td>0.005855</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BTU6</th>\n",
       "      <td>P4K2A</td>\n",
       "      <td>Phosphatidylinositol 4-kinase type 2-alpha</td>\n",
       "      <td>0.005848</td>\n",
       "      <td>0.005857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96SK2</th>\n",
       "      <td>TM209</td>\n",
       "      <td>Transmembrane protein 209</td>\n",
       "      <td>0.005851</td>\n",
       "      <td>0.005860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75182</th>\n",
       "      <td>SIN3B</td>\n",
       "      <td>Paired amphipathic helix protein Sin3b</td>\n",
       "      <td>0.005852</td>\n",
       "      <td>0.005862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P62249</th>\n",
       "      <td>RS16</td>\n",
       "      <td>40S ribosomal protein S16</td>\n",
       "      <td>0.005856</td>\n",
       "      <td>0.005865</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15084</th>\n",
       "      <td>PDIA6</td>\n",
       "      <td>Protein disulfide-isomerase A6</td>\n",
       "      <td>0.005858</td>\n",
       "      <td>0.005867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UFD9</th>\n",
       "      <td>RIM3A</td>\n",
       "      <td>RIMS-binding protein 3C</td>\n",
       "      <td>0.005868</td>\n",
       "      <td>0.005870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O15269</th>\n",
       "      <td>SPTC1</td>\n",
       "      <td>Serine palmitoyltransferase 1</td>\n",
       "      <td>0.005869</td>\n",
       "      <td>0.005872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NQS7</th>\n",
       "      <td>INCE</td>\n",
       "      <td>Inner centromere protein</td>\n",
       "      <td>0.005873</td>\n",
       "      <td>0.005875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y4F3</th>\n",
       "      <td>MARF1</td>\n",
       "      <td>Meiosis regulator and mRNA stability factor 1</td>\n",
       "      <td>0.005874</td>\n",
       "      <td>0.005877</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2343 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            Gene_ua                             Protein information_ua  \\\n",
       "Protein IDs                                                              \n",
       "P55795        HNRH2         Heterogeneous nuclear ribonucleoprotein H2   \n",
       "P55265        DSRAD   Double-stranded RNA-specific adenosine deaminase   \n",
       "P33241         LSP1                      Lymphocyte-specific protein 1   \n",
       "P33121        ACSL1                Long-chain-fatty-acid--CoA ligase 1   \n",
       "P78559        MAP1A                  Microtubule-associated protein 1A   \n",
       "A6NFD8         HELT   Hairy and enhancer of split-related protein HELT   \n",
       "Q9UJX2        CDC23             Cell division cycle protein 23 homolog   \n",
       "P53618         COPB                              Coatomer subunit beta   \n",
       "O14733        MP2K7  Dual specificity mitogen-activated protein kin...   \n",
       "Q13740        CD166                                      CD166 antigen   \n",
       "Q8NG68          TTL                           Tubulin--tyrosine ligase   \n",
       "Q9H0U4        RAB1B                         Ras-related protein Rab-1B   \n",
       "Q06136         KDSR                 3-ketodihydrosphingosine reductase   \n",
       "P26358        DNMT1               DNA (cytosine-5)-methyltransferase 1   \n",
       "P01034         CYTC                                         Cystatin-C   \n",
       "Q6P6C2        ALKB5                             RNA demethylase ALKBH5   \n",
       "P35523        CLCN1                         Chloride channel protein 1   \n",
       "P41240          CSK                        Tyrosine-protein kinase CSK   \n",
       "Q9NUV9        GIMA4                        GTPase IMAP family member 4   \n",
       "Q9NPE2         NGRN                                            Neugrin   \n",
       "Q9Y294        ASF1A                            Histone chaperone ASF1A   \n",
       "Q8IZ73        RUSD2  RNA pseudouridylate synthase domain-containing...   \n",
       "Q15526        SURF1                            Surfeit locus protein 1   \n",
       "Q9Y3T9        NOC2L                Nucleolar complex protein 2 homolog   \n",
       "Q9Y6I8        PXMP4                     Peroxisomal membrane protein 4   \n",
       "Q9P2C4        TM181                          Transmembrane protein 181   \n",
       "P50570         DYN2                                          Dynamin-2   \n",
       "O75446        SAP30          Histone deacetylase complex subunit SAP30   \n",
       "Q9NVH1        DJC11                 DnaJ homolog subfamily C member 11   \n",
       "O75319        DUS11          RNA/RNP complex-1-interacting phosphatase   \n",
       "...             ...                                                ...   \n",
       "P30825         CTR1    High affinity cationic amino acid transporter 1   \n",
       "Q53GS9        SNUT2            U4/U6.U5 tri-snRNP-associated protein 2   \n",
       "P04075        ALDOA                   Fructose-bisphosphate aldolase A   \n",
       "Q15173         2A5B  Serine/threonine-protein phosphatase 2A 56 kDa...   \n",
       "Q9P219        DAPLE                                      Protein Daple   \n",
       "Q9Y639         NPTN                                       Neuroplastin   \n",
       "Q99439         CNN2                                         Calponin-2   \n",
       "O95470        SGPL1                    Sphingosine-1-phosphate lyase 1   \n",
       "Q13303        KCAB2     Voltage-gated potassium channel subunit beta-2   \n",
       "Q9UKB1        FBW1B              F-box/WD repeat-containing protein 11   \n",
       "Q9Y608        LRRF2  Leucine-rich repeat flightless-interacting pro...   \n",
       "O43175         SERA                 D-3-phosphoglycerate dehydrogenase   \n",
       "P49641        MA2A2                               Alpha-mannosidase 2x   \n",
       "Q9Y262        EIF3L  Eukaryotic translation initiation factor 3 sub...   \n",
       "Q7L5N1         CSN6                 COP9 signalosome complex subunit 6   \n",
       "Q86W56         PARG                    Poly(ADP-ribose) glycohydrolase   \n",
       "Q86YQ8        CPNE8                                           Copine-8   \n",
       "Q16763        UBE2S                  Ubiquitin-conjugating enzyme E2 S   \n",
       "Q13615        MTMR3                     Myotubularin-related protein 3   \n",
       "Q9H9A7         RMI1         RecQ-mediated genome instability protein 1   \n",
       "O75874         IDHC        Isocitrate dehydrogenase [NADP] cytoplasmic   \n",
       "Q9BTU6        P4K2A         Phosphatidylinositol 4-kinase type 2-alpha   \n",
       "Q96SK2        TM209                          Transmembrane protein 209   \n",
       "O75182        SIN3B             Paired amphipathic helix protein Sin3b   \n",
       "P62249         RS16                          40S ribosomal protein S16   \n",
       "Q15084        PDIA6                     Protein disulfide-isomerase A6   \n",
       "Q9UFD9        RIM3A                            RIMS-binding protein 3C   \n",
       "O15269        SPTC1                      Serine palmitoyltransferase 1   \n",
       "Q9NQS7         INCE                           Inner centromere protein   \n",
       "Q9Y4F3        MARF1      Meiosis regulator and mRNA stability factor 1   \n",
       "\n",
       "              p-value  CritValue  \n",
       "Protein IDs                       \n",
       "P55795       0.000002   0.000003  \n",
       "P55265       0.000004   0.000005  \n",
       "P33241       0.000005   0.000008  \n",
       "P33121       0.000010   0.000010  \n",
       "P78559       0.000012   0.000013  \n",
       "A6NFD8       0.000013   0.000015  \n",
       "Q9UJX2       0.000013   0.000018  \n",
       "P53618       0.000014   0.000020  \n",
       "O14733       0.000020   0.000023  \n",
       "Q13740       0.000021   0.000025  \n",
       "Q8NG68       0.000024   0.000028  \n",
       "Q9H0U4       0.000025   0.000030  \n",
       "Q06136       0.000026   0.000033  \n",
       "P26358       0.000026   0.000035  \n",
       "P01034       0.000028   0.000038  \n",
       "Q6P6C2       0.000030   0.000040  \n",
       "P35523       0.000031   0.000043  \n",
       "P41240       0.000032   0.000045  \n",
       "Q9NUV9       0.000032   0.000048  \n",
       "Q9NPE2       0.000032   0.000050  \n",
       "Q9Y294       0.000033   0.000053  \n",
       "Q8IZ73       0.000035   0.000055  \n",
       "Q15526       0.000036   0.000058  \n",
       "Q9Y3T9       0.000038   0.000060  \n",
       "Q9Y6I8       0.000038   0.000063  \n",
       "Q9P2C4       0.000039   0.000065  \n",
       "P50570       0.000041   0.000068  \n",
       "O75446       0.000041   0.000070  \n",
       "Q9NVH1       0.000042   0.000073  \n",
       "O75319       0.000043   0.000075  \n",
       "...               ...        ...  \n",
       "P30825       0.005781   0.005804  \n",
       "Q53GS9       0.005781   0.005807  \n",
       "P04075       0.005782   0.005809  \n",
       "Q15173       0.005785   0.005812  \n",
       "Q9P219       0.005789   0.005814  \n",
       "Q9Y639       0.005792   0.005817  \n",
       "Q99439       0.005792   0.005819  \n",
       "O95470       0.005797   0.005822  \n",
       "Q13303       0.005805   0.005824  \n",
       "Q9UKB1       0.005806   0.005827  \n",
       "Q9Y608       0.005807   0.005829  \n",
       "O43175       0.005810   0.005832  \n",
       "P49641       0.005811   0.005834  \n",
       "Q9Y262       0.005813   0.005837  \n",
       "Q7L5N1       0.005816   0.005839  \n",
       "Q86W56       0.005818   0.005842  \n",
       "Q86YQ8       0.005820   0.005844  \n",
       "Q16763       0.005823   0.005847  \n",
       "Q13615       0.005835   0.005849  \n",
       "Q9H9A7       0.005841   0.005852  \n",
       "O75874       0.005846   0.005855  \n",
       "Q9BTU6       0.005848   0.005857  \n",
       "Q96SK2       0.005851   0.005860  \n",
       "O75182       0.005852   0.005862  \n",
       "P62249       0.005856   0.005865  \n",
       "Q15084       0.005858   0.005867  \n",
       "Q9UFD9       0.005868   0.005870  \n",
       "O15269       0.005869   0.005872  \n",
       "Q9NQS7       0.005873   0.005875  \n",
       "Q9Y4F3       0.005874   0.005877  \n",
       "\n",
       "[2343 rows x 4 columns]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Determining the maximum p-value < CritValue and subsetting out all p-values less than that cutoff; FDR of 1.5%\n",
    "df2 = sigmvmt2[sigmvmt2['p-value'] < sigmvmt2['CritValue']]\n",
    "cutoff2 = df2['p-value'].max()\n",
    "moved2 = sigmvmt2[sigmvmt2['p-value'] <= cutoff2]\n",
    "moved2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Gene_ua</th>\n",
       "      <th>Protein information_ua</th>\n",
       "      <th>p-value</th>\n",
       "      <th>CritValue</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Protein IDs</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>P55795</th>\n",
       "      <td>HNRH2</td>\n",
       "      <td>Heterogeneous nuclear ribonucleoprotein H2</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>0.000003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P55265</th>\n",
       "      <td>DSRAD</td>\n",
       "      <td>Double-stranded RNA-specific adenosine deaminase</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>0.000007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33241</th>\n",
       "      <td>LSP1</td>\n",
       "      <td>Lymphocyte-specific protein 1</td>\n",
       "      <td>0.000005</td>\n",
       "      <td>0.000010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P33121</th>\n",
       "      <td>ACSL1</td>\n",
       "      <td>Long-chain-fatty-acid--CoA ligase 1</td>\n",
       "      <td>0.000010</td>\n",
       "      <td>0.000013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P78559</th>\n",
       "      <td>MAP1A</td>\n",
       "      <td>Microtubule-associated protein 1A</td>\n",
       "      <td>0.000012</td>\n",
       "      <td>0.000017</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A6NFD8</th>\n",
       "      <td>HELT</td>\n",
       "      <td>Hairy and enhancer of split-related protein HELT</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UJX2</th>\n",
       "      <td>CDC23</td>\n",
       "      <td>Cell division cycle protein 23 homolog</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>0.000023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P53618</th>\n",
       "      <td>COPB</td>\n",
       "      <td>Coatomer subunit beta</td>\n",
       "      <td>0.000014</td>\n",
       "      <td>0.000027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14733</th>\n",
       "      <td>MP2K7</td>\n",
       "      <td>Dual specificity mitogen-activated protein kin...</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13740</th>\n",
       "      <td>CD166</td>\n",
       "      <td>CD166 antigen</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000033</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8NG68</th>\n",
       "      <td>TTL</td>\n",
       "      <td>Tubulin--tyrosine ligase</td>\n",
       "      <td>0.000024</td>\n",
       "      <td>0.000037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9H0U4</th>\n",
       "      <td>RAB1B</td>\n",
       "      <td>Ras-related protein Rab-1B</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q06136</th>\n",
       "      <td>KDSR</td>\n",
       "      <td>3-ketodihydrosphingosine reductase</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P26358</th>\n",
       "      <td>DNMT1</td>\n",
       "      <td>DNA (cytosine-5)-methyltransferase 1</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P01034</th>\n",
       "      <td>CYTC</td>\n",
       "      <td>Cystatin-C</td>\n",
       "      <td>0.000028</td>\n",
       "      <td>0.000050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q6P6C2</th>\n",
       "      <td>ALKB5</td>\n",
       "      <td>RNA demethylase ALKBH5</td>\n",
       "      <td>0.000030</td>\n",
       "      <td>0.000054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P35523</th>\n",
       "      <td>CLCN1</td>\n",
       "      <td>Chloride channel protein 1</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>0.000057</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P41240</th>\n",
       "      <td>CSK</td>\n",
       "      <td>Tyrosine-protein kinase CSK</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NUV9</th>\n",
       "      <td>GIMA4</td>\n",
       "      <td>GTPase IMAP family member 4</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NPE2</th>\n",
       "      <td>NGRN</td>\n",
       "      <td>Neugrin</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>0.000067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y294</th>\n",
       "      <td>ASF1A</td>\n",
       "      <td>Histone chaperone ASF1A</td>\n",
       "      <td>0.000033</td>\n",
       "      <td>0.000070</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8IZ73</th>\n",
       "      <td>RUSD2</td>\n",
       "      <td>RNA pseudouridylate synthase domain-containing...</td>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q15526</th>\n",
       "      <td>SURF1</td>\n",
       "      <td>Surfeit locus protein 1</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y3T9</th>\n",
       "      <td>NOC2L</td>\n",
       "      <td>Nucleolar complex protein 2 homolog</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y6I8</th>\n",
       "      <td>PXMP4</td>\n",
       "      <td>Peroxisomal membrane protein 4</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P2C4</th>\n",
       "      <td>TM181</td>\n",
       "      <td>Transmembrane protein 181</td>\n",
       "      <td>0.000039</td>\n",
       "      <td>0.000087</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P50570</th>\n",
       "      <td>DYN2</td>\n",
       "      <td>Dynamin-2</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000090</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75446</th>\n",
       "      <td>SAP30</td>\n",
       "      <td>Histone deacetylase complex subunit SAP30</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NVH1</th>\n",
       "      <td>DJC11</td>\n",
       "      <td>DnaJ homolog subfamily C member 11</td>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000097</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75319</th>\n",
       "      <td>DUS11</td>\n",
       "      <td>RNA/RNP complex-1-interacting phosphatase</td>\n",
       "      <td>0.000043</td>\n",
       "      <td>0.000100</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>Q96GK7</th>\n",
       "      <td>FAH2A</td>\n",
       "      <td>Fumarylacetoacetate hydrolase domain-containin...</td>\n",
       "      <td>0.010581</td>\n",
       "      <td>0.010726</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q12824</th>\n",
       "      <td>SNF5</td>\n",
       "      <td>SWI/SNF-related matrix-associated actin-depend...</td>\n",
       "      <td>0.010602</td>\n",
       "      <td>0.010729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q13614</th>\n",
       "      <td>MTMR2</td>\n",
       "      <td>Myotubularin-related protein 2</td>\n",
       "      <td>0.010612</td>\n",
       "      <td>0.010732</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q86SX3</th>\n",
       "      <td>TEDC1</td>\n",
       "      <td>Tubulin epsilon and delta complex protein 1</td>\n",
       "      <td>0.010613</td>\n",
       "      <td>0.010736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96QK1</th>\n",
       "      <td>VPS35</td>\n",
       "      <td>Vacuolar protein sorting-associated protein 35</td>\n",
       "      <td>0.010619</td>\n",
       "      <td>0.010739</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P61247</th>\n",
       "      <td>RS3A</td>\n",
       "      <td>40S ribosomal protein S3a</td>\n",
       "      <td>0.010636</td>\n",
       "      <td>0.010742</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q71F23</th>\n",
       "      <td>CENPU</td>\n",
       "      <td>Centromere protein U</td>\n",
       "      <td>0.010641</td>\n",
       "      <td>0.010746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BTT0</th>\n",
       "      <td>AN32E</td>\n",
       "      <td>Acidic leucine-rich nuclear phosphoprotein 32 ...</td>\n",
       "      <td>0.010661</td>\n",
       "      <td>0.010749</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8WXX5</th>\n",
       "      <td>DNJC9</td>\n",
       "      <td>DnaJ homolog subfamily C member 9</td>\n",
       "      <td>0.010672</td>\n",
       "      <td>0.010753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P30419</th>\n",
       "      <td>NMT1</td>\n",
       "      <td>Glycylpeptide N-tetradecanoyltransferase 1</td>\n",
       "      <td>0.010682</td>\n",
       "      <td>0.010756</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y5Y0</th>\n",
       "      <td>FLVC1</td>\n",
       "      <td>Feline leukemia virus subgroup C receptor-rela...</td>\n",
       "      <td>0.010690</td>\n",
       "      <td>0.010759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q7Z417</th>\n",
       "      <td>NUFP2</td>\n",
       "      <td>Nuclear fragile X mental retardation-interacti...</td>\n",
       "      <td>0.010699</td>\n",
       "      <td>0.010763</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96LR5</th>\n",
       "      <td>UB2E2</td>\n",
       "      <td>Ubiquitin-conjugating enzyme E2 E2</td>\n",
       "      <td>0.010705</td>\n",
       "      <td>0.010766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O95619</th>\n",
       "      <td>YETS4</td>\n",
       "      <td>YEATS domain-containing protein 4</td>\n",
       "      <td>0.010706</td>\n",
       "      <td>0.010769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q5TAQ9</th>\n",
       "      <td>DCAF8</td>\n",
       "      <td>DDB1- and CUL4-associated factor 8</td>\n",
       "      <td>0.010712</td>\n",
       "      <td>0.010773</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P13796</th>\n",
       "      <td>PLSL</td>\n",
       "      <td>Plastin-2</td>\n",
       "      <td>0.010712</td>\n",
       "      <td>0.010776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9P0U4</th>\n",
       "      <td>CXXC1</td>\n",
       "      <td>CXXC-type zinc finger protein 1</td>\n",
       "      <td>0.010713</td>\n",
       "      <td>0.010779</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P49354</th>\n",
       "      <td>FNTA</td>\n",
       "      <td>Protein farnesyltransferase/geranylgeranyltran...</td>\n",
       "      <td>0.010724</td>\n",
       "      <td>0.010783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9UFF9</th>\n",
       "      <td>CNOT8</td>\n",
       "      <td>CCR4-NOT transcription complex subunit 8</td>\n",
       "      <td>0.010732</td>\n",
       "      <td>0.010786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9BVM2</th>\n",
       "      <td>DPCD</td>\n",
       "      <td>Protein DPCD</td>\n",
       "      <td>0.010736</td>\n",
       "      <td>0.010789</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9NV92</th>\n",
       "      <td>NFIP2</td>\n",
       "      <td>NEDD4 family-interacting protein 2</td>\n",
       "      <td>0.010745</td>\n",
       "      <td>0.010793</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8N5G2</th>\n",
       "      <td>MACOI</td>\n",
       "      <td>Macoilin</td>\n",
       "      <td>0.010753</td>\n",
       "      <td>0.010796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q92585</th>\n",
       "      <td>MAML1</td>\n",
       "      <td>Mastermind-like protein 1</td>\n",
       "      <td>0.010757</td>\n",
       "      <td>0.010799</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P55145</th>\n",
       "      <td>MANF</td>\n",
       "      <td>Mesencephalic astrocyte-derived neurotrophic f...</td>\n",
       "      <td>0.010773</td>\n",
       "      <td>0.010803</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q96JG8</th>\n",
       "      <td>MAGD4</td>\n",
       "      <td>Melanoma-associated antigen D4</td>\n",
       "      <td>0.010777</td>\n",
       "      <td>0.010806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q8NFH5</th>\n",
       "      <td>NUP35</td>\n",
       "      <td>Nucleoporin NUP35</td>\n",
       "      <td>0.010783</td>\n",
       "      <td>0.010809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q9Y548</th>\n",
       "      <td>YIPF1</td>\n",
       "      <td>Protein YIPF1</td>\n",
       "      <td>0.010787</td>\n",
       "      <td>0.010813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14776</th>\n",
       "      <td>TCRG1</td>\n",
       "      <td>Transcription elongation regulator 1</td>\n",
       "      <td>0.010792</td>\n",
       "      <td>0.010816</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O14920</th>\n",
       "      <td>IKKB</td>\n",
       "      <td>Inhibitor of nuclear factor kappa-B kinase sub...</td>\n",
       "      <td>0.010799</td>\n",
       "      <td>0.010819</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O75093</th>\n",
       "      <td>SLIT1</td>\n",
       "      <td>Slit homolog 1 protein</td>\n",
       "      <td>0.010804</td>\n",
       "      <td>0.010823</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3236 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            Gene_ua                             Protein information_ua  \\\n",
       "Protein IDs                                                              \n",
       "P55795        HNRH2         Heterogeneous nuclear ribonucleoprotein H2   \n",
       "P55265        DSRAD   Double-stranded RNA-specific adenosine deaminase   \n",
       "P33241         LSP1                      Lymphocyte-specific protein 1   \n",
       "P33121        ACSL1                Long-chain-fatty-acid--CoA ligase 1   \n",
       "P78559        MAP1A                  Microtubule-associated protein 1A   \n",
       "A6NFD8         HELT   Hairy and enhancer of split-related protein HELT   \n",
       "Q9UJX2        CDC23             Cell division cycle protein 23 homolog   \n",
       "P53618         COPB                              Coatomer subunit beta   \n",
       "O14733        MP2K7  Dual specificity mitogen-activated protein kin...   \n",
       "Q13740        CD166                                      CD166 antigen   \n",
       "Q8NG68          TTL                           Tubulin--tyrosine ligase   \n",
       "Q9H0U4        RAB1B                         Ras-related protein Rab-1B   \n",
       "Q06136         KDSR                 3-ketodihydrosphingosine reductase   \n",
       "P26358        DNMT1               DNA (cytosine-5)-methyltransferase 1   \n",
       "P01034         CYTC                                         Cystatin-C   \n",
       "Q6P6C2        ALKB5                             RNA demethylase ALKBH5   \n",
       "P35523        CLCN1                         Chloride channel protein 1   \n",
       "P41240          CSK                        Tyrosine-protein kinase CSK   \n",
       "Q9NUV9        GIMA4                        GTPase IMAP family member 4   \n",
       "Q9NPE2         NGRN                                            Neugrin   \n",
       "Q9Y294        ASF1A                            Histone chaperone ASF1A   \n",
       "Q8IZ73        RUSD2  RNA pseudouridylate synthase domain-containing...   \n",
       "Q15526        SURF1                            Surfeit locus protein 1   \n",
       "Q9Y3T9        NOC2L                Nucleolar complex protein 2 homolog   \n",
       "Q9Y6I8        PXMP4                     Peroxisomal membrane protein 4   \n",
       "Q9P2C4        TM181                          Transmembrane protein 181   \n",
       "P50570         DYN2                                          Dynamin-2   \n",
       "O75446        SAP30          Histone deacetylase complex subunit SAP30   \n",
       "Q9NVH1        DJC11                 DnaJ homolog subfamily C member 11   \n",
       "O75319        DUS11          RNA/RNP complex-1-interacting phosphatase   \n",
       "...             ...                                                ...   \n",
       "Q96GK7        FAH2A  Fumarylacetoacetate hydrolase domain-containin...   \n",
       "Q12824         SNF5  SWI/SNF-related matrix-associated actin-depend...   \n",
       "Q13614        MTMR2                     Myotubularin-related protein 2   \n",
       "Q86SX3        TEDC1        Tubulin epsilon and delta complex protein 1   \n",
       "Q96QK1        VPS35     Vacuolar protein sorting-associated protein 35   \n",
       "P61247         RS3A                          40S ribosomal protein S3a   \n",
       "Q71F23        CENPU                               Centromere protein U   \n",
       "Q9BTT0        AN32E  Acidic leucine-rich nuclear phosphoprotein 32 ...   \n",
       "Q8WXX5        DNJC9                  DnaJ homolog subfamily C member 9   \n",
       "P30419         NMT1         Glycylpeptide N-tetradecanoyltransferase 1   \n",
       "Q9Y5Y0        FLVC1  Feline leukemia virus subgroup C receptor-rela...   \n",
       "Q7Z417        NUFP2  Nuclear fragile X mental retardation-interacti...   \n",
       "Q96LR5        UB2E2                 Ubiquitin-conjugating enzyme E2 E2   \n",
       "O95619        YETS4                  YEATS domain-containing protein 4   \n",
       "Q5TAQ9        DCAF8                 DDB1- and CUL4-associated factor 8   \n",
       "P13796         PLSL                                          Plastin-2   \n",
       "Q9P0U4        CXXC1                    CXXC-type zinc finger protein 1   \n",
       "P49354         FNTA  Protein farnesyltransferase/geranylgeranyltran...   \n",
       "Q9UFF9        CNOT8           CCR4-NOT transcription complex subunit 8   \n",
       "Q9BVM2         DPCD                                       Protein DPCD   \n",
       "Q9NV92        NFIP2                 NEDD4 family-interacting protein 2   \n",
       "Q8N5G2        MACOI                                           Macoilin   \n",
       "Q92585        MAML1                          Mastermind-like protein 1   \n",
       "P55145         MANF  Mesencephalic astrocyte-derived neurotrophic f...   \n",
       "Q96JG8        MAGD4                     Melanoma-associated antigen D4   \n",
       "Q8NFH5        NUP35                                  Nucleoporin NUP35   \n",
       "Q9Y548        YIPF1                                      Protein YIPF1   \n",
       "O14776        TCRG1               Transcription elongation regulator 1   \n",
       "O14920         IKKB  Inhibitor of nuclear factor kappa-B kinase sub...   \n",
       "O75093        SLIT1                             Slit homolog 1 protein   \n",
       "\n",
       "              p-value  CritValue  \n",
       "Protein IDs                       \n",
       "P55795       0.000002   0.000003  \n",
       "P55265       0.000004   0.000007  \n",
       "P33241       0.000005   0.000010  \n",
       "P33121       0.000010   0.000013  \n",
       "P78559       0.000012   0.000017  \n",
       "A6NFD8       0.000013   0.000020  \n",
       "Q9UJX2       0.000013   0.000023  \n",
       "P53618       0.000014   0.000027  \n",
       "O14733       0.000020   0.000030  \n",
       "Q13740       0.000021   0.000033  \n",
       "Q8NG68       0.000024   0.000037  \n",
       "Q9H0U4       0.000025   0.000040  \n",
       "Q06136       0.000026   0.000043  \n",
       "P26358       0.000026   0.000047  \n",
       "P01034       0.000028   0.000050  \n",
       "Q6P6C2       0.000030   0.000054  \n",
       "P35523       0.000031   0.000057  \n",
       "P41240       0.000032   0.000060  \n",
       "Q9NUV9       0.000032   0.000064  \n",
       "Q9NPE2       0.000032   0.000067  \n",
       "Q9Y294       0.000033   0.000070  \n",
       "Q8IZ73       0.000035   0.000074  \n",
       "Q15526       0.000036   0.000077  \n",
       "Q9Y3T9       0.000038   0.000080  \n",
       "Q9Y6I8       0.000038   0.000084  \n",
       "Q9P2C4       0.000039   0.000087  \n",
       "P50570       0.000041   0.000090  \n",
       "O75446       0.000041   0.000094  \n",
       "Q9NVH1       0.000042   0.000097  \n",
       "O75319       0.000043   0.000100  \n",
       "...               ...        ...  \n",
       "Q96GK7       0.010581   0.010726  \n",
       "Q12824       0.010602   0.010729  \n",
       "Q13614       0.010612   0.010732  \n",
       "Q86SX3       0.010613   0.010736  \n",
       "Q96QK1       0.010619   0.010739  \n",
       "P61247       0.010636   0.010742  \n",
       "Q71F23       0.010641   0.010746  \n",
       "Q9BTT0       0.010661   0.010749  \n",
       "Q8WXX5       0.010672   0.010753  \n",
       "P30419       0.010682   0.010756  \n",
       "Q9Y5Y0       0.010690   0.010759  \n",
       "Q7Z417       0.010699   0.010763  \n",
       "Q96LR5       0.010705   0.010766  \n",
       "O95619       0.010706   0.010769  \n",
       "Q5TAQ9       0.010712   0.010773  \n",
       "P13796       0.010712   0.010776  \n",
       "Q9P0U4       0.010713   0.010779  \n",
       "P49354       0.010724   0.010783  \n",
       "Q9UFF9       0.010732   0.010786  \n",
       "Q9BVM2       0.010736   0.010789  \n",
       "Q9NV92       0.010745   0.010793  \n",
       "Q8N5G2       0.010753   0.010796  \n",
       "Q92585       0.010757   0.010799  \n",
       "P55145       0.010773   0.010803  \n",
       "Q96JG8       0.010777   0.010806  \n",
       "Q8NFH5       0.010783   0.010809  \n",
       "Q9Y548       0.010787   0.010813  \n",
       "O14776       0.010792   0.010816  \n",
       "O14920       0.010799   0.010819  \n",
       "O75093       0.010804   0.010823  \n",
       "\n",
       "[3236 rows x 4 columns]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Determining the maximum p-value < CritValue and subsetting out all p-values less than that cutoff; FDR of 2%\n",
    "df3 = sigmvmt3[sigmvmt3['p-value'] < sigmvmt3['CritValue']]\n",
    "cutoff3 = df3['p-value'].max()\n",
    "moved3 = sigmvmt3[sigmvmt3['p-value'] <= cutoff3]\n",
    "moved3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(935, 17)\n",
      "(871, 17)\n"
     ]
    }
   ],
   "source": [
    "# Reading in full data summary to cross-reference with moved list\n",
    "# Saving moved proteins with FDR of 0.01; including copy without markers that are moving\n",
    "fulldata = pd.read_csv('20190518_FullExperimentSummary_Thresholding.csv', index_col=0)\n",
    "temp = fulldata.loc[moved.index, :]\n",
    "temp['pval'] = moved['p-value']\n",
    "temp['critval'] = moved['CritValue']\n",
    "temp.to_csv('20190518_EuclideanDistance_FDR0.01.csv', sep=',')\n",
    "temp_nomrkr = temp[temp.Marker == 'No']\n",
    "temp_nomrkr.to_csv('20190518_EuclideanDistance_FDR0.01_nomrkr.csv', sep=',')\n",
    "print(temp.shape)\n",
    "print(temp_nomrkr.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Making IDs only files for each of the FDR=0.01 lists\n",
    "temp.reset_index(inplace=True)\n",
    "temp['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.01_IDs.csv', sep=',', header=False, index=False)\n",
    "temp_nomrkr.reset_index(inplace=True)\n",
    "temp_nomrkr['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.01_nomrkr_IDs.csv', sep=',', header=False, index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(2343, 17)\n",
      "(2207, 17)\n"
     ]
    }
   ],
   "source": [
    "# Reading in full data summary to cross-reference with moved list\n",
    "# Saving moved proteins with FDR of 0.015; including copy without markers that are moving\n",
    "temp2 = fulldata.loc[moved2.index, :]\n",
    "temp2['pval'] = moved2['p-value']\n",
    "temp2['critval'] = moved2['CritValue']\n",
    "temp2.to_csv('20190518_EuclideanDistance_FDR0.015.csv', sep=',')\n",
    "temp_nomrkr2 = temp2[temp2.Marker == 'No']\n",
    "temp_nomrkr2.to_csv('20190518_EuclideanDistance_FDR0.015_nomrkr.csv', sep=',')\n",
    "print(temp2.shape)\n",
    "print(temp_nomrkr2.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Making IDs only files for each of the FDR=0.015 lists\n",
    "temp2.reset_index(inplace=True)\n",
    "temp2['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.015_IDs.csv', sep=',', header=False, index=False)\n",
    "temp_nomrkr2.reset_index(inplace=True)\n",
    "temp_nomrkr2['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.015_nomrkr_IDs.csv', sep=',', header=False, index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(3236, 17)\n",
      "(3056, 17)\n"
     ]
    }
   ],
   "source": [
    "# Reading in full data summary to cross-reference with moved list\n",
    "# Saving moved proteins with FDR of 0.02; including copy without markers that are moving\n",
    "temp3 = fulldata.loc[moved3.index, :]\n",
    "temp3['pval'] = moved3['p-value']\n",
    "temp3['critval'] = moved3['CritValue']\n",
    "temp3.to_csv('20190518_EuclideanDistance_FDR0.02.csv', sep=',')\n",
    "temp_nomrkr3 = temp3[temp3.Marker == 'No']\n",
    "temp_nomrkr3.to_csv('20190518_EuclideanDistance_FDR0.02_nomrkr.csv', sep=',')\n",
    "print(temp3.shape)\n",
    "print(temp_nomrkr3.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Making IDs only files for each of the FDR=0.0075 lists\n",
    "temp3.reset_index(inplace=True)\n",
    "temp3['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.02_IDs.csv', sep=',', header=False, index=False)\n",
    "temp_nomrkr3.reset_index(inplace=True)\n",
    "temp_nomrkr3['Protein IDs'].to_csv('20190518_EuclideanDistance_FDR0.02_nomrkr_IDs.csv', sep=',', header=False, index=False)"
   ]
  }
 ],
 "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
}
