mantispy.ds.bbbc021

Contents

mantispy.ds.bbbc021#

mantispy.ds.bbbc021(cache_dir=None, *, aggregated=False, feature_selected=False)[source]#

BBBC021, MCF-7 cells treated with small molecules, the standard mechanism-of-action benchmark.

Well-level CellProfiler profiles (cpg0010-caie-drugresponse), joined to the compound, concentration and mechanism of action the Broad Bioimage Benchmark Collection publishes with the image set. The image set covers 113 compounds. This returns the annotated subset the benchmark uses: 38 compounds plus DMSO, 103 treatments (a compound at a concentration) across 12 mechanisms.

The base and its variants are pre-built by scripts/build_staged_datasets.py and rehosted on scverse-exampledata, so the loader fetches a single h5ad rather than reassembling the base from the raw per-well tables. The two flags select the variant:

  • both False: the base, well-level profiles with every feature, the object the recipe tutorials start from.

  • feature_selected=True: the well-level block after pycytominer-default feature selection.

  • aggregated=True: one modz consensus (Spearman, min_replicates=2) per Metadata_Perturbation over every well, DMSO-at-a-concentration included, so each compound-at-concentration is one profile.

  • aggregated=True, feature_selected=True: that same consensus on the feature-selected block.

Every well carries a mechanism, DMSO included; select treatments with adata[~adata.obs["Metadata_Control"]].

Parameters:
  • cache_dir (str | Path | None (default: None)) – Where to keep the download. Defaults to mantispy.settings.cache_dir.

  • aggregated (bool (default: False)) – Return the perturbation-level modz consensus instead of the wells.

  • feature_selected (bool (default: False)) – Return the feature-selected block instead of all features.

Return type:

AnnData

Returns:

Wells by features at well resolution when both flags are False, else the staged variant selected by the two flags, read with mantispy.io.read(). Every variant carries Metadata_Plate, Metadata_Well, Metadata_Compound, Metadata_Concentration, Metadata_MOA, Metadata_Perturbation (compound at concentration), Metadata_Perturbation_Type ("compound"), Metadata_Control, and Metadata_CellCount over the Metadata_SiteCount fields, of four imaged, that contributed cells.

Raises:

ValueError – aggregated or feature_selected is not a bool.

References

Caie et al. [2010], the image set. Ljosa et al. [2013], these profiles and the benchmark. Images courtesy of Peter Caie and David Westwood, available from the Broad Bioimage Benchmark Collection [Ljosa et al., 2012].