{ "cells": [ { "attachments": {}, "cell_type": "markdown", "id": "0a1042cd", "metadata": {}, "source": [ "# Performance comparison of inference on toy GRN data\n", "\n", "Notebook compares metrics for velocity, latent time and GRN inference across different methods applied to toy GRN data." ] }, { "cell_type": "markdown", "id": "a486fec1", "metadata": {}, "source": [ "## Library imports" ] }, { "cell_type": "code", "execution_count": null, "id": "fd119f55-1837-43ca-8368-e12c55652f2b", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "from scipy.stats import ttest_ind\n", "\n", "import matplotlib.pyplot as plt\n", "import mplscience\n", "import seaborn as sns\n", "\n", "from rgv_tools import DATA_DIR, FIG_DIR\n", "from rgv_tools.core import METHOD_PALETTE\n", "from rgv_tools.plotting._significance import add_significance, get_significance" ] }, { "attachments": {}, "cell_type": "markdown", "id": "b6b48f3e-9560-47d4-bd6d-25aa5db08c13", "metadata": {}, "source": [ "## General settings" ] }, { "cell_type": "code", "execution_count": 2, "id": "d83dfd1f-3a26-4e26-a06e-26a975e4a48f", "metadata": {}, "outputs": [], "source": [ "SAVE_FIGURES = False\n", "if SAVE_FIGURES:\n", " (FIG_DIR / \"toy_grn\").mkdir(parents=True, exist_ok=True)\n", "\n", "FIGURE_FORMATE = \"svg\"" ] }, { "cell_type": "markdown", "id": "e1a6a6ae", "metadata": {}, "source": [ "## Constants" ] }, { "cell_type": "code", "execution_count": 3, "id": "1c5f8863", "metadata": {}, "outputs": [], "source": [ "VELOCITY_METHODS = [\"regvelo\", \"velovi\", \"scvelo\"]\n", "TIME_METHODS = [\"regvelo\", \"velovi\", \"scvelo\", \"dpt\"]\n", "GRN_METHODS = [\"regvelo\", \"correlation\", \"grnboost2\", \"celloracle\"]" ] }, { "cell_type": "markdown", "id": "2baf9be8", "metadata": {}, "source": [ "## Data loading" ] }, { "cell_type": "code", "execution_count": 5, "id": "a94803b0", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | regvelo_velocity | \n", "regvelo_time | \n", "regvelo_grn | \n", "velovi_velocity | \n", "velovi_time | \n", "scvelo_velocity | \n", "scvelo_time | \n", "dpt_time | \n", "correlation_grn | \n", "grnboost2_grn | \n", "celloracle_grn | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "0.555112 | \n", "0.564590 | \n", "0.530 | \n", "0.523382 | \n", "-0.462360 | \n", "0.461017 | \n", "0.466543 | \n", "-0.081997 | \n", "0.59 | \n", "0.475 | \n", "0.470 | \n", "
1 | \n", "0.747088 | \n", "0.861632 | \n", "0.725 | \n", "0.565394 | \n", "0.810599 | \n", "0.621778 | \n", "0.779928 | \n", "-0.008727 | \n", "0.56 | \n", "0.530 | \n", "0.555 | \n", "
2 | \n", "0.747022 | \n", "0.786513 | \n", "0.550 | \n", "0.719559 | \n", "0.613784 | \n", "0.710150 | \n", "0.833685 | \n", "0.012410 | \n", "0.71 | \n", "0.565 | \n", "0.520 | \n", "
3 | \n", "0.795365 | \n", "0.604589 | \n", "0.530 | \n", "0.706493 | \n", "0.125379 | \n", "0.765667 | \n", "0.678434 | \n", "0.824321 | \n", "0.62 | \n", "0.620 | \n", "0.500 | \n", "
4 | \n", "0.696613 | \n", "0.914910 | \n", "0.830 | \n", "0.680337 | \n", "0.199152 | \n", "0.646673 | \n", "0.718848 | \n", "-0.102730 | \n", "0.69 | \n", "0.550 | \n", "0.595 | \n", "