actk.steps.single_cell_images package¶
Submodules¶
actk.steps.single_cell_images.single_cell_images module¶
-
class
actk.steps.single_cell_images.single_cell_images.
CellImagesError
(cell_id, error)[source]¶ Bases:
tuple
Create new instance of CellImagesError(cell_id, error)
-
cell_id
¶ Alias for field number 0
-
error
¶ Alias for field number 1
-
-
class
actk.steps.single_cell_images.single_cell_images.
CellImagesResult
(cell_id, path_3d, path_2d_all_proj, path_2d_yx_proj)[source]¶ Bases:
tuple
Create new instance of CellImagesResult(cell_id, path_3d, path_2d_all_proj, path_2d_yx_proj)
-
cell_id
¶ Alias for field number 0
-
path_2d_all_proj
¶ Alias for field number 2
-
path_2d_yx_proj
¶ Alias for field number 3
-
path_3d
¶ Alias for field number 1
-
-
class
actk.steps.single_cell_images.single_cell_images.
SingleCellImages
(direct_upstream_tasks=[<class 'actk.steps.single_cell_features.single_cell_features.SingleCellFeatures'>], filepath_columns=['CellImage3DPath', 'CellImage2DAllProjectionsPath', 'CellImage2DYXProjectionPath'], **kwargs)[source]¶ Bases:
datastep.step.Step
-
run
(dataset: Union[str, pathlib.Path, pandas.core.frame.DataFrame, dask.dataframe.core.DataFrame], cell_ceiling_adjustment: int = 0, bounding_box_percentile: float = 95.0, projection_method: str = 'max', distributed_executor_address: Optional[str] = None, batch_size: Optional[int] = None, overwrite: bool = False, bbox: Union[tuple, list, dict] = None, **kwargs)[source]¶ Provided a dataset of cell features and standardized FOV images, generate 3D single cell crops and 2D projections.
- Parameters
dataset (Union[str, Path, pd.DataFrame, dd.DataFrame]) – The primary cell dataset to generate 3D single cell images for.
Required dataset columns: [“CellId”, “StandardizedFOVPath”, “CellFeaturesPath”]
cell_ceiling_adjustment (int) – The adjust to use for raising the cell shape ceiling. If <= 0, this will be ignored and cell data will be selected but not adjusted. Default: 0
bounding_box_percentile (float) – A float used to generate the actual bounding box for all cells by finding provided percentile of all cell image sizes. Default: 95.0
bbox (tuple, list, dict) – Hard coded ZYX dimensions to set the bounding box. Note: This overrides the bounding_box_percentile parameter. Example: (64, 168, 104)
projection_method (str) – The method to use for generating the flat projection. Default: max
distributed_executor_address (Optional[str]) – An optional executor address to pass to some computation engine. Default: None
batch_size (Optional[int]) – An optional batch size to process n features at a time. Default: None (Process all at once)
overwrite (bool) – If this step has already partially or completely run, should it overwrite the previous files or not. Default: False (Do not overwrite or regenerate files)
- Returns
manifest_save_path – Path to the produced manifest with the various cell image path fields added.
- Return type
Path
-
Module contents¶
-
class
actk.steps.single_cell_images.
SingleCellImages
(direct_upstream_tasks=[<class 'actk.steps.single_cell_features.single_cell_features.SingleCellFeatures'>], filepath_columns=['CellImage3DPath', 'CellImage2DAllProjectionsPath', 'CellImage2DYXProjectionPath'], **kwargs)[source]¶ Bases:
datastep.step.Step
-
run
(dataset: Union[str, pathlib.Path, pandas.core.frame.DataFrame, dask.dataframe.core.DataFrame], cell_ceiling_adjustment: int = 0, bounding_box_percentile: float = 95.0, projection_method: str = 'max', distributed_executor_address: Optional[str] = None, batch_size: Optional[int] = None, overwrite: bool = False, bbox: Union[tuple, list, dict] = None, **kwargs)[source]¶ Provided a dataset of cell features and standardized FOV images, generate 3D single cell crops and 2D projections.
- Parameters
dataset (Union[str, Path, pd.DataFrame, dd.DataFrame]) – The primary cell dataset to generate 3D single cell images for.
Required dataset columns: [“CellId”, “StandardizedFOVPath”, “CellFeaturesPath”]
cell_ceiling_adjustment (int) – The adjust to use for raising the cell shape ceiling. If <= 0, this will be ignored and cell data will be selected but not adjusted. Default: 0
bounding_box_percentile (float) – A float used to generate the actual bounding box for all cells by finding provided percentile of all cell image sizes. Default: 95.0
bbox (tuple, list, dict) – Hard coded ZYX dimensions to set the bounding box. Note: This overrides the bounding_box_percentile parameter. Example: (64, 168, 104)
projection_method (str) – The method to use for generating the flat projection. Default: max
distributed_executor_address (Optional[str]) – An optional executor address to pass to some computation engine. Default: None
batch_size (Optional[int]) – An optional batch size to process n features at a time. Default: None (Process all at once)
overwrite (bool) – If this step has already partially or completely run, should it overwrite the previous files or not. Default: False (Do not overwrite or regenerate files)
- Returns
manifest_save_path – Path to the produced manifest with the various cell image path fields added.
- Return type
Path
-