Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions docs/tutorials/compounds/dose_response.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"The dataset is [the OASIS pilot](../../datasets/oasis_pilot.ipynb). OASIS is a liver toxicity screen: its main cell\n",
"line is HepaRG, a hepatic progenitor line that differentiates into hepatocyte-like cells and keeps much of the\n",
"drug-metabolising machinery a real liver has. That is the point of using it — a compound that only becomes toxic\n",
"drug-metabolising machinery a real liver has. That is the point of using it: a compound that only becomes toxic\n",
"after the liver metabolises it will not show up in a cell line that cannot metabolise it. Most of its thirty-six\n",
"compounds were dosed over ten concentrations, a three-fold ladder from 15 nM to 300 uM, with eight replicate wells\n",
"at each concentration spread over eight plates; a few, such as berberine, over a different range.\n",
Expand Down Expand Up @@ -81,11 +81,7 @@
}
},
"outputs": [],
"source": [
"import plotly.io as pio\n",
"\n",
"pio.renderers.default = \"notebook_connected\""
]
"source": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -803,7 +799,7 @@
"`Cytoplasm_AreaShape_Zernike_*` are Zernike moments: an orthogonal decomposition of the cytoplasm outline, so a\n",
"change means the cells are changing shape rather than getting brighter. `Nuclei_RadialDistribution_FracAtD_DNA_3of4`\n",
"is the fraction of the DNA signal falling in the third of four concentric rings measured out from the nucleus\n",
"centre — chromatin moving toward the nuclear periphery, as chromatin does when it condenses against the nuclear envelope early in apoptosis.\n",
"centre, chromatin moving toward the nuclear periphery, as chromatin does when it condenses against the nuclear envelope early in apoptosis.\n",
"\n",
"`spearman` and `bmd` disagree in the first row. A monotone trend across the whole range and a threshold crossing\n",
"are different questions: a feature that steps up early and then flattens has a low Spearman and a low benchmark\n",
Expand Down Expand Up @@ -946,7 +942,7 @@
"\n",
"Staurosporine is the case a single number hides. Its amplitude reaches 1.5 at 0.41 uM and 1.9 at 1.2 uM,\n",
"then stops: 2.1 at 33, 2.0 at 300. As a distance it saturates more than two decades below the top of the range. But its plate\n",
"halves agree from 0.41 uM on, 0.76 and above, so each of those concentrations has a direction that reproduces —\n",
"halves agree from 0.41 uM on, 0.76 and above, so each of those concentrations has a direction that reproduces,\n",
"and `cosine_to_top` stays between 0.16 and 0.29. The cell is doing something different at 0.41 uM than at 300 uM.\n",
"The next section shows what.\n",
"\n",
Expand Down Expand Up @@ -1046,13 +1042,13 @@
"\n",
"At 300 uM a different set takes over, and all of them are channel-to-channel correlations inside the nucleus\n",
"region: AGP against Mito, Mito against RNA, AGP against ER. AGP is the actin, Golgi and plasma-membrane stain.\n",
"Every stain agreeing with every other stain in the same place is not a phenotype in the usual sense — it is what\n",
"Every stain agreeing with every other stain in the same place is not a phenotype in the usual sense: it is what\n",
"the image looks like when the cell has lost its internal organisation and the compartments no longer separate.\n",
"`Nuclei_Correlation_Correlation_AGP_Mito` reaches 10.8 MADs.\n",
"\n",
"So the distance saturating from about 1 uM while the direction keeps turning is a real biological sequence: the\n",
"kinase-inhibition phenotype arrives first and stops, and cell disintegration takes over later. Two of the\n",
"plotted features change sign at the top: the RNA radial fraction falls below zero and the AGP–Mito correlation\n",
"plotted features change sign at the top: the RNA radial fraction falls below zero and the AGP-Mito correlation\n",
"rises from below it. A curve fitted to distance\n",
"alone reports one EC50 for both and describes neither."
]
Expand All @@ -1068,11 +1064,11 @@
"\n",
"`dose_direction` labels each concentration with a `phase`:\n",
"\n",
"- `silent` — no reproducible response.\n",
"- `responding` — still moving. The step from the concentration below, `step_amplitude`, beats the noise two\n",
"- `silent`: no reproducible response.\n",
"- `responding`: still moving. The step from the concentration below, `step_amplitude`, beats the noise two\n",
" independent groups of wells carry.\n",
"- `saturated` — reproducible, but it has stopped changing.\n",
"- `cytotoxic` — more than half the cells are gone, so the profile is the morphology of dying cells whatever else\n",
"- `saturated`: reproducible, but it has stopped changing.\n",
"- `cytotoxic`: more than half the cells are gone, so the profile is the morphology of dying cells whatever else\n",
" is true of it. The US EPA's phenotypic pipeline drops these before fitting anything.\n",
"\n",
"The window is a run, not a scatter: `split_half_cosine` over eight wells is itself noisy, and a response that\n",
Expand Down Expand Up @@ -1504,7 +1500,7 @@
"metadata": {},
"source": [
"Mupirocin is grey the whole way. Amperozide and cycloheximide are grey until about 20 uM and then respond to the\n",
"top, so seven of their ten concentrations sit below their effective range — which is the expected result of\n",
"top, so seven of their ten concentrations sit below their effective range, which is the expected result of\n",
"covering three decades to find a window you cannot predict, not a wasted experiment.\n",
"\n",
"Staurosporine responds from 0.41 uM to the top without settling, which is the turning direction above seen from\n",
Expand All @@ -1513,7 +1509,7 @@
"concentration below does not beat the noise.\n",
"\n",
"Actinomycin D is responding at the lowest concentration tested. It intercalates DNA and blocks RNA polymerase at\n",
"nanomolar concentrations, so 15 nM is already well inside its range and its onset lies below this ladder — the\n",
"nanomolar concentrations, so 15 nM is already well inside its range and its onset lies below this ladder, and the\n",
"screen cannot say where. Only its 300 uM\n",
"concentration falls below half the cells, where the band turns red. Both edges of a dose series can fall outside it."
]
Expand Down Expand Up @@ -1612,7 +1608,7 @@
"should have happened yet, the two sit at 0.99 and 0.87.\n",
"\n",
"A cytotoxicity call is a claim about cell counts, and cell counts are the most batch-sensitive number in\n",
"a screen — check them against the plate layout before believing one."
"a screen: check them against the plate layout before believing one."
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/tutorials/compounds/enrichment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@
}
},
"outputs": [],
"source": [
"import plotly.io as pio\n",
"\n",
"pio.renderers.default = \"notebook_connected\""
]
"source": []
},
{
"cell_type": "markdown",
Expand Down
6 changes: 1 addition & 5 deletions docs/tutorials/compounds/hits.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@
}
},
"outputs": [],
"source": [
"import plotly.io as pio\n",
"\n",
"pio.renderers.default = \"notebook_connected\""
]
"source": []
},
{
"cell_type": "markdown",
Expand Down
8 changes: 2 additions & 6 deletions docs/tutorials/compounds/mechanism_of_action.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@
}
},
"outputs": [],
"source": [
"import plotly.io as pio\n",
"\n",
"pio.renderers.default = \"notebook_connected\""
]
"source": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -1346,7 +1342,7 @@
"wrong answer in the blind test above; here their profiles are not even mutually extreme,\n",
"which is the same finding with no classifier in the way. Kinase inhibitors recovers one pair of three; the\n",
"label covers different kinases with different substrates, so there is no reason for its members\n",
"to converge on one morphology — the annotation is broad, not the assay blind.\n",
"to converge on one morphology: the annotation is broad, not the assay blind.\n",
"\n",
"That distinction is the point of reading the per-mechanism table rather than the single\n",
"number. A low overall recall can mean the map is poor, or it can mean the annotation groups\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/data/embeddings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"metadata": {},
"source": [
"384 numbers per well from OpenPhenom, a Cell Painting foundation model. The metadata is ordinary JUMP\n",
"metadata — source, batch, plate, well, and the compound each well received."
"metadata: source, batch, plate, well, and the compound each well received."
]
},
{
Expand All @@ -74,7 +74,7 @@
"\n",
"A CellProfiler feature name parses into a compartment, a feature group and a channel. `openphenom_nahualX_17`\n",
"has neither. The loader supplies the annotation columns the schema requires and leaves them empty, rather\n",
"than letting the name parser loose on names with no structure in them — that parser would read\n",
"than letting the name parser loose on names with no structure in them, since that parser would read\n",
"`openphenom_nahualX_17` as the `nahualX` group of an `openphenom` object, and the screen would quietly\n",
"acquire feature families named after the model's own tensors."
]
Expand Down Expand Up @@ -324,7 +324,7 @@
"This is not a defect of the embedding, it is the honest answer: it has no notion of a channel or a\n",
"compartment. The consequence is that anything keyed on the feature annotation has nothing to work with.\n",
"`pl.effect_sizes` colours its bars by feature family, `tl.feature_sets` groups features into sets, and the\n",
"CellProfiler blocklist names features to drop — none of them have anything to key on.\n",
"CellProfiler blocklist names features to drop: none of them have anything to key on.\n",
"\n",
"What survives is everything that treats a feature as an anonymous number: normalization, sphering, distances,\n",
"hit calling, consensus, and every metric. A block of named features measured on the same wells can name the\n",
Expand Down Expand Up @@ -386,7 +386,7 @@
"resolution, so the object validates and can be written to h5ad. Supplying them empty is the point: the parser\n",
"would read `mymodel_17` as structure it does not have.\n",
"\n",
"Two things worth copying from that cell. `values` is cast to **float32** — a model's output often arrives\n",
"Two things worth copying from that cell. `values` is cast to **float32**: a model's output often arrives\n",
"as float64 once it has been through pandas or a parquet file, and at 100,000 wells by 1,536 dimensions that is\n",
"1.2 GB against 600 MB. And the warning is\n",
"*printed*, not counted: it names `Metadata_CellCount` as missing. Keep the count if your pipeline has one:\n",
Expand Down
Loading
Loading