Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ biom-2.1.18-dev
Bug fixes:

* A regression with parse of UTF-8 characters was introduced, reported [here](https://forum.qiime2.org/t/feature-table-gives-ascii-codec-cant-decode-byte-0xc3-in-position-4-error/33858/7)
* `np.in1d` was removed in NumPy 2.4, replaced with `np.isin`. See issue [#1003](https://github.com/biocore/biom-format/issues/1003)
* `Table.to_anndata` failed with anndata >= 0.13, which removed the `dtype` argument to `AnnData`. The matrix is now cast prior to construction. See PR [#1005](https://github.com/biocore/biom-format/pull/1005)

General Maintenance:

* Python 3.14 added to CI and wheels are now built for Python 3.14. See PR [#1004](https://github.com/biocore/biom-format/pull/1004)

biom-2.1.17
-----------
Expand Down
5 changes: 4 additions & 1 deletion biom/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -4397,10 +4397,13 @@ def to_anndata(self, dense=False, dtype="float32", transpose=True):
if dense:
mat = mat.toarray()

# anndata 0.13 removed the AnnData(dtype=...) argument
mat = mat.astype(dtype)

var = self.metadata_to_dataframe("sample")
obs = self.metadata_to_dataframe("observation")

adata = anndata.AnnData(mat, obs=obs, var=var, dtype=dtype)
adata = anndata.AnnData(mat, obs=obs, var=var)
# Convention for scRNA-seq analysis in Python
adata = adata.transpose()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test-requires = ["pytest", "numpy"]
skip = ["*-win32", "*-manylinux_i686", "pp*", "*-musllinux*"]

# Python versions to build
build = "cp39-* cp310-* cp311-* cp312-* cp313-*"
build = "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"

[tool.pytest.ini_options]
addopts = ["--ignore=biom/assets/exercise_api.py "]
Expand Down
Loading