SingleCellExperiment 0.4.5__tar.gz → 0.4.6__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.
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/PKG-INFO +1 -1
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/PKG-INFO +1 -1
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/tenx.py +9 -1
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce_io.py +8 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.coveragerc +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.github/workflows/pypi-publish.yml +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.github/workflows/pypi-test.yml +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.gitignore +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.pre-commit-config.yaml +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.readthedocs.yml +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/AUTHORS.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/CHANGELOG.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/CONTRIBUTING.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/LICENSE.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/README.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/Makefile +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/_static/.gitignore +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/authors.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/changelog.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/conf.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/contributing.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/index.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/license.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/readme.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/requirements.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/docs/tutorial.md +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/pyproject.toml +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/setup.cfg +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/setup.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/SOURCES.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/dependency_links.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/not-zip-safe +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/requires.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/SingleCellExperiment.egg-info/top_level.txt +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/SingleCellExperiment.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/__init__.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/_combineutils.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/_ioutils.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/__init__.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/h5ad.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/conftest.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/data/adata.h5ad +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/data/mocks.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/data/tenx.sub.h5 +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce_combine_cols.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce_combine_rows.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce_methods.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tests/test_sce_slice.py +0 -0
- {singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/tox.ini +0 -0
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/tenx.py
RENAMED
|
@@ -44,7 +44,7 @@ def read_tenx_mtx(path: str) -> SingleCellExperiment:
|
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
def read_tenx_h5(path: str) -> SingleCellExperiment:
|
|
47
|
+
def read_tenx_h5(path: str, realize_assays: bool = False) -> SingleCellExperiment:
|
|
48
48
|
"""Read 10X H5 file as :py:class:`~singlecellexperiment.SingleCellExperiment.SingleCellExperiment`.
|
|
49
49
|
|
|
50
50
|
Note: Currently only supports version 3 of the 10X H5 format.
|
|
@@ -53,10 +53,15 @@ def read_tenx_h5(path: str) -> SingleCellExperiment:
|
|
|
53
53
|
path:
|
|
54
54
|
Path to 10x H5 file.
|
|
55
55
|
|
|
56
|
+
realize_assays:
|
|
57
|
+
Whether to realize assays into memory.
|
|
58
|
+
Defaults to False.
|
|
59
|
+
|
|
56
60
|
Returns:
|
|
57
61
|
A single-cell experiment object.
|
|
58
62
|
"""
|
|
59
63
|
|
|
64
|
+
import delayedarray as da
|
|
60
65
|
import h5py
|
|
61
66
|
from hdf5array import Hdf5CompressedSparseMatrix
|
|
62
67
|
|
|
@@ -74,6 +79,9 @@ def read_tenx_h5(path: str) -> SingleCellExperiment:
|
|
|
74
79
|
path=path, group_name="matrix", by_column=True, shape=shape
|
|
75
80
|
)
|
|
76
81
|
|
|
82
|
+
if realize_assays is True:
|
|
83
|
+
counts = da.to_scipy_sparse_matrix(counts, "csr")
|
|
84
|
+
|
|
77
85
|
# read features
|
|
78
86
|
features = None
|
|
79
87
|
ignore_list = []
|
|
@@ -6,9 +6,11 @@ from biocframe import BiocFrame
|
|
|
6
6
|
import numpy as np
|
|
7
7
|
import pandas as pd
|
|
8
8
|
from mudata import MuData
|
|
9
|
+
from scipy import sparse
|
|
9
10
|
|
|
10
11
|
import singlecellexperiment
|
|
11
12
|
from singlecellexperiment.SingleCellExperiment import SingleCellExperiment
|
|
13
|
+
from hdf5array import Hdf5CompressedSparseMatrix
|
|
12
14
|
|
|
13
15
|
__author__ = "jkanche"
|
|
14
16
|
__copyright__ = "jkanche"
|
|
@@ -95,6 +97,7 @@ def test_SCE_from10xH5():
|
|
|
95
97
|
assert isinstance(tse, SingleCellExperiment)
|
|
96
98
|
|
|
97
99
|
assert tse.assays is not None
|
|
100
|
+
assert isinstance(tse.assay(0), Hdf5CompressedSparseMatrix)
|
|
98
101
|
assert tse.row_data is not None
|
|
99
102
|
assert tse.col_data is not None
|
|
100
103
|
|
|
@@ -110,6 +113,11 @@ def test_SCE_from10xH5():
|
|
|
110
113
|
|
|
111
114
|
assert sliced.shape == (10, 4)
|
|
112
115
|
|
|
116
|
+
tse = singlecellexperiment.read_tenx_h5(
|
|
117
|
+
"tests/data/tenx.sub.h5", realize_assays=True
|
|
118
|
+
)
|
|
119
|
+
assert isinstance(tse.assay(0), sparse.spmatrix)
|
|
120
|
+
|
|
113
121
|
|
|
114
122
|
def test_SCE_randomAnnData():
|
|
115
123
|
np.random.seed(1)
|
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/.github/workflows/pypi-publish.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/__init__.py
RENAMED
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/_combineutils.py
RENAMED
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/_ioutils.py
RENAMED
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/__init__.py
RENAMED
|
File without changes
|
{singlecellexperiment-0.4.5 → singlecellexperiment-0.4.6}/src/singlecellexperiment/io/h5ad.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|