hoa_tools.dataset
Tools for working with individual datasets.
The core class representing a single dataset is Dataset.
This inherits from HOAMetadata,
which stores all the metadata for a given dataset.
Dataset objects are not designed to be created by users.
To get a Dataset, use the
get_dataset function in this module.
Dataset
pydantic-model
Bases: HOAMetadata
An individual Human Organ Atlas dataset.
Config:
extra:forbid
Fields:
-
name(str) -
dataset_type(Literal['overview', 'zoom']) -
voi(str) -
data(Data) -
sample(Sample) -
donor(Donor) -
scan(Scan) -
proposal(Proposal) -
registration(Registration | None) -
citation(Citation) -
metadata_version(Literal['1.1'])
data_array
data_array(*, downsample_level: int) -> DataArray
Get a DataArray representing the array for this image.
get_children
Get child dataset(s).
Child datasets are high-resolution zooms of a full-organ dataset.
Notes
For full-organ datasets, this returns an empty list.
get_parents
Get parent dataset(s).
Parent datasets are full-organ datasets from which a zoom dataset is taken from.
Notes
For zoom datasets, this returns an empty list.
change_metadata_directory
Update available datasets from another directory of metadata files.
Designed for internal project members to load metadata files that aren't yet public.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_dir
|
Path
|
Path to directory of metadata files. |
required |
skip_invalid_meta
|
bool
|
If True, skip metadata files that fail validation. |
False
|