SingleCellExperiment 0.6.2__tar.gz → 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.pre-commit-config.yaml +1 -1
  2. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/CHANGELOG.md +2 -1
  3. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/PKG-INFO +3 -2
  4. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/changelog.md +2 -1
  5. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/setup.cfg +2 -1
  6. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/PKG-INFO +3 -2
  7. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/SOURCES.txt +2 -0
  8. singlecellexperiment-0.6.3/src/SingleCellExperiment.egg-info/scm_file_list.json +50 -0
  9. singlecellexperiment-0.6.3/src/SingleCellExperiment.egg-info/scm_version.json +8 -0
  10. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/SingleCellExperiment.py +18 -4
  11. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce_io.py +10 -0
  12. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.coveragerc +0 -0
  13. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.github/workflows/publish-pypi.yml +0 -0
  14. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.github/workflows/run-tests.yml +0 -0
  15. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.gitignore +0 -0
  16. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/.readthedocs.yml +0 -0
  17. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/AUTHORS.md +0 -0
  18. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/CONTRIBUTING.md +0 -0
  19. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/LICENSE.txt +0 -0
  20. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/README.md +0 -0
  21. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/Makefile +0 -0
  22. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/_static/.gitignore +0 -0
  23. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/authors.md +0 -0
  24. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/conf.py +0 -0
  25. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/contributing.md +0 -0
  26. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/index.md +0 -0
  27. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/license.md +0 -0
  28. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/readme.md +0 -0
  29. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/requirements.txt +0 -0
  30. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/docs/tutorial.md +0 -0
  31. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/pyproject.toml +0 -0
  32. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/setup.py +0 -0
  33. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/dependency_links.txt +0 -0
  34. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/not-zip-safe +0 -0
  35. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/requires.txt +0 -0
  36. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/SingleCellExperiment.egg-info/top_level.txt +0 -0
  37. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/__init__.py +0 -0
  38. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/_combineutils.py +0 -0
  39. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/_ioutils.py +0 -0
  40. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/io/__init__.py +0 -0
  41. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/io/h5ad.py +0 -0
  42. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/src/singlecellexperiment/io/tenx.py +0 -0
  43. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/conftest.py +0 -0
  44. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/adata.h5ad +0 -0
  45. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/mocks.py +0 -0
  46. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/raw_feature_bc_matrix/barcodes.tsv +0 -0
  47. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/raw_feature_bc_matrix/features.tsv +0 -0
  48. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/raw_feature_bc_matrix/matrix.mtx +0 -0
  49. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/data/tenx.sub.h5 +0 -0
  50. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce.py +0 -0
  51. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce_combine_cols.py +0 -0
  52. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce_combine_rows.py +0 -0
  53. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce_methods.py +0 -0
  54. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tests/test_sce_slice.py +0 -0
  55. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.3}/tox.ini +0 -0
@@ -33,7 +33,7 @@ repos:
33
33
 
34
34
  - repo: https://github.com/astral-sh/ruff-pre-commit
35
35
  # Ruff version.
36
- rev: v0.14.5
36
+ rev: v0.15.6
37
37
  hooks:
38
38
  - id: ruff
39
39
  args: [--fix, --exit-non-zero-on-fix]
@@ -1,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.2
3
+ ## Version 0.6.0 - 0.6.3
4
4
 
5
5
  - Changed related to SummarizedExperiment and implementation of `CompressedGenomicRangesList` in the genomic ranges package.
6
6
  - Update versions of relevant dependency packages.
7
7
  - Rename `reduced_dims` to `reduced_dimensions`.
8
8
  - Implement coercions to/from RSE/SE.
9
+ - Access data stored in `raw` (if available) as `alternative_experiments`, when initializing `SingleCellExperiment` objects from anndata/h5ad files.
9
10
 
10
11
  ## Version 0.5.8 - 0.5.9
11
12
 
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SingleCellExperiment
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Container class for single-cell experiments
5
5
  Home-page: https://github.com/BiocPy/SingleCellExperiment
6
6
  Author: jkanche
7
7
  Author-email: jayaram.kancherla@gmail.com
8
8
  License: MIT
