[132747]: / Prediction.ipynb

Download this file

122 lines (121 with data), 3.2 kB

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 1/1 [00:00<00:00, 14.85it/s]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Prediting SIF Stability...\n",
      "Prediting SGF Stability...\n",
      "Predicted SIF/SGF stability saved to the original file:  Sample_Sequence.csv\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>Compound</th>\n",
       "      <th>SMILES</th>\n",
       "      <th>Stability_in_SIF</th>\n",
       "      <th>Stability_in_SGF</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Oxytocin</td>\n",
       "      <td>CC[C@H](C)[C@H]1C(=O)N[C@H](C(=O)N[C@H](C(=O)N...</td>\n",
       "      <td>Not Stable</td>\n",
       "      <td>Stable</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Compound                                             SMILES  \\\n",
       "0  Oxytocin  CC[C@H](C)[C@H]1C(=O)N[C@H](C(=O)N[C@H](C(=O)N...   \n",
       "\n",
       "  Stability_in_SIF Stability_in_SGF  \n",
       "0       Not Stable           Stable  "
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from lib.pred_util import model_predict, pep_feat, save_results\n",
    "\n",
    "#Define the path to the file that includes peptide sequence\n",
    "Peptide_Path = 'Sample_Sequence.csv'\n",
    "\n",
    "#Featurising Peptides\n",
    "peptide_features= pep_feat(Peptide_Path)\n",
    "\n",
    "#Make Predictions \n",
    "SIF_Stability = model_predict(feat=peptide_features,Env='SIF')\n",
    "SGF_Stability = model_predict(feat=peptide_features,Env='SGF')\n",
    "\n",
    "#Save Results\n",
    "save_results(Peptide_Path,SIF_Stability,SGF_Stability)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.7.7 ('PolyML')",
   "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.7"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "69caf7ba448ccac8f685f0c0ceaf2c2f7e62cc7bd75b28eb68285a65e0406c4e"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}