compressed-sparse-row-matrix-handling

compressed-sparse-row-matrix-handling is a skill for Claude Code, Codex from HolobiomicsLab/asb-skill-collections. It costs 67 tokens per session (1,575 once invoked), scanned A, original, Apache-2.0.

Guidance for storing single-cell count data in compressed sparse row (CSR) format. CSR stores mostly empty matrices efficiently, which matters when a single-cell dataset contains millions of cells.

In plain words
What is it for?
Converting and initializing count matrices from sequencing pipelines for matrix-free spectral methods and tools such as SnapATAC2 or Scanpy.
Why use it?
It avoids using excessive memory when large, sparse matrices are passed to dimension-reduction and clustering tools that support sparse data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Converting and initializing count matrices from sequencing pipelines for matrix-free spectral methods and tools such as SnapATAC2 or Scanpy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HolobiomicsLab/asb-skill-collections --skill compressed-sparse-row-matrix-handling
Clone the repo
git clone --depth 1 https://github.com/HolobiomicsLab/asb-skill-collections

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compressed-sparse-row-matrix-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling/github.svg)](https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling)
Your own site
<a href="https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling"><img src="https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compressed-sparse-row-matrix-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling"><img src="https://agentmods.dev/badge/skills/holobiomicslab/asb-skill-collections/compressed-sparse-row-matrix-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01575
Opus 5 $0.00034 $0.00788
Sonnet 5 $0.00013 $0.00315
Haiku 4.5 $0.00007 $0.00158

Measured 10d ago against content hash 589e9e3d029e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

compressed-sparse-row-matrix-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

collections/epigenomics/v1/skills/compressed-sparse-row-matrix-handling/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

compressed-sparse-row-matrix-handling

Summary

Convert and initialize single-cell count matrices into compressed sparse row (CSR) format compatible with matrix-free spectral embedding and scalable dimension reduction algorithms. CSR representation is essential for memory-efficient processing of large sparse single-cell datasets (10M+ cells) in downstream spectral and clustering workflows.

When to use

You have a raw or preprocessed single-cell count matrix (from BAM-to-fragment or FASTQ-to-matrix pipelines) and need to apply matrix-free algorithms like tl.spectral, tl.multi_spectral, or other scalable dimension reduction methods that require dense or sparse matrix input. Use CSR format specifically when dataset size exceeds typical in-memory dense matrix limits (e.g., >1M cells) or when downstream tools (SnapATAC2, Scanpy) explicitly expect sparse backends.

When NOT to use

  • Input matrix is already in CSR or other optimized sparse format (e.g., scipy.sparse.csc_matrix) — skip conversion and proceed directly to downstream tools.
  • Dataset size is <100K cells and memory is not a constraint — dense matrix storage may be simpler and faster for small-scale exploratory analysis.
  • Downstream tool explicitly requires dense matrix input (rare for SnapATAC2 ecosystem, but check tool documentation).

Inputs

  • count matrix (tile-based, peak-based, or gene-based quantification)
  • cell-by-feature matrix in dense array format, scipy.sparse format, or HDF5
  • AnnData object with .X as dense array

Outputs

  • AnnData object with .X as CSR-backed sparse matrix
  • scipy.sparse.csr_matrix
  • compressed sparse row representation compatible with tl.spectral

How to apply

Load the count matrix (tile-based, peak-based, or gene-based) from its native format (HDF5, AnnData, or text-based sparse formats) and convert to CSR format using SnapATAC2's matrix utilities or scipy.sparse. Initialize the matrix in SnapATAC2's AnnData object with .X as a CSR-backed array; this enables lazy evaluation and reduces peak memory footprint during subsequent operations. Verify CSR integrity by checking matrix shape, sparsity (number of nonzero elements), and data type consistency. For datasets approaching or exceeding 10 million cells, confirm that memory profiling shows sub-linear memory growth relative to cell count when CSR is used versus dense alternatives.

Read the full file on GitHub · 102 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 102 lines · 67 tokens per session scan A 589e9e3d029e

Subscribe to this mod's changes

compressed-sparse-row-matrix-handling is a skill published in the GitHub repository HolobiomicsLab/asb-skill-collections (15 stars, last pushed 5d ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,575 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gsva-analysis-and-visualization

Use this skill to run GSVA or ssGSEA pathway-level differential analysis from a bulk expression matrix and a sample group file, then generate a heatmap from the saved GSVA result object. Trigger keywords: GSVA, ssGSEA, pathway enrichment, KEGG pathway analysis, MSigDB. NOT for: gene-level differential expression…

aipoch/medical-research-skills · 88 tokens

decision-curve-analysis

Use when evaluating the clinical utility of a binary prediction model from a single clinical CSV file by fitting a logistic decision-curve model, plotting decision and clinical-impact curves, and exporting summary outputs. NOT for: survival calibration, ROC-only discrimination analysis, nomogram construction, or…

aipoch/medical-research-skills · 64 tokens

elastic-net-feature-selection

Use when selecting predictive genes or other molecular features from bulk expression matrices for binary case-vs-control classification with elastic net logistic regression, including coefficient path and cross-validation plots. Trigger keywords: elastic net, glmnet, feature selection, binary classification…

aipoch/medical-research-skills · 83 tokens

wgcna-analysis

Use when building a weighted gene co-expression network from a bulk expression matrix and a sample group file, filtering variable genes by MAD, identifying co-expression modules with WGCNA, correlating modules with traits, and exporting module-level plots and gene tables. NOT for single-cell RNA-seq, differential…

aipoch/medical-research-skills · 85 tokens

medical-research-literature-reader-pro

A medical-research-native literature reading skill for users with clinical, bioinformatics, translational, and basic experimental backgrounds. Use this skill whenever a user wants to read, analyze, critique, or interpret a medical or scientific paper — whether they provide a PDF, abstract, DOI, PMID, or just a title.…

aipoch/medical-research-skills · 199 tokens

adverse-event-narrative

Generates CIOMS I-compliant ICSR narratives from adverse event case data for FDA and EMA regulatory submission. Includes temporal analysis, MedDRA coding, causality assessment using WHO-UMC or Naranjo criteria, and multi-format output.

aipoch/medical-research-skills · 57 tokens