SingleCellExperiment 0.6.3__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 (58) hide show
  1. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/CHANGELOG.md +4 -1
  2. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/PKG-INFO +1 -1
  3. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/changelog.md +4 -1
  4. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/tutorial.md +29 -0
  5. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/pyproject.toml +1 -1
  6. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/PKG-INFO +1 -1
  7. singlecellexperiment-0.6.4/src/SingleCellExperiment.egg-info/scm_version.json +8 -0
  8. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/SingleCellExperiment.py +469 -15
  9. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/_combineutils.py +10 -1
  10. singlecellexperiment-0.6.4/src/singlecellexperiment/_ioutils.py +16 -0
  11. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/mocks.py +0 -2
  12. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/test_sce.py +81 -38
  13. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/test_sce_combine_cols.py +19 -20
  14. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/test_sce_combine_rows.py +2 -11
  15. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/test_sce_io.py +81 -18
  16. singlecellexperiment-0.6.4/tests/test_sce_methods.py +422 -0
  17. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/test_sce_slice.py +30 -1
  18. singlecellexperiment-0.6.3/src/SingleCellExperiment.egg-info/scm_version.json +0 -8
  19. singlecellexperiment-0.6.3/src/singlecellexperiment/_ioutils.py +0 -17
  20. singlecellexperiment-0.6.3/tests/test_sce_methods.py +0 -134
  21. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.coveragerc +0 -0
  22. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.github/workflows/publish-pypi.yml +0 -0
  23. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.github/workflows/run-tests.yml +0 -0
  24. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.gitignore +0 -0
  25. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.pre-commit-config.yaml +0 -0
  26. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/.readthedocs.yml +0 -0
  27. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/AUTHORS.md +0 -0
  28. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/CONTRIBUTING.md +0 -0
  29. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/LICENSE.txt +0 -0
  30. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/README.md +0 -0
  31. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/Makefile +0 -0
  32. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/_static/.gitignore +0 -0
  33. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/authors.md +0 -0
  34. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/conf.py +0 -0
  35. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/contributing.md +0 -0
  36. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/index.md +0 -0
  37. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/license.md +0 -0
  38. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/readme.md +0 -0
  39. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/docs/requirements.txt +0 -0
  40. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/setup.cfg +0 -0
  41. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/setup.py +0 -0
  42. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/SOURCES.txt +0 -0
  43. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/dependency_links.txt +0 -0
  44. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/not-zip-safe +0 -0
  45. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/requires.txt +0 -0
  46. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/scm_file_list.json +0 -0
  47. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/SingleCellExperiment.egg-info/top_level.txt +0 -0
  48. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/__init__.py +0 -0
  49. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/__init__.py +0 -0
  50. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/h5ad.py +0 -0
  51. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/src/singlecellexperiment/io/tenx.py +0 -0
  52. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/conftest.py +0 -0
  53. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/adata.h5ad +0 -0
  54. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/barcodes.tsv +0 -0
  55. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/features.tsv +0 -0
  56. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/raw_feature_bc_matrix/matrix.mtx +0 -0
  57. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tests/data/tenx.sub.h5 +0 -0
  58. {singlecellexperiment-0.6.3 → singlecellexperiment-0.6.4}/tox.ini +0 -0
@@ -1,12 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.3
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
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.
10
13
 
11
14
  ## Version 0.5.8 - 0.5.9
12
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SingleCellExperiment
3
- Version: 0.6.3
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
@@ -1,12 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6.0 - 0.6.3
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
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.
10
13
 
11
14
  ## Version 0.5.8 - 0.5.9
12
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]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SingleCellExperiment
3
- Version: 0.6.3
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
@@ -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
+ }