mudata 0.3.7__tar.gz → 0.3.8__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.3.7 → mudata-0.3.8}/CHANGELOG.md +20 -0
- {mudata-0.3.7 → mudata-0.3.8}/PKG-INFO +1 -1
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/mudata.py +1 -1
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/utils.py +1 -1
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_version.py +2 -2
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_pandas_utils.py +10 -1
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_update.py +17 -0
- {mudata-0.3.7 → mudata-0.3.8}/.codecov.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.cruft.json +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.editorconfig +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/workflows/build.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/workflows/release.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.github/workflows/test.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.gitignore +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.pre-commit-config.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/.readthedocs.yaml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/CITATION.cff +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/DESIGN.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/LICENSE +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/README.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/biome.jsonc +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/Makefile +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_static/img/mudata.png +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_static/img/mudata.svg +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_static/img/muon_header.png +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_static/img/muon_logo.png +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_static/img/muon_logo_coloured.png +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_templates/.gitkeep +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/_templates/autosummary/class.rst +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/api.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/changelog.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/conf.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/contributing.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/extensions/member_type.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/extensions/typed_returns.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/index.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/install.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/io/input.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/io/mudata.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/io/output.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/io/spec.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/notebooks/annotations_management.ipynb +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/notebooks/axes.ipynb +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/notebooks/nuances.ipynb +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/notebooks/quickstart_mudata.ipynb +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/references.bib +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/docs/references.md +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/pyproject.toml +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/__init__.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/__init__.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/compat.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/config.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/file_backing.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/io.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/merge.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/repr.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/to_.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/src/mudata/_core/views.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/conftest.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_axis_-1.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_from_to.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_io.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_merge.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_nested.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_obs_var.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_pull_push.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_repr.py +0 -0
- {mudata-0.3.7 → mudata-0.3.8}/tests/test_view_copy.py +0 -0
|
@@ -8,6 +8,24 @@ and this project adheres to [Semantic Versioning][].
|
|
|
8
8
|
[keep a changelog]: https://keepachangelog.com/en/1.1.0/
|
|
9
9
|
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
|
10
10
|
|
|
11
|
+
## [0.4.0] (unreleased)
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- `update()` no longer automatically pulls obs/var columns from individual modalities by default. Set `mudata.set_options(pull_on_update=true)`
|
|
16
|
+
to restore the old behavior. Use `pull_obs/pull_var` and `push_obs/push_var` for more flexibility.
|
|
17
|
+
- The settings API has changed. Use e.g. `mudata.settings.pull_on_update = True` instead of `mudata.set_options(pull_on_update=True)` and use
|
|
18
|
+
`mudata.settings.override` as context manager for local settings overrides.
|
|
19
|
+
|
|
20
|
+
## [0.3.8]
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `obs_vector` and `var_vector` once again return Pandas Series objects when appropriate. This fixes
|
|
25
|
+
applying `sc.pl.umap` on a MuData object.
|
|
26
|
+
- `update` with `pull_on_update != None` works again when run on a MuData object where all modalities have empty `.obs` / `.var` but the global
|
|
27
|
+
`.obs` or `.var` is not empty.
|
|
28
|
+
|
|
11
29
|
## [0.3.7]
|
|
12
30
|
|
|
13
31
|
### Fixed
|
|
@@ -162,6 +180,8 @@ To copy the annotations explicitly, you will need to use `pull_obs()` and/or `pu
|
|
|
162
180
|
|
|
163
181
|
Initial `mudata` release with `MuData`, previously a part of the `muon` framework.
|
|
164
182
|
|
|
183
|
+
[0.4.0]: https://github.com/scverse/mudata/releases/tag/v0.4.0
|
|
184
|
+
[0.3.8]: https://github.com/scverse/mudata/releases/tag/v0.3.8
|
|
165
185
|
[0.3.7]: https://github.com/scverse/mudata/releases/tag/v0.3.7
|
|
166
186
|
[0.3.6]: https://github.com/scverse/mudata/releases/tag/v0.3.6
|
|
167
187
|
[0.3.5]: https://github.com/scverse/mudata/releases/tag/v0.3.5
|
|
@@ -1247,7 +1247,7 @@ class MuData:
|
|
|
1247
1247
|
f"There is no key {key} in MuData .{attr} but there is one in {m} .{attr}. Consider running `update_{attr}()` to update global .{attr}."
|
|
1248
1248
|
)
|
|
1249
1249
|
raise KeyError(f"There is no key {key} in MuData .{attr} or in .{attr} of any modalities.")
|
|
1250
|
-
return df[key].
|
|
1250
|
+
return df[key].values
|
|
1251
1251
|
|
|
1252
1252
|
@deprecated(Deprecation("0.3.4"))
|
|
1253
1253
|
def obs_vector(self, key: str, layer: str | None = None) -> np.ndarray:
|
|
@@ -144,4 +144,4 @@ def try_convert_dataframe_to_numpy_dtypes(df: pd.DataFrame | Mapping[str, pd.Ser
|
|
|
144
144
|
new_cols = {}
|
|
145
145
|
for colname, col in df.items():
|
|
146
146
|
new_cols[colname] = try_convert_series_to_numpy_dtype(col)
|
|
147
|
-
return pd.DataFrame(new_cols)
|
|
147
|
+
return pd.DataFrame(new_cols, index=df.index)
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
21
|
+
__version__ = version = '0.3.8'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 8)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -33,7 +33,8 @@ def test_try_convert_series_to_numpy_dtype(numpy_dtype, nullable_dtype):
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def test_try_convert_dataframe_to_numpy_dtypes():
|
|
36
|
-
|
|
36
|
+
idx = pd.Index(np.arange(10)[::-1].astype(str))
|
|
37
|
+
series = pd.Series(np.arange(10), index=idx)
|
|
37
38
|
df = pd.DataFrame({"numpy": series})
|
|
38
39
|
|
|
39
40
|
series = series.astype(pd.Int64Dtype())
|
|
@@ -45,3 +46,11 @@ def test_try_convert_dataframe_to_numpy_dtypes():
|
|
|
45
46
|
df = try_convert_dataframe_to_numpy_dtypes(df)
|
|
46
47
|
assert df["numpy"].dtype == df["nullable"].dtype == np.int64
|
|
47
48
|
assert df["nullable_noconvert"].dtype == pd.Int64Dtype()
|
|
49
|
+
assert (df.index == idx).all()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_try_convert_empty_dataframe_to_numpy_dtypes():
|
|
53
|
+
idx = pd.Index(np.arange(10)[::-1].astype(str))
|
|
54
|
+
df = pd.DataFrame(index=idx)
|
|
55
|
+
df = try_convert_dataframe_to_numpy_dtypes(df)
|
|
56
|
+
assert (df.index == idx).all()
|
|
@@ -176,6 +176,23 @@ class TestMuData:
|
|
|
176
176
|
getattr(mdata, f"{attr}_names")[: mdata["mod1"].shape[axis]] == getattr(mdata["mod1"], f"{attr}_names")
|
|
177
177
|
).all()
|
|
178
178
|
|
|
179
|
+
def test_update_simple_empty_modalities(self, modalities: Mapping[str, AnnData], axis: Axis):
|
|
180
|
+
for mod in modalities.values():
|
|
181
|
+
mod.obs = pd.DataFrame(index=mod.obs_names)
|
|
182
|
+
mod.var = pd.DataFrame(index=mod.var_names)
|
|
183
|
+
mdata = MuData(modalities)
|
|
184
|
+
|
|
185
|
+
old_obsnames = mdata.obs_names
|
|
186
|
+
old_varnames = mdata.var_names
|
|
187
|
+
|
|
188
|
+
mdata.obs["test"] = True
|
|
189
|
+
del mdata._obshash
|
|
190
|
+
del mdata._varhash
|
|
191
|
+
mdata.update() # https://github.com/scverse/mudata/issues/145
|
|
192
|
+
|
|
193
|
+
assert (old_obsnames == mdata.obs_names).all()
|
|
194
|
+
assert (old_varnames == mdata.var_names).all()
|
|
195
|
+
|
|
179
196
|
def test_update_add_modality(self, rng: np.random.Generator, modalities: Mapping[str, AnnData], axis: Axis):
|
|
180
197
|
modnames = list(modalities.keys())
|
|
181
198
|
mdata = add_mdata_global_columns(
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|