Skip to content

Commit

Permalink
#179 ADD predict_peptide_df_
Browse files Browse the repository at this point in the history
  • Loading branch information
jalew188 committed Jun 29, 2024
1 parent 6b8de67 commit ca2ca32
Showing 1 changed file with 72 additions and 4 deletions.
76 changes: 72 additions & 4 deletions nbs_tests/hla/hla_class1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1/1 [00:00<00:00, 13.66it/s]\n"
"100%|██████████| 1/1 [00:00<00:00, 14.32it/s]\n"
]
},
{
Expand Down Expand Up @@ -231,10 +231,78 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": []
"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>sequence</th>\n",
" <th>nAA</th>\n",
" <th>HLA_prob_pred</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>MABCDEKF</td>\n",
" <td>8</td>\n",
" <td>0.124847</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>KLMNOPQR</td>\n",
" <td>8</td>\n",
" <td>0.674667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>DEKFGHIJKLMNOP</td>\n",
" <td>14</td>\n",
" <td>0.163758</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" sequence nAA HLA_prob_pred\n",
"0 MABCDEKF 8 0.124847\n",
"1 KLMNOPQR 8 0.674667\n",
"2 DEKFGHIJKLMNOP 14 0.163758"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"peptide_df = pd.DataFrame({\n",
" \"sequence\": [\"MABCDEKF\",\"KLMNOPQR\",\"DEKFGHIJKLMNOP\"]\n",
"})\n",
"model.predict_peptide_df_(peptide_df=peptide_df)\n",
"peptide_df"
]
}
],
"metadata": {
Expand Down

0 comments on commit ca2ca32

Please sign in to comment.