9
- Project-URL: Documentation, https://github.com/BiocPy/SingleCellExperiment
9
+ Project-URL: Documentation, https://biocpy.github.io/SingleCellExperiment/
10
+ Project-URL: Source, https://github.com/BiocPy/SingleCellExperiment
10
11
  Platform: any
11
12
  Classifier: Development Status :: 4 - Beta
12
13
  Classifier: Programming Language :: Python
@@ -1,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.2
3
+ ## Version 0.6.0 - 0.6.3
4
4
 
5
5
  - Changed related to SummarizedExperiment and implementation of `CompressedGenomicRangesList` in the genomic ranges package.
6
6
  - Update versions of relevant dependency packages.
7
7
  - Rename `reduced_dims` to `reduced_dimensions`.
8
8
  - Implement coercions to/from RSE/SE.
9
+ - Access data stored in `raw` (if available) as `alternative_experiments`, when initializing `SingleCellExperiment` objects from anndata/h5ad files.
9
10
 
10
11
  ## Version 0.5.8 - 0.5.9
11
12
 
@@ -9,7 +9,8 @@ long_description = file: README.md
9
9
  long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
10
10
  url = https://github.com/BiocPy/SingleCellExperiment
11
11
  project_urls =
12
- Documentation = https://github.com/BiocPy/SingleCellExperiment
12
+ Documentation = https://biocpy.github.io/SingleCellExperiment/
13
+ Source = https://github.com/BiocPy/SingleCellExperiment
13
14
  platforms = any
14
15
  classifiers =
15
16
  Development Status :: 4 - Beta
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SingleCellExperiment
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Container class for single-cell experiments
5
5
  Home-page: https://github.com/BiocPy/SingleCellExperiment
6
6
  Author: jkanche
7
7
  Author-email: jayaram.kancherla@gmail.com
8
8
  License: MIT
9
- Project-URL: Documentation, https://github.com/BiocPy/SingleCellExperiment
9
+ Project-URL: Documentation, https://biocpy.github.io/SingleCellExperiment/
10
+ Project-URL: Source, https://github.com/BiocPy/SingleCellExperiment
10
11
  Platform: any
11
12
  Classifier: Development Status :: 4 - Beta
12
13
  Classifier: Programming Language :: Python
@@ -29,6 +29,8 @@ src/SingleCellExperiment.egg-info/SOURCES.txt
29
29
  src/SingleCellExperiment.egg-info/dependency_links.txt
30
30
  src/SingleCellExperiment.egg-info/not-zip-safe
31
31
  src/SingleCellExperiment.egg-info/requires.txt
32
+ src/SingleCellExperiment.egg-info/scm_file_list.json
33
+ src/SingleCellExperiment.egg-info/scm_version.json
32
34
  src/SingleCellExperiment.egg-info/top_level.txt
33
35
  src/singlecellexperiment/SingleCellExperiment.py
34
36
  src/singlecellexperiment/__init__.py
@@ -0,0 +1,50 @@
1
+ {
2
+ "files": [
3
+ ".coveragerc",
4
+ ".pre-commit-config.yaml",
5
+ "README.md",
6
+ "setup.cfg",
7
+ "tox.ini",
8
+ "LICENSE.txt",
9
+ "setup.py",
10
+ "pyproject.toml",
11
+ "CHANGELOG.md",
12
+ "CONTRIBUTING.md",
13
+ "AUTHORS.md",
14
+ ".readthedocs.yml",
15
+ ".gitignore",
16
+ "docs/readme.md",
17
+ "docs/Makefile",
18
+ "docs/authors.md",
19
+ "docs/requirements.txt",
20
+ "docs/tutorial.md",
21
+ "docs/contributing.md",
22
+ "docs/license.md",
23
+ "docs/changelog.md",
24
+ "docs/conf.py",
25
+ "docs/index.md",
26
+ "docs/_static/.gitignore",
27
+ "src/singlecellexperiment/__init__.py",
28
+ "src/singlecellexperiment/SingleCellExperiment.py",
29
+ "src/singlecellexperiment/_combineutils.py",
30
+ "src/singlecellexperiment/_ioutils.py",
31
+ "src/singlecellexperiment/io/tenx.py",
32
+ "src/singlecellexperiment/io/__init__.py",
33
+ "src/singlecellexperiment/io/h5ad.py",
34
+ "tests/test_sce_methods.py",
35
+ "tests/test_sce.py",
36
+ "tests/conftest.py",
37
+ "tests/test_sce_slice.py",
38
+ "tests/test_sce_io.py",
39
+ "tests/test_sce_combine_rows.py",
40
+ "tests/test_sce_combine_cols.py",
41
+ "tests/data/mocks.py",
42
+ "tests/data/adata.h5ad",
43
+ "tests/data/tenx.sub.h5",
44
+ "tests/data/raw_feature_bc_matrix/matrix.mtx",
45
+ "tests/data/raw_feature_bc_matrix/features.tsv",
46
+ "tests/data/raw_feature_bc_matrix/barcodes.tsv",
47
+ ".github/workflows/run-tests.yml",
48
+ ".github/workflows/publish-pypi.yml"
49
+ ]
50
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.6.3",
3
+ "distance": 0,
4
+ "node": "ge5f7e11fcea4daa04c4699ed04d87fdb8e9ed3ec",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-06-24"
8
+ }
@@ -1195,14 +1195,18 @@ class SingleCellExperiment(RangedSummarizedExperiment):
1195
1195
  def from_anndata(cls, input: "anndata.AnnData") -> SingleCellExperiment:
