diff --git a/runs.ipynb b/runs.ipynb
index ee42d7f03..4151fa8a3 100644
--- a/runs.ipynb
+++ b/runs.ipynb
@@ -87,7 +87,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -110,7 +110,7 @@
"\n",
"sys.path.append('../')\n",
"from grn_benchmark.src.commons import surragate_names\n",
- "from src.utils.helper import *\n",
+ "from src.helper import *\n",
"par = {\n",
" # 'methods': [ 'collectri', 'negative_control', 'positive_control', 'pearson_corr', 'portia', 'ppcor', 'genie3', 'grnboost2', 'scenic', 'scglue', 'celloracle'],\n",
" 'methods': [ 'collectri', 'negative_control', 'positive_control', 'pearson_corr', 'portia', 'ppcor', 'grnboost2', 'scenic', 'scglue', 'celloracle'],\n",
@@ -185,14 +185,14 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Submitted batch job 7757950\n"
+ "Submitted batch job 7758859\n"
]
}
],
@@ -201,12 +201,525 @@
" run_consensus(par)\n",
"\n",
"if True: # run metrics/script_all.py\n",
- " # !bash scripts/sbatch/calculate_scores.sh #includes both reg1 and 2. #inside the script, set the reg_type, read and write dirs, and methods\n",
- " !sbatch scripts/sbatch/calculate_scores.sh #includes both reg1 and 2. #inside the script, set the reg_type, read and write dirs, and methods\n",
- "\n",
- "if False: # check the scores\n",
- " df_scores = check_scores()\n",
- " df_scores.style.background_gradient()"
+ " calculate_scores()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " S1 | \n",
+ " S2 | \n",
+ " static-theta-0.0 | \n",
+ " static-theta-0.5 | \n",
+ " rank | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " scenicplus | \n",
+ " 0.245033 | \n",
+ " 0.403494 | \n",
+ " 0.760583 | \n",
+ " 0.539209 | \n",
+ " 4 | \n",
+ "
\n",
+ " \n",
+ " collectri | \n",
+ " -0.100238 | \n",
+ " -0.211182 | \n",
+ " 0.485506 | \n",
+ " 0.457259 | \n",
+ " 11 | \n",
+ "
\n",
+ " \n",
+ " negative_control | \n",
+ " -0.039305 | \n",
+ " -0.041004 | \n",
+ " 0.274659 | \n",
+ " 0.440383 | \n",
+ " 12 | \n",
+ "
\n",
+ " \n",
+ " positive_control | \n",
+ " 0.197129 | \n",
+ " 0.578822 | \n",
+ " 0.872003 | \n",
+ " 0.595489 | \n",
+ " 2 | \n",
+ "
\n",
+ " \n",
+ " pearson_corr | \n",
+ " 0.269379 | \n",
+ " 0.509297 | \n",
+ " 0.735156 | \n",
+ " 0.517056 | \n",
+ " 3 | \n",
+ "
\n",
+ " \n",
+ " portia | \n",
+ " 0.148941 | \n",
+ " 0.227248 | \n",
+ " 0.473607 | \n",
+ " 0.467607 | \n",
+ " 9 | \n",
+ "
\n",
+ " \n",
+ " ppcor | \n",
+ " 0.022846 | \n",
+ " 0.094107 | \n",
+ " 0.430776 | \n",
+ " 0.449144 | \n",
+ " 10 | \n",
+ "
\n",
+ " \n",
+ " grnboost2 | \n",
+ " 0.381032 | \n",
+ " 0.459860 | \n",
+ " 0.748175 | \n",
+ " 0.615790 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " scenic | \n",
+ " 0.144696 | \n",
+ " 0.206571 | \n",
+ " 0.685034 | \n",
+ " 0.556485 | \n",
+ " 7 | \n",
+ "
\n",
+ " \n",
+ " scglue | \n",
+ " 0.078309 | \n",
+ " 0.238859 | \n",
+ " 0.530531 | \n",
+ " 0.483423 | \n",
+ " 8 | \n",
+ "
\n",
+ " \n",
+ " celloracle | \n",
+ " 0.216897 | \n",
+ " 0.311451 | \n",
+ " 0.711549 | \n",
+ " 0.564160 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " scenicplus | \n",
+ " 0.245033 | \n",
+ " 0.403494 | \n",
+ " 0.760583 | \n",
+ " 0.539209 | \n",
+ " 4 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " S1 S2 static-theta-0.0 static-theta-0.5 rank\n",
+ "scenicplus 0.245033 0.403494 0.760583 0.539209 4\n",
+ "collectri -0.100238 -0.211182 0.485506 0.457259 11\n",
+ "negative_control -0.039305 -0.041004 0.274659 0.440383 12\n",
+ "positive_control 0.197129 0.578822 0.872003 0.595489 2\n",
+ "pearson_corr 0.269379 0.509297 0.735156 0.517056 3\n",
+ "portia 0.148941 0.227248 0.473607 0.467607 9\n",
+ "ppcor 0.022846 0.094107 0.430776 0.449144 10\n",
+ "grnboost2 0.381032 0.459860 0.748175 0.615790 1\n",
+ "scenic 0.144696 0.206571 0.685034 0.556485 7\n",
+ "scglue 0.078309 0.238859 0.530531 0.483423 8\n",
+ "celloracle 0.216897 0.311451 0.711549 0.564160 6\n",
+ "scenicplus 0.245033 0.403494 0.760583 0.539209 4"
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df_scores = pd.read_csv(f\"resources/scores/hvg/skeleton_False/scgen_pearson-ridge.csv\", index_col=0)\n",
+ "df_all_n = (df_scores-df_scores.min(axis=0))/(df_scores.max(axis=0)-df_scores.min(axis=0))\n",
+ "df_scores['rank'] = df_all_n.mean(axis=1).rank(ascending=False).astype(int)\n",
+ "df_scores"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ " \n",
+ " \n",
+ " | \n",
+ " S1 | \n",
+ " S2 | \n",
+ " static-theta-0.0 | \n",
+ " static-theta-0.5 | \n",
+ " rank | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " collectri | \n",
+ " -0.100238 | \n",
+ " -0.211182 | \n",
+ " 0.485506 | \n",
+ " 0.457259 | \n",
+ " 11 | \n",
+ "
\n",
+ " \n",
+ " negative_control | \n",
+ " -0.044574 | \n",
+ " -0.045158 | \n",
+ " 0.359805 | \n",
+ " 0.438451 | \n",
+ " 10 | \n",
+ "
\n",
+ " \n",
+ " positive_control | \n",
+ " 0.197129 | \n",
+ " 0.578822 | \n",
+ " 0.872003 | \n",
+ " 0.595489 | \n",
+ " 2 | \n",
+ "
\n",
+ " \n",
+ " pearson_corr | \n",
+ " 0.273443 | \n",
+ " 0.516343 | \n",
+ " 0.782978 | \n",
+ " 0.538252 | \n",
+ " 3 | \n",
+ "
\n",
+ " \n",
+ " portia | \n",
+ " 0.263310 | \n",
+ " 0.357006 | \n",
+ " 0.566365 | \n",
+ " 0.507570 | \n",
+ " 6 | \n",
+ "
\n",
+ " \n",
+ " ppcor | \n",
+ " 0.017954 | \n",
+ " 0.159754 | \n",
+ " 0.468049 | \n",
+ " 0.454995 | \n",
+ " 9 | \n",
+ "
\n",
+ " \n",
+ " grnboost2 | \n",
+ " 0.421936 | \n",
+ " 0.489322 | \n",
+ " 0.788931 | \n",
+ " 0.629471 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " scenic | \n",
+ " 0.168006 | \n",
+ " 0.218916 | \n",
+ " 0.756965 | \n",
+ " 0.565434 | \n",
+ " 5 | \n",
+ "
\n",
+ " \n",
+ " granie | \n",
+ " 0.083298 | \n",
+ " 0.106012 | \n",
+ " 0.194164 | \n",
+ " 0.363425 | \n",
+ " 12 | \n",
+ "
\n",
+ " \n",
+ " scglue | \n",
+ " 0.080857 | \n",
+ " 0.293630 | \n",
+ " 0.660357 | \n",
+ " 0.480734 | \n",
+ " 7 | \n",
+ "
\n",
+ " \n",
+ " celloracle | \n",
+ " 0.209151 | \n",
+ " 0.291478 | \n",
+ " 0.690099 | \n",
+ " 0.576343 | \n",
+ " 4 | \n",
+ "
\n",
+ " \n",
+ " figr | \n",
+ " 0.113645 | \n",
+ " 0.193131 | \n",
+ " 0.428032 | \n",
+ " 0.465268 | \n",
+ " 8 | \n",
+ "
\n",
+ " \n",
+ "
\n"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df_scores = pd.read_csv(f\"resources/scores/full/skeleton_True/scgen_pearson-ridge.csv\", index_col=0)\n",
+ "df_all_n = (df_scores-df_scores.min(axis=0))/(df_scores.max(axis=0)-df_scores.min(axis=0))\n",
+ "df_scores['rank'] = df_all_n.mean(axis=1).rank(ascending=False).astype(int)\n",
+ "df_scores.style.background_gradient()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(