From ca2ca32e5f7a8e4d91a847800f80fb564f705f6c Mon Sep 17 00:00:00 2001 From: jalew188 Date: Sat, 29 Jun 2024 15:25:04 +0200 Subject: [PATCH] #179 ADD predict_peptide_df_ --- nbs_tests/hla/hla_class1.ipynb | 76 ++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/nbs_tests/hla/hla_class1.ipynb b/nbs_tests/hla/hla_class1.ipynb index d4263457..d0fa0eb3 100644 --- a/nbs_tests/hla/hla_class1.ipynb +++ b/nbs_tests/hla/hla_class1.ipynb @@ -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" ] }, { @@ -231,10 +231,78 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
sequencenAAHLA_prob_pred
0MABCDEKF80.124847
1KLMNOPQR80.674667
2DEKFGHIJKLMNOP140.163758
\n", + "
" + ], + "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": {