1196
1196
  """Create a ``SingleCellExperiment`` from :py:class:`~anndata.AnnData`.
1197
1197
 
1198
- Args:
1198
+ If the input contains any data in the ``uns`` attribute, the
1199
+ `metadata` slot of the ``SingleCellExperiment`` will contain a key ``uns``.
1200
+
1201
+ If the input contains ``raw`` data, the ``SingleCellExperiment``
1202
+ will contain an alternative experiment called ``raw``.
1203
+
1204
+ Args:
1199
1205
  input:
1200
1206
  Input data.
1201
1207
 
1202
1208
  Returns:
1203
- A ``SingleCellExperiment`` object. If the input contains any data
1204
- in the ``uns`` attribute, the `metadata` slot of the ``SingleCellExperiment``
1205
- will contain a key ``uns``.
1209
+ A ``SingleCellExperiment`` object.
1206
1210
  """
1207
1211
 
1208
1212
  layers = OrderedDict()
@@ -1217,6 +1221,15 @@ class SingleCellExperiment(RangedSummarizedExperiment):
1217
1221
  obsp = _to_normal_dict(input.obsp)
1218
1222
  _metadata = {"uns": input.uns} if input.uns is not None else None
1219
1223
 
1224
+ alt_expts = None
1225
+ if input.raw is not None:
1226
+ raw_se = SummarizedExperiment(
1227
+ assays={"X": input.raw.X.transpose()},
1228
+ row_data=biocframe.BiocFrame.from_pandas(input.raw.var),
1229
+ column_data=biocframe.BiocFrame.from_pandas(input.obs),
1230
+ )
1231
+ alt_expts = {"raw": raw_se}
1232
+
1220
1233
  return cls(
1221
1234
  assays=layers,
1222
1235
  row_data=biocframe.BiocFrame.from_pandas(input.var),
@@ -1225,6 +1238,7 @@ class SingleCellExperiment(RangedSummarizedExperiment):
1225
1238
  reduced_dimensions=obsm,
1226
1239
  row_pairs=varp,
1227
1240
  column_pairs=obsp,
1241
+ alternative_experiments=alt_expts,
1228
1242
  )
1229
1243
 
1230
1244
  ###############################
@@ -198,6 +198,16 @@ def test_SCE_randomAnnData():
198
198
  assert tse is not None
199
199
  assert isinstance(tse, SingleCellExperiment)
200
200
 
201
+ # set raw
202
+ adata.raw = adata.copy()
203
+ tse = singlecellexperiment.SingleCellExperiment.from_anndata(adata)
204
+
205
+ assert tse is not None
206
+ assert isinstance(tse, SingleCellExperiment)
207
+ assert tse.alternative_experiments is not None
208
+ assert "raw" in tse.alternative_experiments
209
+ assert isinstance(tse.alternative_experiments["raw"], SummarizedExperiment)
210
+ assert tse.alternative_experiments["raw"].shape == (d, n)
201
211
 
202
212
  def test_SCE_to_mudata():
203
213
  tse = SingleCellExperiment(