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.
Please refer to the documentation, in particular, the API documentation.
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
:
-
Install the most recent release:
With
pip
:pip install annsel
With
uv
:uv add annsel
-
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
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,
)
See the changelog.
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.
Varra, S. R. annsel [Computer software]. https://github.com/srivarra/annsel