actk.steps.single_cell_features package

Submodules

actk.steps.single_cell_features.single_cell_features module

class actk.steps.single_cell_features.single_cell_features.SingleCellFeatures(direct_upstream_tasks=[<class 'actk.steps.standardize_fov_array.standardize_fov_array.StandardizeFOVArray'>], filepath_columns=['CellFeaturesPath'], **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, distributed_executor_address: Optional[str] = None, batch_size: Optional[int] = None, overwrite: bool = False, **kwargs)[source]

Provided a dataset generate a features JSON file for each cell.

Parameters
  • dataset (Union[str, Path, pd.DataFrame, dd.DataFrame]) – The primary cell dataset to use for generating features JSON for each cell.

    Required dataset columns: [“CellId”, “CellIndex”, “FOVId”, “StandardizedFOVPath”]

  • 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

  • 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 CellFeaturesPath column added.

Return type

Path

class actk.steps.single_cell_features.single_cell_features.SingleCellFeaturesError(cell_id, error)[source]

Bases: tuple

Create new instance of SingleCellFeaturesError(cell_id, error)

cell_id

Alias for field number 0

error

Alias for field number 1

class actk.steps.single_cell_features.single_cell_features.SingleCellFeaturesResult(cell_id, path)[source]

Bases: tuple

Create new instance of SingleCellFeaturesResult(cell_id, path)

cell_id

Alias for field number 0

path

Alias for field number 1

Module contents

class actk.steps.single_cell_features.SingleCellFeatures(direct_upstream_tasks=[<class 'actk.steps.standardize_fov_array.standardize_fov_array.StandardizeFOVArray'>], filepath_columns=['CellFeaturesPath'], **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, distributed_executor_address: Optional[str] = None, batch_size: Optional[int] = None, overwrite: bool = False, **kwargs)[source]

Provided a dataset generate a features JSON file for each cell.

Parameters
  • dataset (Union[str, Path, pd.DataFrame, dd.DataFrame]) – The primary cell dataset to use for generating features JSON for each cell.

    Required dataset columns: [“CellId”, “CellIndex”, “FOVId”, “StandardizedFOVPath”]

  • 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

  • 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 CellFeaturesPath column added.

Return type

Path