rapids-gpu-analysis

Accelerate single-cell and spatial transcriptomics analysis on NVIDIA GPUs using rapids_singlecell.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill rapids-gpu-analysis-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rapids-gpu-analysis
Source: https://github.com/cpanse/skills/tree/main/single-cell-ml/skills/rapids-gpu-analysis
Command: npx skills add https://github.com/cpanse/skills --skill rapids-gpu-analysis-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rapids-singlecell, scanpy, anndata, cupy, rmm, cuml, cugraph, cuvs, pylibraft, marimo, and includes scripts (resource) and references (resource) components.

What problem does it solve? CPU-based Scanpy pipelines become prohibitively slow on large single-cell and spatial datasets exceeding 500K cells, and this Skill provides a complete GPU-accelerated workflow on FGCZ infrastructure using rapids_singlecell and NVIDIA L40S GPUs. ## Core Features & Use Cases - Reproducible GPU Environment: Pixi-based environment definition with the full RAPIDS stack (cupy, cuml, cugraph, cuvs) plus rapids-singlecell, scanpy, and Marimo notebooks. - Seurat to h5ad Conversion: R script that converts large Seurat v5 multi-layer objects to h5ad format, preserving metadata and embeddings for AnnData-based GPU analysis. - GPU Preprocessing and Clustering: RMM managed-memory setup, normalization, HVG selection, PCA, neighbor search (brute or ivfflat), UMAP, and Leiden clustering entirely on GPU, with SBATCH scripts for SLURM GPU partition submission. - Use Case: A researcher with a 2.4M-cell merged Xenium dataset submits a GPU job that runs the full preprocessing-to-clustering pipeline in about 4 minutes and exports an interactive Marimo HTML report. ## Quick Start Ask the agent to set up a rapids_singlecell GPU analysis environment with Pixi and convert your Seurat object to h5ad for GPU-accelerated clustering on the FGCZ cluster.

Frequently Asked Questions about rapids-gpu-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Scanpy-style single-cell analysis on a GPU?

Use rapids_singlecell, which mirrors the Scanpy API on GPU. Transfer your AnnData object with rsc.get.anndata_to_GPU(adata), then call rsc.pp and rsc.tl functions for normalization, PCA, neighbors, UMAP, and Leiden clustering.

How to convert a Seurat v5 object to h5ad format?

Use the provided convert_seurat_to_h5ad.R script, which handles Seurat v5 multi-layer objects by joining layers, preserving metadata and embeddings, and transposing the matrix to cells-by-genes for AnnData. Submit it as a SLURM job with submit_conversion.sh.

brute vs ivfflat neighbor search in rapids_singlecell?

brute performs exact neighbor search and takes about 70 seconds on 2.4M cells, while ivfflat is approximate and finishes in about 14 seconds. Use ivfflat for exploration and brute for final analyses, since approximate search can change cluster counts.

Why does rapids_singlecell fail with CUDA out of memory?

The dataset exceeds GPU VRAM without unified memory. Reinitialize RMM with managed_memory=True and set the CuPy allocator to rmm_cupy_allocator so data can overflow between GPU and CPU memory.

Can rapids_singlecell use multiple GPUs for neighbor search?

Multi-GPU via mg_ivfflat requires Dask-CUDA distributed data and a LocalCUDACluster setup, which is complex. Single GPU with RMM managed memory handles most datasets and is the recommended approach.