tiledbsoma.io.show_experiment_shapes

tiledbsoma.io.show_experiment_shapes(uri: str, *, 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

Outputs the current shapes of the elements in the Experiment.

Outputs the non_empty_domain, domain, and maxdomain of dataframes and the non_empty_domain, shape, and maxshape of arrays. This method is applied to the following elements inside the SOMA Experiment:

The shapes of the following elements are output:

  • the obs dataframe in the experiment,

and for each measurement:

  • the var dataframe,

  • all X arrays,

  • all obsm arrays,

  • all varm arrays,

  • all obsp arrays,

  • all varm arrays,

  • all varp arrays.

Example:

>>> tiledbsoma.io.show_experiment_shapes('pbmc3k_unprocessed')
[DataFrame] obs
  URI file:///data/pbmc3k_unprocessed/obs
  non_empty_domain     ((0, 2699),)
  domain               ((0, 2699),)
  maxdomain            ((0, 9223372036854773758),)
  upgraded             True
[DataFrame] ms/RNA/var
  URI file:///data/pbmc3k_unprocessed/ms/RNA/var
  non_empty_domain     ((0, 13713),)
  domain               ((0, 13713),)
  maxdomain            ((0, 9223372036854773758),)
  upgraded             True
[SparseNDArray] ms/RNA/X/data
  URI file:///data/pbmc3k_unprocessed/ms/RNA/X/data
  shape                (2700, 13714)
  maxshape             (9223372036854773759, 9223372036854773759)
  upgraded             True
Parameters:
  • uri – The URI of a SOMA Experiment.

  • context – Optional SOMATileDBContext.

  • output_handle – The handle to print the output to.

Returns:

True if outputting the shape works for elements. False if any element fails to successfully output its shape.