https://github.com/osmoai/publications
Revision b36b51d687c5562713267577a305d01fa87e3302 authored by Rick Gerkin on 30 March 2023, 18:35:06 UTC, committed by Rick Gerkin on 30 March 2023, 18:35:06 UTC
1 parent c03b494
Tip revision: b36b51d687c5562713267577a305d01fa87e3302 authored by Rick Gerkin on 30 March 2023, 18:35:06 UTC
Import fix
Import fix
Tip revision: b36b51d
Figure2F.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "392bd175",
"metadata": {},
"outputs": [],
"source": [
"# Stock imports\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from lee_et_al_2023.src import analysis\n",
"from lee_et_al_2023.src import base\n",
"from lee_et_al_2023.src import data_loaders\n",
"base.set_visual_settings()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "18c593dd",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/rick/code/ratatouille/qian_et_al_2023/src/data_loaders.py:77: FutureWarning: The default value of numeric_only in DataFrameGroupBy.mean is deprecated. In a future version, numeric_only will default to False. Either specify numeric_only or select only columns which should be valid for the function.\n",
" panel = humans.groupby('RedJade Code').mean().loc[mol_codes, base.MONELL_CLASS_LIST]\n"
]
}
],
"source": [
"models, humans, panel, subjects = data_loaders.get_clean()\n",
"extended_models = data_loaders.load_extended_predictions(panel.index)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4057a825",
"metadata": {
"lines_to_next_cell": 2
},
"outputs": [],
"source": [
"corrs = analysis.fast_process(humans, extended_models)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "904aa230",
"metadata": {},
"outputs": [],
"source": [
"corrs.median()"
]
},
{
"cell_type": "markdown",
"id": "ed15000c",
"metadata": {},
"source": [
"(The rest of the plotting code for this subfigure is done in R.)"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"formats": "auto:light,ipynb",
"notebook_metadata_filter": "-all"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

Computing file changes ...