Skip to content
12 changes: 11 additions & 1 deletion docs/api/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,18 @@

../datasets/overview
../datasets/bbbc021
../datasets/rohban
../datasets/pki
../datasets/jump_target2
../datasets/jump_cells
../datasets/jump_crispr
../datasets/jump_lite
../datasets/chroma
../datasets/neuropainting
../datasets/oasis_pilot
../datasets/pooled_rare
../datasets/jump_cells
../datasets/jump_export
../datasets/jump_plate
../datasets/scallops_arv471
../datasets/cp_posh
```
210 changes: 210 additions & 0 deletions docs/datasets/chroma.ipynb

Large diffs are not rendered by default.

203 changes: 203 additions & 0 deletions docs/datasets/cp_posh.ipynb

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions docs/datasets/jump_crispr.ipynb

Large diffs are not rendered by default.

236 changes: 236 additions & 0 deletions docs/datasets/jump_export.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3f1f3663",
"metadata": {},
"source": [
"# One CellProfiler export\n",
"\n",
"{func}`~mantispy.ds.jump_export` is a single, unmodified `ExportToSpreadsheet` directory, one field of view of a DMSO well of `BR00121438` {cite:p}`Chandrasekaran_2023`. It is the example input for {func}`~mantispy.io.read_profiles`: the raw `Image.csv` plus the `Cells`, `Cytoplasm` and `Nuclei` tables, exactly as CellProfiler wrote them. The images this was measured from are in {func}`~mantispy.ds.jump_plate`, and the well-level profiles of the same plate in {func}`~mantispy.ds.jump_target2`.\n",
"\n",
"**Use it if** you have your own CellProfiler `ExportToSpreadsheet` output and want to read it into cells. [From a CellProfiler run](../tutorials/data/cellprofiler.ipynb) walks through that on this directory."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "20cab890",
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-29T02:53:31.787363Z",
"iopub.status.busy": "2026-09-29T02:53:31.786609Z",
"iopub.status.idle": "2026-09-29T02:53:35.950473Z",
"shell.execute_reply": "2026-09-29T02:53:35.949247Z"
}
},
"outputs": [],
"source": [
"import mantispy as mt"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a19fb984",
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-29T02:53:35.955131Z",
"iopub.status.busy": "2026-09-29T02:53:35.954517Z",
"iopub.status.idle": "2026-09-29T02:53:36.130313Z",
"shell.execute_reply": "2026-09-29T02:53:36.129500Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"['Cells.csv', 'Cytoplasm.csv', 'Experiment.csv', 'Image.csv', 'Nuclei.csv']"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"directory = mt.ds.jump_export()\n",
"sorted(p.name for p in directory.iterdir())"
]
},
{
"cell_type": "markdown",
"id": "1b5e2505",
"metadata": {},
"source": [
"## Reading it into cells\n",
"\n",
"`Cytoplasm` is the only object the JUMP pipeline gives a parent in both `Cells` and `Nuclei`, so it is the one that joins all three tables, and one cytoplasm is one cell."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "65755bcc",
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-29T02:53:36.136463Z",
"iopub.status.busy": "2026-09-29T02:53:36.136204Z",
"iopub.status.idle": "2026-09-29T02:53:40.091121Z",
"shell.execute_reply": "2026-09-29T02:53:40.089031Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"AnnData object with n_obs × n_vars = 239 × 5839\n",
" obs: 'Metadata_ImageNumber', 'Metadata_ObjectNumber', 'Metadata_AbsPositionZ', 'Metadata_AbsTime', 'Metadata_BinningX', 'Metadata_BinningY', 'Metadata_ChannelID', 'Metadata_ChannelName', 'Metadata_Col', 'Metadata_ExposureTime', 'Metadata_FieldID', 'Metadata_ImageResolutionX', 'Metadata_ImageResolutionY', 'Metadata_ImageSizeX', 'Metadata_ImageSizeY', 'Metadata_MainEmissionWavelength', 'Metadata_MainExcitationWavelength', 'Metadata_MaxIntensity', 'Metadata_ObjectiveMagnification', 'Metadata_ObjectiveNA', 'Metadata_PlaneID', 'Metadata_Plate', 'Metadata_PositionX', 'Metadata_PositionY', 'Metadata_PositionZ', 'Metadata_Row', 'Metadata_Site', 'Metadata_Well', 'Metadata_Center_X', 'Metadata_Center_Y'\n",
" var: 'object', 'feature_group', 'feature', 'channel', 'scale', 'angle', 'gray_levels', 'radial_bin', 'params', 'is_feature'\n",
" uns: 'mantispy'\n",
" layers: None (.X)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import warnings\n",
"\n",
"with warnings.catch_warnings():\n",
" warnings.simplefilter(\"ignore\")\n",
" cells = mt.io.read_profiles(directory, primary_object=\"Cytoplasm\", resolution=\"cell\")\n",
"cells"
]
},
{
"cell_type": "markdown",
"id": "4d32f3c2",
"metadata": {},
"source": [
"The metadata columns that came off the export name each cell by its plate, well, site and object number."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "135ac6a8",
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-29T02:53:40.094853Z",
"iopub.status.busy": "2026-09-29T02:53:40.094280Z",
"iopub.status.idle": "2026-09-29T02:53:40.112523Z",
"shell.execute_reply": "2026-09-29T02:53:40.111506Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Metadata_Plate</th>\n",
" <th>Metadata_Well</th>\n",
" <th>Metadata_Site</th>\n",
" <th>Metadata_ObjectNumber</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>BR00121438</td>\n",
" <td>J04</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>BR00121438</td>\n",
" <td>J04</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>BR00121438</td>\n",
" <td>J04</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>BR00121438</td>\n",
" <td>J04</td>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>BR00121438</td>\n",
" <td>J04</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metadata_Plate Metadata_Well Metadata_Site Metadata_ObjectNumber\n",
"0 BR00121438 J04 1 1\n",
"1 BR00121438 J04 1 2\n",
"2 BR00121438 J04 1 3\n",
"3 BR00121438 J04 1 4\n",
"4 BR00121438 J04 1 5"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cells.obs[[\"Metadata_Plate\", \"Metadata_Well\", \"Metadata_Site\", \"Metadata_ObjectNumber\"]].head()"
]
}
],
"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.12.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
71 changes: 26 additions & 45 deletions docs/datasets/jump_lite.ipynb

Large diffs are not rendered by default.

158 changes: 158 additions & 0 deletions docs/datasets/jump_plate.ipynb

Large diffs are not rendered by default.

95 changes: 38 additions & 57 deletions docs/datasets/jump_target2.ipynb

Large diffs are not rendered by default.

Loading
Loading