Skip to content

Commit

Permalink
export data
Browse files Browse the repository at this point in the history
  • Loading branch information
fteufel committed Aug 19, 2022
1 parent ea062c3 commit 4caa27e
Show file tree
Hide file tree
Showing 3 changed files with 66,770 additions and 3 deletions.
51 changes: 48 additions & 3 deletions benchmark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@
"df.to_pickle('tempsave_raw_df.pkl')"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_pickle('tempsave_raw_df.pkl')"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"df.sort_index().to_csv('results/pdb_benchmark_raw.csv')"
]
},
{
"cell_type": "code",
"execution_count": 10,
Expand Down Expand Up @@ -158,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -167,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 40,
"metadata": {},
"outputs": [
{
Expand All @@ -187,7 +205,7 @@
"dtype: int64"
]
},
"execution_count": 12,
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -846,6 +864,33 @@
"plt.legend(loc='lower right')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Export data.\n",
"df_median = df.groupby(level=[0,1]).median()\n",
"df_median['label'] = 'unknown'\n",
"df_median.loc[[x.split('_')[::-1] for x in complexes.values()], 'label'] = 'known'\n",
"df_median = df_median.reset_index()\n",
"df_median['peptide'] = df_median['peptide'].replace({'P09683:28-54': 'Secretin',\n",
" 'P22466:33-62': 'Galanin',\n",
" 'P01178:20-28': 'Oxytocin',\n",
" 'P06307:96-103': 'Cholecystokinin-8',\n",
" 'P61278:103-116': 'Somatostatin-14',\n",
" 'P01303:29-64': 'Neuropeptide Y',\n",
" 'Q9UBU3:24-50': 'Ghrelin-27',\n",
" 'P20366:58-68': 'Substance P',\n",
" 'P01286:32-75': 'Somatoliberin',\n",
" 'P01350:76-92': 'Gastrin-17'})\n",
"\n",
"df_median = df_median.set_index(['peptide', 'receptor'])\n",
"\n",
"df_median.to_csv('results/pdb_benchmark_median.csv')"
]
},
{
"cell_type": "code",
"execution_count": 56,
Expand Down
Loading

0 comments on commit 4caa27e

Please sign in to comment.