AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Anndata Backed Object Manipulation

skill-holobiomicslab-asb-skill-collections-anndata-backed-object-manipulation · by HolobiomicsLab

Use when when working with large single-cell ATAC-seq or multi-omics datasets where in-memory storage is infeasible (>1M cells), and you need to iteratively add or modify count matrices (tile-based, peak-based, or gene-based) while preserving fragment-level data for reproducibility and re-analysis.

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add skill-holobiomicslab-asb-skill-collections-anndata-backed-object-manipulation

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-holobiomicslab-asb-skill-collections-anndata-backed-object-manipulation)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Anndata Backed Object Manipulation? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

anndata-backed-object-manipulation

Summary

Manipulate fully backed AnnData objects to store and access single-cell omics fragment data and count matrices without loading entire datasets into memory. This skill enables scalable preprocessing and matrix operations on datasets exceeding 10 million cells by leveraging on-disk storage.

When to use

When working with large single-cell ATAC-seq or multi-omics datasets where in-memory storage is infeasible (>1M cells), and you need to iteratively add or modify count matrices (tile-based, peak-based, or gene-based) while preserving fragment-level data for reproducibility and re-analysis.

When NOT to use

  • Input data is already a dense in-memory count matrix; use backed AnnData only to avoid reprocessing raw fragments.
  • Workflow requires frequent random access to all cells × features values (backed mode has I/O latency); consider in-memory AnnData for small datasets (<1M cells).
  • Fragment data is unavailable or lost; count matrices cannot be regenerated with alternative binning strategies without raw sequencing alignments.

Inputs

  • backed AnnData object (.h5ad file on disk)
  • fragment coordinate data stored in .obsm slots (paired-end or single-end fragment tuples)
  • genomic interval definitions (tile coordinates, peak BED file, or gene GTF annotations)

Outputs

  • count matrix (stored in .X or .obsm of the same backed AnnData object)
  • updated backed AnnData object with added matrix layer
  • metadata about matrix binning (tile size, peak list, gene annotations)

How to apply

Load or create a backed AnnData object using SnapATAC2's I/O functions, which stores dense arrays and sparse matrices on disk rather than in RAM. Store raw fragment coordinates in .obsm['fragmentpaired'] or .obsm['fragmentsingle'] slots. Apply matrix operations (pp.addtilematrix, pp.makepeakmatrix, pp.makegenematrix) to generate count matrices from fragments; each operation reads from and writes to disk without materializing the full dataset. Verify matrix shape (nobs × nvars) and sparsity after each operation to confirm the count matrix reflects the intended genomic binning or feature selection.

Related tools

  • SnapATAC2 (Provides pp.addtilematrix, pp.makepeakmatrix, pp.makegenematrix functions for matrix operations on backed AnnData; handles fragment data I/O and count aggregation) — https://github.com/scverse/SnapATAC2
  • precellar (Upstream preprocessing: converts raw FASTQ files to fragment files (.tsv.zst) and count matrices that are input to backed AnnData workflows) — https://github.com/regulatory-genomics/precellar
  • Scanpy (Companion library for seamless integration with backed AnnData objects; provides embedding and clustering on top of SnapATAC2 matrices)

Examples

import snapatac2 as snap; adata = snap.read('data.h5ad', backed='r+'); snap.pp.add_tile_matrix(adata, counting_strategy='paired_insertion'); adata.write()

Evaluation signals

  • Verify that the backed AnnData object file size on disk grows incrementally with each matrix operation; no explosion to in-memory size.
  • Check that .X (or intended .obsm key) contains the expected count matrix shape: nobs = number of cells, nvars = number of tiles/peaks/genes.
  • Confirm matrix is sparse (majority zeros) and contains non-zero entries distributed across cells and genomic coordinates; spot-check a few cell × feature pairs for plausible counts.
  • Run pp.filtercells or pp.selectfeatures on the matrix output to verify that downstream filtering operations read and write correctly to the backed object.
  • Profile disk I/O latency: operations should complete in reasonable time (seconds to minutes per matrix depending on dataset size); significant slowdown may indicate backing strategy issues.

Limitations

  • Backed AnnData objects require consistent on-disk storage; file system failures or accidental deletion of .h5ad file causes data loss.
  • Matrix operations are sequential and I/O-bound; random-access patterns (e.g., selecting arbitrary subsets of cells repeatedly) may be slower than in-memory alternatives.
  • Fragment storage in .obsm as tuples or coordinate arrays can itself consume significant disk space for large datasets; compression (e.g., via precellar's .tsv.zst) is recommended upstream.
  • Compatibility with older AnnData or SnapATAC2 versions may break if the backing format or .obsm schema changes.

Evidence

  • [readme] Implementation of fully backed AnnData.: "Implementation of fully backed AnnData."
  • [other] Matrix operation including pp.addtilematrix, pp.makepeakmatrix, pp.makegenematrix: "Matrix operation including pp.addtilematrix, pp.makepeakmatrix, pp.makegenematrix"
  • [other] Load backed AnnData object containing fragment data (stored in .obsm['fragmentpaired'] or .obsm['fragmentsingle']). Invoke pp.addtilematrix with countingstrategy='pairedinsertion': "Load backed AnnData object containing fragment data (stored in .obsm['fragmentpaired'] or .obsm['fragmentsingle']). Invoke pp.addtilematrix with countingstrategy='pairedinsertion'"
  • [readme] Scale to more than 10 million cells.: "Scale to more than 10 million cells."
  • [readme] Blazingly fast preprocessing tools for BAM to fragment files conversion and count matrix generation.: "Blazingly fast preprocessing tools for BAM to fragment files conversion and count matrix generation."

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.