Annsel
A user-friendly library that brings familiar DataFrame-style operations to AnnData objects with a simple and expressive API.
Install / Use
/learn @srivarra/AnnselREADME
annsel
<div align="center">| | |
| :-----------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Status | [][link-build] [
][link-test] [
][link-docs] [
][link-codecov] [
][link-pre-commit] |
| Meta | [
][link-hatch] [
][link-ruff] [
][link-uv] [
][link-license] [
][link-gitmoji] |
| Package | [
][link-pypi] [
][link-pypi] |
| Ecosystem | [
][link-scverse] |
| | |
Annsel is a user-friendly library that brings familiar dataframe-style operations to AnnData objects.
It's built on the [narwhals][link-narwhals] compatibility layer for dataframes.
Take a look at the GitHub Projects board for features and future plans: [Annsel Features][link-gh-project]
<!-- done -->Getting started
Please refer to the [documentation][link-docs], in particular, the [API documentation][link-api].
There's also a brief tutorial on how to use all the features of annsel: [All of Annsel][link-tutorial].
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][link-uv].
There are several ways to install annsel:
-
Install the most recent release:
With
uv:uv add annselWith
pip:pip install annsel -
Install the latest development version:
With
uv:uv add git+https://github.com/srivarra/annselWith
pip:pip install git+https://github.com/srivarra/annsel.git@main
Examples
annsel comes with a small dataset from Cell X Gene to help you get familiar with the API.
import annsel as an
adata = an.datasets.leukemic_bone_marrow_dataset()
The dataset looks like this:
AnnData object with n_obs × n_vars = 31586 × 458
obs: 'Cluster_ID', 'donor_id', 'Sample_Tag', 'Cell_label', 'is_primary_data', 'organism_ontology_term_id', 'self_reported_ethnicity_ontology_term_id', 'assay_ontology_term_id', 'tissue_ontology_term_id', 'Genotype', 'development_stage_ontology_term_id', 'sex_ontology_term_id', 'disease_ontology_term_id', 'cell_type_ontology_term_id', 'suspension_type', 'tissue_type', 'cell_type', 'assay', 'disease', 'organism', 'sex', 'tissue', 'self_reported_ethnicity', 'development_stage', 'observation_joinid'
var: 'vst.mean', 'vst.variance', 'vst.vari
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
