ehrapy.settings#

ehrapy.settings = _EhrapySettings(verbosity='warning', plot_suffix='', file_format_data='h5ad', file_format_figs='pdf', autosave=False, autoshow=True, writedir=PosixPath('ehrapy_write'), cachedir=PosixPath('ehrapy_cache'), datasetdir=PosixPath('ehrapy_data'), figdir=PosixPath('figures'), cache_compression='lzf', max_memory=15.0, n_jobs=-1, categories_to_ignore=['N/A', 'dontknow', 'no_gate', '?'], n_pcs=50)#

Allows users to customize settings for the ehrapy package.

Settings here will generally be for advanced use-cases and should be used with caution.

For setting an option use override() (local) or set the attributes directly (global) i.e., ehrapy.settings.my_setting = foo. For assignment by environment variable, use the variable name in all caps with EHRAPY_ as the prefix before import of ehrapy.

The following options are available:

settings.verbosity: Literal['error', 'warning', 'success', 'info', 'hint', 'debug'] = 'warning'#

Logger verbosity (one of 'error', 'warning', 'success', 'info', 'hint', 'debug').

settings.plot_suffix: str = ''#

Global suffix appended to figure filenames.

settings.file_format_data: Literal['csv', 'h5ad'] = 'h5ad'#

File format for saving EHRData objects.

settings.file_format_figs: str = 'pdf'#

Default file format for saving figures (e.g. 'png', 'pdf', 'svg').

settings.autosave: bool = False#

Automatically save figures to figdir instead of displaying them.

settings.autoshow: bool = True#

Automatically show figures when autosave is False.

settings.writedir: pathlib.Path = PosixPath('ehrapy_write')#

Default directory for scanpy.write().

settings.cachedir: pathlib.Path = PosixPath('ehrapy_cache')#

Directory for cache files.

settings.datasetdir: pathlib.Path = PosixPath('ehrapy_data')#

Directory for downloaded example datasets.

settings.figdir: pathlib.Path = PosixPath('figures')#

Directory for saving figures.

settings.cache_compression: Literal['lzf', 'gzip'] | None = 'lzf'#

Compression for cached reads.

settings.max_memory: float = 15#

Maximum memory usage in Gigabytes (advisory).

settings.n_jobs: int = -1#

Default number of jobs / CPUs for parallel computing. -1 uses all available cores.

settings.categories_to_ignore: list[str]#

Category labels omitted in plotting.

settings.n_pcs: int = 50#

Default number of principal components.