Cap-anndata

Latest version: v0.4.0

Safety actively analyzes 710644 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.0

Fixed
**Bug fixes related to AnnData update**:
- Assignment destination is read-only during rename column ([32](https://github.com/cellannotation/cap-anndata/pull/38)).
- Change index of the `CapAnnDataDF` when save anndata ([29](https://github.com/cellannotation/cap-anndata/pull/36)).
- Overwrite `CapAnnDataDF` before read obs (or var) leads to bug ([33](https://github.com/cellannotation/cap-anndata/pull/35)).

Changed
- **Refactoring**:
- Update `CSRDataset` and `CSCDataset` import from `AnnData` ([31](https://github.com/cellannotation/cap-anndata/pull/37)).
- Remove a few print statements ([34](https://github.com/cellannotation/cap-anndata/pull/37)).
- **Fields access during overwrite of AnnData**:
- Overwrite tries to read raw layer on every call ([28](https://github.com/cellannotation/cap-anndata/pull/37)).

0.3.1

Fixed
- **AnnData v0.11.0 compatibility** fix. New AnnData package version API is supported. ([30](https://github.com/cellannotation/cap-anndata/pull/30))

0.3.0

Added
- **Support more AnnData fields**, additional API for accessing, modifying and deleting fields: `layers`, `obsm`, `varm`, `obsp`, `varp` was added.([22](https://github.com/cellannotation/cap-anndata/pull/22), [#26](https://github.com/cellannotation/cap-anndata/pull/26))
- **String representation** for `CapAnnData` objects. ([24](https://github.com/cellannotation/cap-anndata/pull/24))
- **Deprecation warnings** for `read_directly` function. ([25](https://github.com/cellannotation/cap-anndata/pull/25)). It is recommended to use `read_h5ad` instead.

Changed
- **Dependencies updated** in `setup.py` and `requirements.txt` to relax version constraints. ([23](https://github.com/cellannotation/cap-anndata/pull/26))
- **Internal implementation** `CapAnnDataUns` was renamed to `CapAnnDataDict`.

Fixed
- **Empty raw layer** fix. The situation when raw h5py.Group exists in the .h5ad file but is empty is recognized as no raw layer exists. ([27](https://github.com/cellannotation/cap-anndata/pull/27))

0.2.2

Added
- compression option in `overwrite` method to allow using different compression algorithms. Note: `lzf` is still default.

Changed

- `requirements.txt` updated to freeze package versions. Possible incompatibility with `numpy` v2+ was displayed.

0.2.1

Fixed
- **Python 3.9 Compatibility**: Fixed type notation in `CapAnnDataDF`.

0.2.0

Added

- **Reader Module**: Introduced `reader.py` with context manager `read_h5ad` and function `read_directly` for reading AnnData files.
- **Join and Merge Methods**: Enhanced methods for joining and merging dataframes in `CapAnnDataDF`.
- **New Methods for Accessing Keys**: Added `obs_keys` and `var_keys` methods to `CapAnnData` for retrieving column keys without load content of `.h5ad` file to memory.
- **Append columns from disc**: Added the possibility to join the new column from disc to in-memory DataFrame. Previously, it was only possible to read new DataFrame from disc inplace of in-memory one.
- **DataFrame Setters**: Added validation in DataFrame setters to ensure correct data types and shapes.

Changed

- **Refactored CapAnnData Class**:
- Moved `RawLayer` to a separate class.
- Introduced `BaseLayerMatrixAndDf` as a base class for `CapAnnData` and `RawLayer`.
- Simplified `read_obs`, `read_var`, and `overwrite` methods.
- Enhanced `_read_df` to handle column order and in-memory DataFrame updates.
- Replaced `read_obs` and `read_var` methods to support resetting DataFrames and incremental reads.

Fixed

- **Empty Column Order Handling**: Fixed issue with empty column order attribute in `CapAnnDataDF`.
- **Overwrite Method**: Corrected handling of column order in the `overwrite` method to avoid type mismatches.

Removed

- **Context Manager for AnnData Files**: Removed context manager method `read_anndata_file` from `CapAnnData`.

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.