One CellProfiler export#
jump_export() is a single, unmodified ExportToSpreadsheet directory, one field of view of a DMSO well of BR00121438 [Chandrasekaran et al., 2023]. It is the example input for 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 jump_plate(), and the well-level profiles of the same plate in jump_target2().
Use it if you have your own CellProfiler ExportToSpreadsheet output and want to read it into cells. From a CellProfiler run walks through that on this directory.
import mantispy as mt
directory = mt.ds.jump_export()
sorted(p.name for p in directory.iterdir())
['Cells.csv', 'Cytoplasm.csv', 'Experiment.csv', 'Image.csv', 'Nuclei.csv']
Reading it into cells#
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.
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore")
cells = mt.io.read_profiles(directory, primary_object="Cytoplasm", resolution="cell")
cells
AnnData object with n_obs × n_vars = 239 × 5839
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'
var: 'object', 'feature_group', 'feature', 'channel', 'scale', 'angle', 'gray_levels', 'radial_bin', 'params', 'is_feature'
uns: 'mantispy'
layers: None (.X)
The metadata columns that came off the export name each cell by its plate, well, site and object number.
cells.obs[["Metadata_Plate", "Metadata_Well", "Metadata_Site", "Metadata_ObjectNumber"]].head()
| Metadata_Plate | Metadata_Well | Metadata_Site | Metadata_ObjectNumber | |
|---|---|---|---|---|
| 0 | BR00121438 | J04 | 1 | 1 |
| 1 | BR00121438 | J04 | 1 | 2 |
| 2 | BR00121438 | J04 | 1 | 3 |
| 3 | BR00121438 | J04 | 1 | 4 |
| 4 | BR00121438 | J04 | 1 | 5 |