Xpersona
S

Single-cell Pipeline

CLAWHUB · Unverified

Generate single-cell RNA-seq analysis code templates for Seurat and Scanpy, supporting QC, clustering, visualization, and downstream analysis. Trigger when u... Skill: Single-cell Pipeline Owner: aipoch-ai Summary: Generate single-cell RNA-seq analysis code templates for Seurat and Scanpy, supporting QC, clustering, visualization, and downstream analysis. Trigger when u... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-01T06:04:26.985Z | user Initial release of the single-cell-rnaseq-pipeline skill. - Generates single-cell RNA-seq analysis code templates for Seurat (R)

62
Rank
84
Safety
957
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 957 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: medium.

clawhub skill install s17fjw78yq6wtd4ep6zsaxwrn983hznr:single-cell-rnaseq-pipeline
  1. Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.
  2. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  3. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-aipoch-ai-single-cell-rnaseq-pipeline/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

17,456 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: single-cell-rnaseq-pipeline
description: Generate single-cell RNA-seq analysis code templates for Seurat and Scanpy,
  supporting QC, clustering, visualization, and downstream analysis. Trigger when
  users need scRNA-seq analysis pipelines, preprocessing workflows, or batch correction
  code.
version: 1.0.0
category: Bioinfo
tags: []
author: AIPOCH
license: MIT
status: Draft
risk_level: Medium
skill_type: Tool/Script
owner: AIPOCH
reviewer: ''
last_updated: '2026-02-06'
---

# Single-Cell RNA-seq Pipeline

## Overview

Generate comprehensive single-cell RNA-seq analysis code templates for **Seurat (R)** and **Scanpy (Python)**. This skill provides ready-to-use code frameworks for preprocessing, quality control, normalization, clustering, marker identification, visualization, and advanced analyses like batch correction and trajectory inference.

**Technical Difficulty**: High

## When to Use

- Building scRNA-seq analysis pipelines from raw count matrices
- Need standardized QC and preprocessing workflows
- Performing batch correction across multiple samples/datasets
- Running dimensionality reduction and clustering
- Identifying cell type-specific marker genes
- Creating publication-ready visualizations (UMAP, violin plots, heatmaps)
- Conducting trajectory inference (pseudotime analysis)
- Comparing cell populations between conditions

## Core Features

### Seurat (R) Templates
1. **Data Loading**: 10x Genomics, H5AD, Cell Ranger outputs
2. **QC Metrics**: Mitochondrial content, gene counts, doublet detection
3. **Normalization**: Log-normalization, SCTransform
4. **Integration**: Harmony, RPCA, CCA for batch correction
5. **Clustering**: Graph-based clustering with optimization
6. **Visualization**: UMAP, t-SNE, feature plots, dot plots
7. **Marker Analysis**: Wilcoxon tests, conserved markers
8. **Differential Expression**: FindAllMarkers, FindConservedMarkers
9. **Cell Typing**: Reference-based annotation with SingleR/Azimuth

### Scanpy (Python) Templates
1. **Data Loading**: AnnData, 10x, CSV, loom files
2. **QC Workflow**: Comprehensive filtering and metrics
3. **Normalization**: Log1p, scran, Combat batch correction
4. **Integration**: scVI, Scanorama, BBKNN
5. **Clustering**: Leiden/Louvain with resolution sweep
6. **Visualization**: UMAP, PAGA, embeddings
7. **Marker Analysis**: rank_genes_groups, filter markers
8. **Trajectory**: PAGA, diffusion pseudotime (DPT)
9. **CellChat/CellPhoneDB**: Cell-cell communication

## Usage

### Generate Seurat Template

```bash
python scripts/main.py --tool seurat --output seurat_analysis.R --species human
```

### Generate Scanpy Template

```bash
python scripts/main.py --tool scanpy --output scanpy_analysis.py --species mouse
```

### Generate Both Templates

```bash
python scripts/main.py --tool both --output scrna_pipeline --species human --batch-correction harmony --trajectory true
```

### Command-Line Parameters

| Parameter | Type | Required | Description |
|-----------|------|-----

_meta.json

{
  "ownerId": "kn76fcc8jhxekae91m2ekbrsgn821avs",
  "slug": "single-cell-rnaseq-pipeline",
  "version": "1.0.0",
  "publishedAt": 1775023466985
}

references/batch_correction_guide.md

# Batch Correction Methods Comparison

## Overview

Batch correction is essential when combining data from multiple experiments, donors, or sequencing runs. This guide compares available methods for single-cell RNA-seq data.

## Method Comparison

| Method | Best For | Seurat | Scanpy | Speed | Accuracy |
|--------|----------|--------|--------|-------|----------|
| **Harmony** | Small batches (<5), simple variation | ✅ | ✅ | Fast | High |
| **RPCA** | Large datasets, many batches | ✅ | ❌ | Medium | Very High |
| **CCA** | Complex variation, different tissues | ✅ | ❌ | Slow | Very High |
| **Scanorama** | Integration across platforms | ✅ | ✅ | Fast | High |
| **scVI** | Deep learning approach, large data | ✅ | ✅ | Slow | Very High |
| **BBKNN** | Graph-based, fast alternative | ✅ | ✅ | Very Fast | Medium |
| **ComBat** | Simple linear correction | ❌ | ✅ | Fast | Medium |

