mantispy.ds.jump_cells

Contents

mantispy.ds.jump_cells#

mantispy.ds.jump_cells(annotate=True, selected=False, cache_dir=None)#

Single cells from one JUMP plate, as CellProfiler measured them.

Twenty-four wells of BR00121438 at 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 first call downloads about 1.5 GB of CellProfiler output, reads 480 tables and writes the assembled object next to them, which takes a few minutes. Later calls read that one file.

Parameters:
  • annotate (bool (default: True)) – Join the JUMP annotation, which supplies Metadata_Perturbation and Metadata_Control. Downloads another 14 MB. Needed for selected, which is computed against the controls.

  • selected (bool (default: False)) – Return only the features var["selected"] marks, 1607 of 5857, as mantispy.pp.subset_features() would. The subset is kept beside the whole object, so a notebook that only wants the reduced one reads 87 MB instead of 308 MB.

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

Raises:

KeyErrorselected was asked for without annotate, so there are no controls to select against.

Return type:

AnnData

Returns:

Cells by features at cell resolution, carrying Metadata_Source, Metadata_Plate, Metadata_Well, Metadata_Site and, when annotated, Metadata_JCP2022, Metadata_Perturbation, Metadata_InChIKey and Metadata_Control. When annotated, var["selected"] marks the features feature selection keeps, so the object can be reduced with adata[:, adata.var["selected"]] the way scanpy’s highly_variable is used. A cell carries no count. mantispy.tl.aggregate() writes Metadata_CellCount over the four fields read and a Metadata_SiteCount of four, so a well counts about four ninths of the cells jump_target2() gives it over all nine.

References

Chandrasekaran et al. [2023].