SingleCellExperiment 0.6.2__tar.gz → 0.6.4__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 (57) hide show
  1. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.pre-commit-config.yaml +1 -1
  2. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/CHANGELOG.md +5 -1
  3. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/PKG-INFO +3 -2
  4. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/changelog.md +5 -1
  5. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/tutorial.md +29 -0
  6. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/pyproject.toml +1 -1
  7. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/setup.cfg +2 -1
  8. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/PKG-INFO +3 -2
  9. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/SOURCES.txt +2 -0
  10. singlecellexperiment-0.6.4/src/SingleCellExperiment.egg-info/scm_file_list.json +50 -0
  11. singlecellexperiment-0.6.4/src/SingleCellExperiment.egg-info/scm_version.json +8 -0
  12. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/SingleCellExperiment.py +487 -19
  13. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/_combineutils.py +10 -1
  14. singlecellexperiment-0.6.4/src/singlecellexperiment/_ioutils.py +16 -0
  15. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/mocks.py +0 -2
  16. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/test_sce.py +81 -38
  17. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/test_sce_combine_cols.py +19 -20
  18. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/test_sce_combine_rows.py +2 -11
  19. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/test_sce_io.py +91 -18
  20. singlecellexperiment-0.6.4/tests/test_sce_methods.py +422 -0
  21. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/test_sce_slice.py +30 -1
  22. singlecellexperiment-0.6.2/src/singlecellexperiment/_ioutils.py +0 -17
  23. singlecellexperiment-0.6.2/tests/test_sce_methods.py +0 -134
  24. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.coveragerc +0 -0
  25. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.github/workflows/publish-pypi.yml +0 -0
  26. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.github/workflows/run-tests.yml +0 -0
  27. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.gitignore +0 -0
  28. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/.readthedocs.yml +0 -0
  29. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/AUTHORS.md +0 -0
  30. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/CONTRIBUTING.md +0 -0
  31. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/LICENSE.txt +0 -0
  32. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/README.md +0 -0
  33. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/Makefile +0 -0
  34. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/_static/.gitignore +0 -0
  35. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/authors.md +0 -0
  36. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/conf.py +0 -0
  37. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/contributing.md +0 -0
  38. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/index.md +0 -0
  39. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/license.md +0 -0
  40. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/readme.md +0 -0
  41. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/docs/requirements.txt +0 -0
  42. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/setup.py +0 -0
  43. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/dependency_links.txt +0 -0
  44. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/not-zip-safe +0 -0
  45. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/requires.txt +0 -0
  46. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/top_level.txt +0 -0
  47. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/__init__.py +0 -0
  48. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/__init__.py +0 -0
  49. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/h5ad.py +0 -0
  50. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/tenx.py +0 -0
  51. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/conftest.py +0 -0
  52. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/adata.h5ad +0 -0
  53. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/barcodes.tsv +0 -0
  54. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/features.tsv +0 -0
  55. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/matrix.mtx +0 -0
  56. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/tests/data/tenx.sub.h5 +0 -0
  57. {singlecellexperiment-0.6.2 → singlecellexperiment-0.6.4}/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,15 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.2
3
+ ## Version 0.6.0 - 0.6.4
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.
10
+ - Fix bug when slicing objects containing row or column pairs.
11
+ - Add getters/setters for `sizeFactors`, modifying this in the column_data of the object.
12
+ - Improve test coverage and fix bugs.
9
13
 
10
14
  ## Version 0.5.8 - 0.5.9
11
15
 
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SingleCellExperiment
3
- Version: 0.6.2
3
+ Version: 0.6.4
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,15 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.2
3
+ ## Version 0.6.0 - 0.6.4
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.
10
+ - Fix bug when slicing objects containing row or column pairs.
11
+ - Add getters/setters for `sizeFactors`, modifying this in the column_data of the object.
12
+ - Improve test coverage and fix bugs.
9
13
 
10
14
  ## Version 0.5.8 - 0.5.9
11
15
 
@@ -179,6 +179,35 @@ One can access an reduced dimension by index or name:
179
179
  sce.reduced_dim(0) # same as se.reduced_dim("random_embeds")
180
180
  ```
181
181
 
182
+ ## Size Factors
183
+
184
+ In Bioconductor, size factors represent scaling factors used to normalize cell-specific biases (such as differences in sequencing depth). Following the Bioconductor design, `SingleCellExperiment` stores size factors directly inside the column data under the column name `"sizeFactors"`.
185
+
186
+ You can set, retrieve, and delete size factors using either functional methods or the `size_factors` property:
187
+
188
+ ```{code-cell}
189
+ # Generate mock size factors (e.g. library size scaling factors)
190
+ cell_depths = counts.sum(axis=0)
191
+ if isinstance(cell_depths, np.matrix) or hasattr(cell_depths, "A"):
192
+ cell_depths = np.array(cell_depths).flatten()
193
+
194
+ # Scale factors so that their mean is 1
195
+ size_factors = cell_depths / np.mean(cell_depths)
196
+
197
+ # Set size factors on the experiment
198
+ sce.set_size_factors(size_factors, in_place=True)
199
+
200
+ # Access size factors
201
+ print("Retrieved size factors:", sce.get_size_factors())
202
+
203
+ # They reside directly in the column_data under "sizeFactors":
204
+ print("Column data 'sizeFactors':", sce.column_data["sizeFactors"])
205
+
206
+ # To delete/remove size factors, set them to None
207
+ sce.set_size_factors(None, in_place=True)
208
+ print("After deletion, is 'sizeFactors' in column_data?", "sizeFactors" in sce.column_data.column_names)
209
+ ```
210
+
182
211
  ## Subset experiments
183
212
 
184
213
  You can subset experimental data by using the subset (`[]`) operator. This operation accepts different slice input types, such as a boolean vector, a `slice` object, a list of indices, or names (if available) to subset.
@@ -10,7 +10,7 @@ version_scheme = "no-guess-dev"
10
10
  [tool.ruff]
11
11
  line-length = 120
12
12
  src = ["src"]
13
- exclude = ["tests"]
13
+ # exclude = ["tests"]
14
14
  extend-ignore = ["F821"]
15
15
 
16
16
  [tool.ruff.pydocstyle]
@@ -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.4
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.4",
3
+ "distance": 0,
4
+ "node": "g2b7684b0b92219261086934158bbd5c35c2d1e3b",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-06-28"
8
+ }