mantispy.ds.jump_cells#
- mantispy.ds.jump_cells(annotate=True, selected=False, cache_dir=None, *, aggregated=False)[source]#
Single cells from one JUMP plate, as CellProfiler measured them.
Twenty-four wells of
BR00121438at four fields of view each: eight DMSO wells, four compounds with both of their replicate wells, and eight more compounds at one well. The strongest movers on this plate are cytotoxic, so ranking wells by distance alone selects for empty wells; every well here holds more than 120 cells in its first field.The same plate’s well-level profiles are
jump_target2(), so a profile aggregated from these cells can be compared with the one the consortium published.The annotated cells, their feature-selected block and their well-level aggregate are pre-built by
scripts/build_staged_datasets.pyfrom the 480 raw CellProfiler tables and rehosted onscverse-exampledata, so the loader fetches a single h5ad rather than reassembling the object on every call. Passingannotate=Falsestill assembles the raw, un-annotated cells locally, downloading about 1.5 GB of CellProfiler output and caching the assembled object.- Parameters:
annotate (
bool(default:True)) – Fetch the annotated cells, which carryMetadata_PerturbationandMetadata_Control.Falseassembles the raw cells locally, without the annotation join. Needed forselectedandaggregated.selected (
bool(default:False)) – Return only the featuresvar["selected"]marks, asmantispy.pp.subset_features()would (87 MB instead of 308 MB).cache_dir (
str|Path|None(default:None)) – Where to keep the download. Defaults tomantispy.settings.cache_dir.aggregated (
bool(default:False)) – Return one median profile per well (Metadata_Plate,Metadata_Well) instead of the cells, withMetadata_CellCountandMetadata_SiteCount, so it lines up with the well-leveljump_target2().
- Raises:
KeyError –
selectedoraggregatedwas asked for withoutannotate, so there is no annotation to select or group against.ValueError –
selectedandaggregatedwere both asked for; there is no aggregated feature-selected variant.
- Return type:
- Returns:
Cells by features at cell resolution (one median per well when
aggregated), read withmantispy.io.read(), carryingMetadata_Source,Metadata_Plate,Metadata_Well,Metadata_Siteand, when annotated,Metadata_JCP2022,Metadata_Perturbation,Metadata_Perturbation_Type("compound"),Metadata_InChIKeyandMetadata_Control. When annotated,var["selected"]marks the features feature selection keeps, so the object can be reduced withadata[:, adata.var["selected"]]the way scanpy’shighly_variableis used. Theaggregatedwell profiles carryMetadata_CellCountover the four fields read and aMetadata_SiteCountof four, so a well counts about four ninths of the cellsjump_target2()gives it over all nine.
References
Chandrasekaran et al. [2023].