deepcell_types.DCTConfig#
- class deepcell_types.DCTConfig(zarr_path=None)#
Inference-time configuration for
deepcell_types.predict.A
DCTConfigsnapshots the marker / cell-type registry and a small set of preprocessing constants. The registry is loaded from a TissueNet zarr v3 archive when one is available; otherwise it falls back to the vocabulary snapshot (vocab.json) shipped with the package, sopredict()works without the (large) archive.Note:
DCTConfigis unrelated todeepcell_types.DEFAULT_CONFIG(a preprocessing op list for thepreprocesshook), despite the similar name.- Parameters:
- zarr_pathstr or Path, optional
Path to a TissueNet zarr v3 archive. If
None, looks for theDEEPCELL_TYPES_ZARR_PATHenvironment variable, and otherwise falls back to the packagedvocab.json. An explicitly-passedzarr_paththat does not contain an archive raisesFileNotFoundError. (The tissue->cell-type mapping fromget_tct_mapping()is only available in archive mode.)
- Attributes:
- ARCHIVE_ENV_VARstr
Environment-variable name consulted when
zarr_pathisNone.- CHANNEL_ALIASESdict[str, str]
Canonical channel-name aliases applied during preprocessing.
Methods
get_tct_mapping
resolve_channel_name
Examples
>>> config = DCTConfig() # reads DEEPCELL_TYPES_ZARR_PATH >>> config = DCTConfig(zarr_path="/path/to/tissuenet.zarr")
- __init__(zarr_path=None)#
Methods
__init__([zarr_path])get_tct_mapping()resolve_channel_name(ch_name)Attributes
ARCHIVE_ENV_VARCHANNEL_ALIASESct2idxdomain2idxmarker2idxmaster_channels