## Recommendations by Scenario

### Small Study (<5 batches)
```
Recommended: Harmony
Reason: Fast, accurate, preserves biological variation
```

### Large Study (>10 batches)
```
Recommended: RPCA (Seurat) or scVI (Scanpy)
Reason: Scalable, handles complex batch structures
```

### Cross-Platform Integration
```
Recommended: Scanorama or scVI
Reason: Designed for platform-specific technical effects
```

### Different Tissues/Conditions
```
Recommended: CCA or scVI
Reason: Preserves cell type differences while removing technical effects
```

### Quick Exploration
```
Recommended: BBKNN
Reason: Fastest method, good for initial analysis
```

## Quality Control After Integration

1. **Visual inspection**: Check UMAP by batch
2. **kBET**: Quantify batch mixing per cell type
3. **LISI**: Local Inverse Simpson's Index
4. **Silhouette score**: Cluster cohesion
5. **Marker preservation**: Check if known markers still identify cell types

## Code Examples

### Seurat - Harmony
```r
library(harmony)
seurat_obj <- RunHarmony(seurat_obj, group.by.vars = "batch")
seurat_obj <- RunUMAP(seurat_obj, reduction = "harmony", dims = 1:30)
```

### Seurat - RPCA
```r
seurat_list <- SplitObject(seurat_obj, split.by = "batch")
seurat_list <- lapply(seurat_list, NormalizeData)
seurat_list <- lapply(seurat_list, FindVariableFeatures)
features <- SelectIntegrationFeatures(seurat_list)
seurat_list <- lapply(seurat_list, ScaleData)
seurat_list <- lapply(seurat_list, RunPCA, features = features)
anchors <- FindIntegrationAnchors(seurat_list, reduction = "rpca")
seurat_integrated <- IntegrateData(anchorset = anchors)
```

### Scanpy - Harmony
```python
import scanpy.external as sce
sce.pp.harmony_integrate(adata, key='batch')
adata.obsm['X_pca'] = adata.obsm['X_pca_harmony']
```

### Scanpy - scVI
```python
import scvi
scvi.model.SCVI.setup_anndata(adata, batch_key='batch')
vae = scvi.model.SCVI(adata, n_layers=2, n_latent=30)
vae.train()
adata.obsm["X_scVI"] = vae.get_latent_representation()
sc.pp.neighbors(adata, use_rep="X_scVI")
```

## Common Pitfalls

1. **Over-correction**: Removes biological signal al

references/requirements.txt

scanpy>=1.9.0
anndata>=0.9.0
numpy>=1.24.0
pandas>=2.0.0
matplotlib>=3.7.0
seaborn>=0.12.0
leidenalg>=0.10.0
python-igraph>=0.10.0

# Optional: Batch correction
harmonypy>=0.0.6
scanorama>=1.7.3
scvi-tools>=1.0.0
bbknn>=1.6.0

# Optional: Advanced analysis
cellchatpy>=0.1.0
scvelo>=0.3.0
scikit-misc>=0.3.0

# Optional: Spatial transcriptomics
squidpy>=1.3.0
spatialdata>=0.0.14

skill-card.md

## Description:

Generate single-cell RNA-seq analysis code templates for Seurat and Scanpy, supporting QC, clustering, visualization, and downstream analysis.

This skill is ready for commercial/non-commercial use.

## Publisher:

[aipoch-ai](https://clawhub.ai/user/aipoch-ai)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and bioinformatics analysts use this skill to generate Seurat or Scanpy pipeline templates for single-cell RNA-seq preprocessing, quality control, normalization, clustering, visualization, marker identification, batch correction, and downstream analysis.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Dependency hygiene issues, including an scvi versus scvi-tools mismatch, could lead to unexpected installs or runtime failures.

Mitigation: Install in an isolated project environment, review dependency files before installation, and prefer pinned or locked dependency versions.

Risk: The generator writes files to a user-selected output path, which can overwrite existing work if the path is reused.

Mitigation: Review the output path before execution and generate into a clean project directory.

## Reference(s):

- [Batch Correction Methods Comparison](references/batch_correction_guide.md)
- [Scanpy Template Reference](references/scanpy_template.py)
- [Python Dependency Requirements](references/requirements.txt)

## Skill Output:

**Output Type(s):** [Code, Files, Markdown, Shell commands, Configuration]

**Output Format:** [Generated R and Python analysis templates, README markdown, and JSON command results]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Writes template files to the requested output path; supported options include tool, species, batch correction, trajectory, cell communication, differential expression, and spatial analysis.]

## Skill Version(s):

1.0.0 (source: server release evidence and SKILL.md frontmatter)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Single-cell Pipeline and adjacent AI workflows.