tiledbsoma.io.upgrade_experiment_shapes¶
- tiledbsoma.io.upgrade_experiment_shapes(uri: str, *, verbose: bool = False, check_only: bool = False, context: ~tiledbsoma.options._soma_tiledb_context.SOMATileDBContext | None = None, output_handle: ~_io.TextIOWrapper | ~_io.StringIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) bool¶
For each dataframe contained within the SOMA
Experimentpointed to by the given URI, sets thedomainto match the dataframe’s currentnon_empty_domain. For each N-D array, sets theshapeto match the array’snon_empty_domain. Ifverboseis set toTrue, an activity log is printed. Ifcheck_onlyis true, only does a dry run and reports any reasons the upgrade would fail.This makes an experiment created before TileDB-SOMA 1.15 look like an experiment created by TileDB-SOMA 1.15 or later. You can use
tiledbsoma.io.show_experiment_shapesbefore and after to see the difference.- Parameters:
uri – The URI of a SOMA
Experiment.verbose – If
True, produce per-array output as the upgrade runs.check_only – If
True, don’t apply the upgrades, but show what would be attempted, and show why each one would fail.context – Optional
SOMATileDBContext.
Example:
>>> tiledbsoma.io.upgrade_experiment_shapes('pbmc3k_unprocessed_old', check_only=True) [DataFrame] obs URI file:///data/pbmc3k_unprocessed_old/obs Dry run for: tiledbsoma_upgrade_soma_joinid_shape(2700) OK [DataFrame] ms/RNA/var URI file:///data/pbmc3k_unprocessed_old/ms/RNA/var Dry run for: tiledbsoma_upgrade_soma_joinid_shape(13714) OK [SparseNDArray] ms/RNA/X/data URI file:///data/pbmc3k_unprocessed_old/ms/RNA/X/data Dry run for: tiledbsoma_upgrade_shape((2700, 13714)) OK