Skip to content

Latest commit

 

History

History
121 lines (89 loc) · 5.2 KB

README.md

File metadata and controls

121 lines (89 loc) · 5.2 KB

annsel

Status Build Tests Documentation codecov pre-commit
Meta Hatch project Ruff uv License gitmoji
Package PyPI PyPI

annsel brings familiar DataFrame-style operations to AnnData objects, making filtering and selection intuitive and straightforward. Built on the narwhals library, it provides a seamless interface for manipulating complex biological datasets stored in AnnData format.

Warning

This package is still early in development, and there is no guarantee of API stability or backwards compatibility.

Getting started

Please refer to the documentation, in particular, the API documentation.

Installation

You need to have Python 3.10 or newer installed on your system. If you don't have Python installed, we recommend installing uv. There are several alternative options to install annsel:

  1. Install the most recent release:

    With pip:

    pip install annsel

    With uv:

    uv add annsel
  2. Install the latest development version: With pip:

    pip install git+https://github.com/srivarra/annsel.git@main

    With uv:

    uv add git+https://github.com/srivarra/annsel

Example

import annsel as an

adata=an.datasets.leukemic_bone_marrow_dataset()

adata.an.filter(
    obs=(
        an.col(["Cell_label"]).is_in(["Classical Monocytes", "CD8+CD103+ tissue resident memory T cells"]),
        an.col(["sex"]) == "male",
    ),
    var=an.col(["vst.mean"]) >= 3,
)

Release notes

See the changelog.

Contact

For questions and help requests, you can reach out in the scverse discourse or the discussions tab. If you found a bug, please use the issue tracker.

Citation

Varra, S. R. annsel [Computer software]. https://github.com/srivarra/annsel