save_domain#
- save_domain(domain, name_of_file=None, path_to_save=None, save_summary=True, notes=None)#
Save a domain object to a file. The domain object is saved as a pickle file.
- Parameters:
- domainmuspan.domain
The domain object to be saved.
- name_of_filestr or None, optional
Name of the domain file to be saved. If None, the domain’s name is used. Defaults to None.
- path_to_savestr or None, optional
Path to the folder to save the domain in. Defaults to None.
- save_summarybool, optional
If True, prints a summary message after saving. Defaults to True.
- notesstr or None, optional
Additional notes to include in the saved file metadata. Defaults to None.
- Raises:
- ValueError
If the input domain is not of the correct type. If the input path to save is not of the correct type. If the input name of domain is not of the correct type.
Examples
import muspan as ms # load an example domain example_domain = ms.datasets.load_example_domain('Xenium-Healthy-Colon') # save the domain locally to the current working directory with a specified file name path_to_save = '.' name_of_file = 'saved_example_domain.muspan' # save the domain ms.io.save_domain(example_domain, name_of_file=name_of_file, path_to_save=path_to_save)