mudata 0.2.3__tar.gz → 0.2.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.
- {mudata-0.2.3 → mudata-0.2.4}/PKG-INFO +26 -9
- {mudata-0.2.3 → mudata-0.2.4}/README.md +19 -3
- {mudata-0.2.3 → mudata-0.2.4}/mudata/__init__.py +1 -1
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/io.py +2 -16
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/mudata.py +4 -6
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/repr.py +5 -3
- {mudata-0.2.3 → mudata-0.2.4}/pyproject.toml +7 -6
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/__init__.py +0 -0
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/config.py +0 -0
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/file_backing.py +0 -0
- {mudata-0.2.3 → mudata-0.2.4}/mudata/_core/utils.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mudata
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Multimodal omics analysis framework
|
|
5
5
|
Home-page: https://github.com/scverse/mudata
|
|
6
6
|
Author: Danila Bredikhin
|
|
7
7
|
Author-email: danila.bredikhin@embl.de
|
|
8
|
-
Requires-Python: >= 3.
|
|
8
|
+
Requires-Python: >= 3.9
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -16,13 +16,14 @@ Classifier: Intended Audience :: Science/Research
|
|
|
16
16
|
Requires-Dist: numpy
|
|
17
17
|
Requires-Dist: pandas
|
|
18
18
|
Requires-Dist: h5py
|
|
19
|
-
Requires-Dist: anndata >= 0.8
|
|
20
|
-
Requires-Dist: sphinx
|
|
21
|
-
Requires-Dist: sphinx-book-theme
|
|
22
|
-
Requires-Dist: pydata-sphinx-theme
|
|
19
|
+
Requires-Dist: anndata >= 0.10.8
|
|
20
|
+
Requires-Dist: sphinx ; extra == "docs"
|
|
21
|
+
Requires-Dist: sphinx-book-theme ; extra == "docs"
|
|
22
|
+
Requires-Dist: pydata-sphinx-theme ; extra == "docs"
|
|
23
23
|
Requires-Dist: readthedocs-sphinx-search ; extra == "docs"
|
|
24
24
|
Requires-Dist: nbsphinx ; extra == "docs"
|
|
25
25
|
Requires-Dist: sphinx_automodapi ; extra == "docs"
|
|
26
|
+
Requires-Dist: recommonmark ; extra == "docs"
|
|
26
27
|
Requires-Dist: zarr ; extra == "test"
|
|
27
28
|
Project-URL: Documentation, https://muon.readthedocs.io/en/latest/
|
|
28
29
|
Provides-Extra: docs
|
|
@@ -32,10 +33,13 @@ Provides-Extra: test
|
|
|
32
33
|
|
|
33
34
|
[](http://mudata.readthedocs.io/)
|
|
34
35
|
[](https://pypi.org/project/mudata)
|
|
36
|
+
[](https://numfocus.org)
|
|
35
37
|
|
|
36
38
|
# MuData – multimodal data
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
[Documentation](https://mudata.readthedocs.io/) | [Publication](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-021-02577-8)
|
|
41
|
+
|
|
42
|
+
For using `MuData` in multimodal omics applications see [`muon`](https://github.com/scverse/muon).
|
|
39
43
|
|
|
40
44
|
## Data structure
|
|
41
45
|
|
|
@@ -110,7 +114,7 @@ md.write("pbmc_10k.h5mu/rna", adata)
|
|
|
110
114
|
|
|
111
115
|
## Citation
|
|
112
116
|
|
|
113
|
-
If you use `mudata` in your work, please cite the
|
|
117
|
+
If you use `mudata` in your work, please cite the publication as follows:
|
|
114
118
|
|
|
115
119
|
> **MUON: multimodal omics analysis framework**
|
|
116
120
|
>
|
|
@@ -124,5 +128,18 @@ You can cite the scverse publication as follows:
|
|
|
124
128
|
>
|
|
125
129
|
> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis
|
|
126
130
|
>
|
|
127
|
-
> _Nat Biotechnol._
|
|
131
|
+
> _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).
|
|
132
|
+
|
|
133
|
+
[//]: # "numfocus-fiscal-sponsor-attribution"
|
|
134
|
+
|
|
135
|
+
MuData is part of the scverse project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
|
136
|
+
Please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
|
|
137
|
+
|
|
138
|
+
<a href="https://numfocus.org/project/scverse">
|
|
139
|
+
<img
|
|
140
|
+
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
|
|
141
|
+
width="200"
|
|
142
|
+
>
|
|
143
|
+
</a>
|
|
144
|
+
|
|
128
145
|
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[](http://mudata.readthedocs.io/)
|
|
4
4
|
[](https://pypi.org/project/mudata)
|
|
5
|
+
[](https://numfocus.org)
|
|
5
6
|
|
|
6
7
|
# MuData – multimodal data
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
[Documentation](https://mudata.readthedocs.io/) | [Publication](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-021-02577-8)
|
|
10
|
+
|
|
11
|
+
For using `MuData` in multimodal omics applications see [`muon`](https://github.com/scverse/muon).
|
|
9
12
|
|
|
10
13
|
## Data structure
|
|
11
14
|
|
|
@@ -80,7 +83,7 @@ md.write("pbmc_10k.h5mu/rna", adata)
|
|
|
80
83
|
|
|
81
84
|
## Citation
|
|
82
85
|
|
|
83
|
-
If you use `mudata` in your work, please cite the
|
|
86
|
+
If you use `mudata` in your work, please cite the publication as follows:
|
|
84
87
|
|
|
85
88
|
> **MUON: multimodal omics analysis framework**
|
|
86
89
|
>
|
|
@@ -94,4 +97,17 @@ You can cite the scverse publication as follows:
|
|
|
94
97
|
>
|
|
95
98
|
> Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle & Fabian J. Theis
|
|
96
99
|
>
|
|
97
|
-
> _Nat Biotechnol._
|
|
100
|
+
> _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).
|
|
101
|
+
|
|
102
|
+
[//]: # "numfocus-fiscal-sponsor-attribution"
|
|
103
|
+
|
|
104
|
+
MuData is part of the scverse project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
|
105
|
+
Please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
|
|
106
|
+
|
|
107
|
+
<a href="https://numfocus.org/project/scverse">
|
|
108
|
+
<img
|
|
109
|
+
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
|
|
110
|
+
width="200"
|
|
111
|
+
>
|
|
112
|
+
</a>
|
|
113
|
+
|
|
@@ -306,7 +306,7 @@ def write(filename: PathLike, data: Union[MuData, AnnData]):
|
|
|
306
306
|
else:
|
|
307
307
|
assert isinstance(data, AnnData), "Only MuData and AnnData objects are accepted"
|
|
308
308
|
|
|
309
|
-
m = re.search("^(.+)
|
|
309
|
+
m = re.search("^(.+)\\.(h5mu)[/]?([^/]*)[/]?(.*)$", str(filename))
|
|
310
310
|
if m is not None:
|
|
311
311
|
m = m.groups()
|
|
312
312
|
else:
|
|
@@ -458,13 +458,6 @@ def _read_zarr_mod(g: zarr.Group, manager: MuDataFileManager = None, backed: boo
|
|
|
458
458
|
d[k] = read_dataframe(g[k])
|
|
459
459
|
elif k == "X":
|
|
460
460
|
X = g["X"]
|
|
461
|
-
if isinstance(X, zarr.Group):
|
|
462
|
-
dtype = X["data"].dtype
|
|
463
|
-
elif hasattr(X, "dtype"):
|
|
464
|
-
dtype = X.dtype
|
|
465
|
-
else:
|
|
466
|
-
raise ValueError()
|
|
467
|
-
d["dtype"] = dtype
|
|
468
461
|
if not backed:
|
|
469
462
|
d["X"] = read_elem(X)
|
|
470
463
|
elif k != "raw":
|
|
@@ -499,13 +492,6 @@ def _read_h5mu_mod(
|
|
|
499
492
|
d[k] = read_dataframe(g[k])
|
|
500
493
|
elif k == "X":
|
|
501
494
|
X = g["X"]
|
|
502
|
-
if isinstance(X, h5py.Group):
|
|
503
|
-
dtype = X["data"].dtype
|
|
504
|
-
elif hasattr(X, "dtype"):
|
|
505
|
-
dtype = X.dtype
|
|
506
|
-
else:
|
|
507
|
-
raise ValueError()
|
|
508
|
-
d["dtype"] = dtype
|
|
509
495
|
if not backed:
|
|
510
496
|
d["X"] = read_elem(X)
|
|
511
497
|
elif k != "raw":
|
|
@@ -582,7 +568,7 @@ def read(filename: PathLike, **kwargs) -> Union[MuData, AnnData]:
|
|
|
582
568
|
"""
|
|
583
569
|
import re
|
|
584
570
|
|
|
585
|
-
m = re.search("^(.+)
|
|
571
|
+
m = re.search("^(.+)\\.(h5mu)[/]?([^/]*)[/]?(.*)$", str(filename))
|
|
586
572
|
if m is not None:
|
|
587
573
|
m = m.groups()
|
|
588
574
|
else:
|
|
@@ -276,9 +276,7 @@ class MuData:
|
|
|
276
276
|
k: (
|
|
277
277
|
v
|
|
278
278
|
if isinstance(v, AnnData) or isinstance(v, MuData)
|
|
279
|
-
else MuData(**v)
|
|
280
|
-
if "mod" in v
|
|
281
|
-
else AnnData(**v)
|
|
279
|
+
else MuData(**v) if "mod" in v else AnnData(**v)
|
|
282
280
|
)
|
|
283
281
|
for k, v in mod.items()
|
|
284
282
|
},
|
|
@@ -315,7 +313,7 @@ class MuData:
|
|
|
315
313
|
for j, mod_j in enumerate(self.mod):
|
|
316
314
|
if j != i:
|
|
317
315
|
if any(
|
|
318
|
-
np.
|
|
316
|
+
np.isin(
|
|
319
317
|
mod_i_dup_attrs, getattr(self.mod[mod_j], attr + "_names").values
|
|
320
318
|
)
|
|
321
319
|
):
|
|
@@ -609,7 +607,7 @@ class MuData:
|
|
|
609
607
|
# we could use a pandas.array, which has missing values support, but then we get an Exception upon hdf5 write
|
|
610
608
|
# also, this is compatible to Muon.jl
|
|
611
609
|
col = data_mod[colname] + 1
|
|
612
|
-
col.replace(np.
|
|
610
|
+
col.replace(np.nan, 0, inplace=True)
|
|
613
611
|
data_mod[colname] = col.astype(np.uint32)
|
|
614
612
|
|
|
615
613
|
if len(data_global.columns) > 0:
|
|
@@ -705,7 +703,7 @@ class MuData:
|
|
|
705
703
|
# we could use a pandas.array, which has missing values support, but then we get an Exception upon hdf5 write
|
|
706
704
|
# also, this is compatible to Muon.jl
|
|
707
705
|
col = data_mod.loc[:, colname] + 1
|
|
708
|
-
col.replace(np.
|
|
706
|
+
col.replace(np.nan, 0, inplace=True)
|
|
709
707
|
col = col.astype(np.uint32)
|
|
710
708
|
data_mod.loc[:, colname] = col
|
|
711
709
|
data_mod.set_index(colname, append=True, inplace=True)
|
|
@@ -147,9 +147,11 @@ def details_block_table(data, attr, name, expand=0, dims=True, square=False):
|
|
|
147
147
|
attr_key,
|
|
148
148
|
obj[attr_key].dtype if hasattr(obj[attr_key], "dtype") else "",
|
|
149
149
|
*maybe_module_class(obj[attr_key]),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
(
|
|
151
|
+
f"{obj[attr_key].shape[1]} columns"
|
|
152
|
+
if len(obj[attr_key].shape) > 1 and dims
|
|
153
|
+
else ""
|
|
154
|
+
),
|
|
153
155
|
)
|
|
154
156
|
for attr_key in obj.keys()
|
|
155
157
|
]
|
|
@@ -16,22 +16,23 @@ classifiers = [
|
|
|
16
16
|
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
17
17
|
"Intended Audience :: Science/Research"
|
|
18
18
|
]
|
|
19
|
-
requires-python = ">= 3.
|
|
19
|
+
requires-python = ">= 3.9"
|
|
20
20
|
requires = [
|
|
21
21
|
"numpy",
|
|
22
22
|
"pandas",
|
|
23
23
|
"h5py",
|
|
24
|
-
"anndata >= 0.8",
|
|
24
|
+
"anndata >= 0.10.8",
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
[tool.flit.metadata.requires-extra]
|
|
28
28
|
docs = [
|
|
29
|
-
"sphinx
|
|
30
|
-
"sphinx-book-theme
|
|
31
|
-
"pydata-sphinx-theme
|
|
29
|
+
"sphinx",
|
|
30
|
+
"sphinx-book-theme",
|
|
31
|
+
"pydata-sphinx-theme",
|
|
32
32
|
"readthedocs-sphinx-search",
|
|
33
33
|
"nbsphinx",
|
|
34
|
-
"sphinx_automodapi"
|
|
34
|
+
"sphinx_automodapi",
|
|
35
|
+
"recommonmark"
|
|
35
36
|
]
|
|
36
37
|
test = [
|
|
37
38
|
"zarr"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|