tiledbsoma.io.register_h5ads

tiledbsoma.io.register_h5ads(experiment_uri: str | None, h5ad_file_names: Sequence[str] | str, *, measurement_name: str, obs_field_name: str, var_field_name: str, append_obsm_varm: bool = False, context: SOMATileDBContext | None = None, use_multiprocessing: bool = False, allow_duplicate_obs_ids: bool = False) ExperimentAmbientLabelMapping

Extends registration data from the baseline, already-written SOMA experiment to include multiple H5AD input files. See from_h5ad and from_anndata on-line help.

The registration process will raise an error if any obs IDs (from obs_field_name) are duplicated across the combination of all inputs and the target SOMA Experiment. You can set allow_duplicate_obs_ids=True to bypass this check if you are adding a new Measurement to existing observations.

If enabled via the use_multiprocessing parameter, this function will use multiprocessing to register each H5AD in parallel. In cases with many files, this can produce a performance benefit. Regardless of use_multiprocessing, H5ADs will be registered concurrently – you can control the concurrency using the soma.compute_concurrency_level configuration parameter in the context argument.