scanpy.settings.override#
- settings.override(*, verbosity=<no change>, logfile=<no change>, N_PCS=<no change>, plot_suffix=<no change>, file_format_data=<no change>, file_format_figs=<no change>, autosave=<no change>, autoshow=<no change>, writedir=<no change>, cachedir=<no change>, datasetdir=<no change>, figdir=<no change>, cache_compression=<no change>, max_memory=<no change>, n_jobs=<no change>, categories_to_ignore=<no change>)[source]#
Provides local override via keyword arguments as a context manager.
- Parameters:
- preset
Preset(default:<no change>) Preset to use.
- verbosity
Verbosity(default:<no change>) Verbosity level (default
Verbosity.warning).- logfile
Writer[str] (default:<no change>) The open file to write logs to.
Set it to a
Pathorstrto open a new one. By default usessys.stdoutin jupyter notebooks andsys.stderrotherwise.- N_PCS
int(default:<no change>) Default number of principal components to use.
- plot_suffix
str(default:<no change>) Global suffix that is appended to figure filenames.
- file_format_data
Literal['h5ad','zarr'] (default:<no change>) File format for saving AnnData objects.
- file_format_figs
str(default:<no change>) File format for saving figures.
For example
'png','pdf'or'svg'. Many other formats work as well (seematplotlib.pyplot.savefig()).- autosave
bool(default:<no change>) Automatically save figures in
figdir(defaultFalse).Do not show plots/figures interactively.
- autoshow
bool(default:<no change>) Automatically show figures if
autosave == False(defaultTrue).There is no need to call the matplotlib pl.show() in this case.
- writedir
Path(default:<no change>) Directory where the function scanpy.write writes to by default.
- cachedir
Path(default:<no change>) Directory for cache files (default
'./cache/').- datasetdir
Path(default:<no change>) Directory for example
datasets(default'./data/').- figdir
Path(default:<no change>) Directory for
autosaveing figures (default'./figures/').- cache_compression
Literal['lzf','gzip'] |None(default:<no change>) Compression for
sc.read(..., cache=True)(default'lzf').- max_memory
float(default:<no change>) Maximum memory usage in Gigabyte.
Is currently not well respected…
- n_jobs
int(default:<no change>) Default number of jobs/ CPUs to use for parallel computing.
Set to
-1in order to use all available cores. Not all algorithms support special behavior for numbers <-1, so make sure to leave this setting as >=-1.Changed in version 1.13.0: The default changed from
1to4.- categories_to_ignore
Container[str] (default:<no change>) Categories that are omitted in plotting etc.
- preset
- Return type: