Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Run upgrade-shapes on notebook example experiments #3289

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Nov 3, 2024

Issue and/or context: As tracked on issue #2407 / [sc-51048].

Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.

Changes:

Run tiledbsoma.io.upgrade_experiment_shapes on the notebook example experiments.

Notes for Reviewer:

PRs for notebook content are soon to come, to be stacked on top of this.

Stacking as of today:

The following was run on a system with core dev (soon to be 2.27) on it, wherein we have support for new shape on dense arrays.

Shapes before:

>>> tiledbsoma.io.show_experiment_shapes('apis/python/notebooks/data/sparse/pbmc3k')

[DataFrame] obs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/obs
  count                2638
  domain               ((0, 2637),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DataFrame] ms/RNA/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/var
  count                1838
  domain               ((0, 1837),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[SparseNDArray] ms/RNA/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/X/data
  used_shape           ((0, 2637), (0, 1837))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_draw_graph_fr
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_draw_graph_fr
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_pca
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_pca
  used_shape           ((0, 2637), (0, 49))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_tsne
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_tsne
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_umap
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_umap
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsp/connectivities
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsp/connectivities
  used_shape           ((0, 2637), (0, 2637))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsp/distances
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsp/distances
  used_shape           ((0, 2637), (1, 2637))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/varm/PCs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/varm/PCs
  used_shape           ((0, 1837), (0, 49))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[DataFrame] ms/raw/varm/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/raw/var
  count                13714
  domain               ((0, 2147483646),)
  maxdomain            ((0, 2147483646),)
  upgraded             False

[SparseNDArray] ms/raw/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/raw/X/data
  used_shape           ((0, 2637), (0, 13713))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False
True



>>> tiledbsoma.io.show_experiment_shapes('apis/python/notebooks/data/dense/pbmc3k')

[DataFrame] obs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/obs
  count                2638
  domain               ((0, 2637),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DataFrame] ms/RNA/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/var
  count                1838
  domain               ((0, 1837),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DenseNDArray] ms/RNA/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/X/data
  shape                (2638, 1838)
  maxshape             (2638, 1838)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_draw_graph_fr
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_draw_graph_fr
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_pca
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_pca
  used_shape           ((0, 2637), (0, 49))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_tsne
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_tsne
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_umap
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_umap
  used_shape           ((0, 2637), (0, 1))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsp/connectivities
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsp/connectivities
  used_shape           ((0, 2637), (0, 2637))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/obsp/distances
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsp/distances
  used_shape           ((0, 2637), (1, 2637))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[SparseNDArray] ms/RNA/varm/PCs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/varm/PCs
  used_shape           ((0, 1837), (0, 49))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False

[DataFrame] ms/raw/varm/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/raw/var
  count                13714
  domain               ((0, 2147483646),)
  maxdomain            ((0, 2147483646),)
  upgraded             False

[SparseNDArray] ms/raw/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/raw/X/data
  used_shape           ((0, 2637), (0, 13713))
  shape                (2147483646, 2147483646)
  maxshape             (2147483646, 2147483646)
  upgraded             False
True

The upgrade:

>>> tiledbsoma.io.upgrade_experiment_shapes('apis/python/notebooks/data/sparse/pbmc3k')
>>> tiledbsoma.io.upgrade_experiment_shapes('apis/python/notebooks/data/dense/pbmc3k')

Shapes after:

>>> tiledbsoma.io.show_experiment_shapes('apis/python/notebooks/data/sparse/pbmc3k')

[DataFrame] obs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/obs
  count                2638
  domain               ((0, 2637),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DataFrame] ms/RNA/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/var
  count                1838
  domain               ((0, 1837),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[SparseNDArray] ms/RNA/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/X/data
  used_shape           ((0, 2637), (0, 1837))
  shape                (2638, 1838)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_draw_graph_fr
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_draw_graph_fr
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_pca
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_pca
  used_shape           ((0, 2637), (0, 49))
  shape                (2638, 50)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_tsne
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_tsne
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_umap
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsm/X_umap
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsp/connectivities
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsp/connectivities
  used_shape           ((0, 2637), (0, 2637))
  shape                (2638, 2638)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsp/distances
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/obsp/distances
  used_shape           ((0, 2637), (1, 2637))
  shape                (2638, 2638)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/varm/PCs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/RNA/varm/PCs
  used_shape           ((0, 1837), (0, 49))
  shape                (1838, 50)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[DataFrame] ms/raw/varm/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/raw/var
  count                13714
  domain               ((0, 13713),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[SparseNDArray] ms/raw/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/sparse/pbmc3k/ms/raw/X/data
  used_shape           ((0, 2637), (0, 13713))
  shape                (2638, 13714)
  maxshape             (2147483646, 2147483646)
  upgraded             True
True




>>> tiledbsoma.io.show_experiment_shapes('apis/python/notebooks/data/dense/pbmc3k')

[DataFrame] obs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/obs
  count                2638
  domain               ((0, 2637),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DataFrame] ms/RNA/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/var
  count                1838
  domain               ((0, 1837),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[DenseNDArray] ms/RNA/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/X/data
  shape                (2638, 1838)
  maxshape             (2638, 1838)
  upgraded             False

[SparseNDArray] ms/RNA/obsm/X_draw_graph_fr
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_draw_graph_fr
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_pca
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_pca
  used_shape           ((0, 2637), (0, 49))
  shape                (2638, 50)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_tsne
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_tsne
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsm/X_umap
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsm/X_umap
  used_shape           ((0, 2637), (0, 1))
  shape                (2638, 2)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsp/connectivities
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsp/connectivities
  used_shape           ((0, 2637), (0, 2637))
  shape                (2638, 2638)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/obsp/distances
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/obsp/distances
  used_shape           ((0, 2637), (1, 2637))
  shape                (2638, 2638)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[SparseNDArray] ms/RNA/varm/PCs
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/RNA/varm/PCs
  used_shape           ((0, 1837), (0, 49))
  shape                (1838, 50)
  maxshape             (2147483646, 2147483646)
  upgraded             True

[DataFrame] ms/raw/varm/var
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/raw/var
  count                13714
  domain               ((0, 13713),)
  maxdomain            ((0, 2147483646),)
  upgraded             True

[SparseNDArray] ms/raw/X/data
  URI file:///Users/kerl/git/single-cell-data/TileDB-SOMA/apis/python/notebooks/data/dense/pbmc3k/ms/raw/X/data
  used_shape           ((0, 2637), (0, 13713))
  shape                (2638, 13714)
  maxshape             (2147483646, 2147483646)
  upgraded             True
True

@johnkerl johnkerl requested a review from nguyenv November 3, 2024 15:23
@johnkerl johnkerl changed the title Kerl/notebook shape upgrade [python] Run upgrade-shapes on notebook example experiments Nov 3, 2024
Base automatically changed from kerl/dense-ugrsh to main November 4, 2024 18:43
@johnkerl johnkerl merged commit a515eb7 into main Nov 4, 2024
1 check passed
@johnkerl johnkerl deleted the kerl/notebook-shape-upgrade branch November 4, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants