tiledbsoma.io.get_experiment_shapes¶
- tiledbsoma.io.get_experiment_shapes(uri: str, *, context: SOMATileDBContext | None = None) dict[str, Any]¶
Returns the current shapes of the elements in the
Experiment.Similar to
show_experiment_shapesbut returns a nested Python dict.Returns the
non_empty_domain,domain, andmaxdomainof dataframes and thenon_empty_domain,shape, andmaxshapeof arrays as a dictionary. This method is applied to the following elements inside the SOMAExperiment:The shapes of the following elements are output:
the
obsdataframe in the experiment,
and for each measurement:
the
vardataframe,all
Xarrays,all
obsmarrays,all
varmarrays,all
obsparrays,all
varmarrays,all
varparrays.
Example:
>>> tiledbsoma.io.get_experiment_shapes('pbmc3k_unprocessed') { "obs": { "uri": "exp/obs", "type": "DataFrame", "count": 2700, "non_empty_domain": ((0, 2699),), "domain": ((0, 2699),), "maxdomain": ((0, 2147483646),), "upgraded": False, }, "ms": { "RNA": { "var": { "uri": "exp/ms/RNA/var", "type": "DataFrame", "count": 13714, "non_empty_domain": ((0, 13713),), "domain": ((0, 13713),), "maxdomain": ((0, 2147483646),), "upgraded": False, }, "X": { "data": { "uri": "exp/ms/RNA/X/data", "type": "SparseNDArray", "non_empty_domain": ((0, 2699), (0, 13713)), "shape": (2700, 13714), "maxshape": (2147483646, 2147483646), "upgraded": False, } }, } }, }
- Parameters:
uri – The URI of a SOMA
Experiment.context – Optional
SOMATileDBContext.output_handle – The handle to print the output to.
Returns: a nested Python dict.