{ "cells": [ { "cell_type": "markdown", "id": "3c6fb7a4", "metadata": {}, "source": [ "# Kinase inhibitors over a dose range\n", "\n", "{func}`~mantispy.ds.pki` serves `cpg0008-pki`, a dose-response set from the JUMP pilot {cite:p}`Chandrasekaran_2023`. Fifteen kinase inhibitors were run in U2OS cells over a seven-point dose range, eleven of them at three doses and four at a single dose, across eight plates with 32 to 64 replicate wells per treatment. The object is well-level.\n", "\n", "The design spends wells on replicates rather than on a full concentration ladder, so it is the workhorse compound screen here for hit calling and normalization, not for curve fitting. For a screen laid out the other way, many concentrations per compound for fitting a concentration-response curve, see [OASIS pilot](oasis_pilot.ipynb).\n", "\n", "**Use it if** your own data is a compound screen with many replicate wells per treatment and you want to call hits, normalize against controls or check for plate artifacts. [Hits, effects and cell loss](../tutorials/compounds/hits.ipynb), [Normalize, select, aggregate](../tutorials/profiles/normalize_and_select.ipynb) and [Plate artifacts and corrections](../tutorials/profiles/artifacts.ipynb) all run on it." ] }, { "cell_type": "code", "execution_count": 1, "id": "22aac5cb", "metadata": { "execution": { "iopub.execute_input": "2026-10-21T01:00:11.843791Z", "iopub.status.busy": "2026-10-21T01:00:11.843423Z", "iopub.status.idle": "2026-10-21T01:00:15.362801Z", "shell.execute_reply": "2026-10-21T01:00:15.361045Z" } }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "import mantispy as mt" ] }, { "cell_type": "code", "execution_count": 2, "id": "52bbe2fa", "metadata": { "execution": { "iopub.execute_input": "2026-10-21T01:00:15.366645Z", "iopub.status.busy": "2026-10-21T01:00:15.366391Z", "iopub.status.idle": "2026-10-21T01:00:15.690570Z", "shell.execute_reply": "2026-10-21T01:00:15.689426Z" } }, "outputs": [ { "data": { "text/plain": [ "AnnData object with n_obs × n_vars = 3072 × 5839\n", " obs: 'Metadata_plate_map_name', 'Metadata_broad_sample', 'Metadata_mg_per_ml', 'Metadata_mmoles_per_liter', 'Metadata_solvent', 'Metadata_Plate', 'Metadata_Well', 'Metadata_Site_Count', 'Metadata_Count_Cells', 'Metadata_Count_CellsIncludingEdges', 'Metadata_Count_Cytoplasm', 'Metadata_Count_Nuclei', 'Metadata_Count_NucleiIncludingEdges', 'Metadata_Object_Count', 'Metadata_Barcode', 'Metadata_Supplier', 'Metadata_Supplier_Catalog', 'Metadata_pert_type', 'Metadata_control_type', 'Metadata_Row', 'Metadata_Col', 'Metadata_CellCount', 'Metadata_SiteCount', 'Metadata_Control_Type', 'Metadata_Control', 'Metadata_Compound', 'Metadata_Concentration', 'Metadata_ConcentrationUnit', 'Metadata_MOA', 'Metadata_Perturbation', 'Metadata_Perturbation_Type'\n", " var: 'object', 'feature_group', 'feature', 'channel', 'scale', 'angle', 'gray_levels', 'radial_bin', 'params', 'is_feature', 'feature_kind'\n", " uns: 'mantispy'\n", " layers: None (.X)" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "adata = mt.ds.pki()\n", "adata" ] }, { "cell_type": "markdown", "id": "8eef7215", "metadata": {}, "source": [ "## The dose design\n", "\n", "`Metadata_Compound` names the compound and `Metadata_Concentration` its dose in millimoles per litre. Counting wells per compound and dose shows the ladder each treatment was run on. `Metadata_Control` marks the DMSO wells; the positive controls are treatments and are left unflagged." ] }, { "cell_type": "code", "execution_count": 3, "id": "649d7539", "metadata": { "execution": { "iopub.execute_input": "2026-10-21T01:00:15.693627Z", "iopub.status.busy": "2026-10-21T01:00:15.693471Z", "iopub.status.idle": "2026-10-21T01:00:15.733518Z", "shell.execute_reply": "2026-10-21T01:00:15.732424Z" } }, "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", " \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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Metadata_Concentration0.0040.0100.0400.2000.4001.0002.000
Metadata_Compound
BRD-K15179513-001-03-400000032
BRD-K15819326-001-01-600000032
BRD-K40109029-001-06-900000032
BRD-K95785537-001-26-900000032
BRD-U00086672-001-01-90006464640
BRD-U00086673-001-01-90006464640
BRD-U00086674-001-01-90064646400
BRD-U00086675-001-01-90064646400
\n", "
" ], "text/plain": [ "Metadata_Concentration 0.004 0.010 0.040 0.200 0.400 1.000 2.000\n", "Metadata_Compound \n", "BRD-K15179513-001-03-4 0 0 0 0 0 0 32\n", "BRD-K15819326-001-01-6 0 0 0 0 0 0 32\n", "BRD-K40109029-001-06-9 0 0 0 0 0 0 32\n", "BRD-K95785537-001-26-9 0 0 0 0 0 0 32\n", "BRD-U00086672-001-01-9 0 0 0 64 64 64 0\n", "BRD-U00086673-001-01-9 0 0 0 64 64 64 0\n", "BRD-U00086674-001-01-9 0 0 64 64 64 0 0\n", "BRD-U00086675-001-01-9 0 0 64 64 64 0 0" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "obs = adata.obs\n", "design = pd.crosstab(obs[\"Metadata_Compound\"], obs[\"Metadata_Concentration\"])\n", "design.iloc[:8]" ] }, { "cell_type": "markdown", "id": "6ddd0ff4", "metadata": {}, "source": [ "## Cells thin out as the dose rises\n", "\n", "Reading cells per well against concentration already shows the cytotoxic arm of the dose response, before any profile distance is computed: the highest doses leave fewer cells than DMSO." ] }, { "cell_type": "code", "execution_count": 4, "id": "0a525d3d", "metadata": { "execution": { "iopub.execute_input": "2026-10-21T01:00:15.736583Z", "iopub.status.busy": "2026-10-21T01:00:15.736397Z", "iopub.status.idle": "2026-10-21T01:00:16.650579Z", "shell.execute_reply": "2026-10-21T01:00:16.649630Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mt.pl.cell_counts(adata, groupby=\"Metadata_Concentration\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.13.15" } }, "nbformat": 4, "nbformat_minor": 5 }