Agent skill

Sc Perturb Prep

by TianGzlab in TianGzlab/OmicsClaw

Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns.

Apache-2.0Auto-check passedResearch & Science

Install Sc Perturb Prep

skills CLI
$ npx skills add TianGzlab/OmicsClaw --skill sc-perturb-prep -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TianGzlab/OmicsClaw sc-perturb-prep --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/singlecell/scrna/sc-perturb-prep .claude/skills/sc-perturb-prep && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sc-perturb-prep
GitHub stars
161
Token cost
~1.2k tokens
SKILL.md length
435 words
Files
10 (incl. references)
Skills in repo
88
Repo updated
First seen
Licence
Apache-2.0

At a glance

Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns.

  • Tasks that involve Bioinformatics
  • SKILL.md covers Key CLI, Workflow, Matrix Contract and Inputs & Outputs, plus 3 more sections
  • Runs Python scripts from its folder; calls python
  • Tasks that involve CSV and tabular files

What it does

Sc Perturb Prep is an agent skill from TianGzlab/OmicsClaw. Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns. Skip when the AnnData already has perturbation labels (use sc-perturb); raw guide-calling from FASTQ (use upstream demuxlet / cellranger guide pipelines).

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `_api.py`, `examples/example_step.py` and `references/methodology.md`).

It sits in Research & Science, covering Bioinformatics and CSV and tabular files. It works with AnnData. The repository describes itself as: Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Bioinformatics
  • Tasks that involve CSV and tabular files

Example prompts

  • “/sc-perturb-prep”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 90a3bec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sc Perturb Prep loads about 1.2k tokens when it runs, and up to ~1.7k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 435 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TianGzlab/OmicsClaw at commit 90a3bec, republished under its Apache-2.0 licence (© TianGzlab). 435 words, ~1,214 tokens.

Download SKILL.mdSave it as .claude/skills/sc-perturb-prep/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
sc-perturb-prep
description
Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns. Skip when the AnnData already has perturbation labels (use sc-perturb); raw guide-calling from FASTQ (use upstream demuxlet / cellranger guide pipelines).
tags
singlecell, scrna, perturb-prep, perturb-seq, crispr, sgrna-assignment

sc-perturb-prep

Attach an upstream barcode-to-guide table to expression data. This is the mapping_tsv method, not a FASTQ guide caller. It needs no pertpy installation.

Key CLI

bash
python skills/singlecell/scrna/sc-perturb-prep/sc_perturb_prep.py --demo --output /tmp/sc_perturb_prep_demo
python skills/singlecell/scrna/sc-perturb-prep/sc_perturb_prep.py --input expression.h5ad --mapping-file mapping.tsv --output results/prep

Mapping columns are inferred from common names, or selected with --barcode-column, --sgrna-column, and --target-column. Without target values, --delimiter _ --gene-position 0 extracts the target from a guide ID. Pass --keep-multi-guide only when retaining multi-guide cells is intended.

Workflow

Upstream: expression counts and guide calls from the same cells. Standardize mapping columns, collapse guides per barcode, match assigned cells, retain gene-expression features and canonicalize the matrix. Downstream: use sc-perturb for observed perturbation signatures, or sc-preprocessing for clustering. The API returns objects; the example step writes them explicitly.

Matrix Contract

Raw counts are preferred; canonicalization can recover counts from a layer or raw snapshot. Inspect omicsclaw_matrix_contract and run_info for the actual expression source. A normalized matrix is not evidence of raw counts.

Inputs & Outputs

Input: .h5ad, 10x H5 or a matrix directory, plus mapping TSV/CSV for real runs. The CLI writes processed.h5ad, report.md, result.json, reproducibility/commands.sh, tables/perturbation_assignments.csv, tables/assignment_status_counts.csv, tables/perturbation_counts.csv, tables/feature_type_summary.csv and figures/perturbation_counts.png. tables/dropped_multi_guide_cells.csv is written only when rows were dropped. Plot data are also written under figure_data/.

Gotchas

  • tables/perturbation_assignments.csv uses status assigned, control or retained multi_guide; dropped rows do not appear in the output AnnData.
  • Control tokens match whole words separated by punctuation: NT_sg1 is a control, while WNT3_sg1, NTRK1_sg1 and NT5E_sg1 are not. Review tables/perturbation_assignments.csv after choosing custom patterns.
  • result.json → summary.n_cells_multi_guide_dropped counts dropped multi-guide cells. No matching barcodes raises ValueError in the API.
  • tables/feature_type_summary.csv describes the input feature types. Filtering needs var['feature_types']; absent labels cannot identify guide or antibody features.
Show full SKILL.md (184 more words)Show less

API

<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
standardize_mapping(table, *, barcode_column=None, sgrna_column=None, target_column=None)

Return barcode, sgRNA and target_gene columns from a pandas table.

Column names may be supplied explicitly. Missing target genes are inferred later from guide names; duplicate rows and empty barcode/guide rows are removed.

collapse_assignments(mapping, *, delimiter='_', gene_position=0, control_patterns=('NT', 'NTC', 'NON-TARGET', 'NON_TARGET', 'NEGATIVE_CONTROL', 'NEG_CTRL'), control_label='NT', drop_multi_guide=True)

Return (assigned, dropped) tables with one row per barcode.

Controls match whole tokens, not substrings of gene names. Multiple guides are dropped by default; retained multi-guide cells keep their status.

attach_assignments(adata, assignments, *, pert_key='perturbation', sgrna_key='sgRNA', target_key='target_gene', species='human')

Return a gene-expression AnnData with assignments on matching cells.

The input is unchanged. Gene features and the expression matrix are canonicalized using the single-cell input contract; no pertpy is needed.

run_info(adata, *, keep: bool=True)

Return preparation provenance; keep=False removes the run record.

assignment_summary(adata)

Return assignment_status and n_cells columns for the retained cells.

perturbation_counts(adata, *, pert_key='perturbation')

Return perturbation and n_cells columns, ordered by decreasing cell count.

perturbation_counts_figure(adata, *, pert_key='perturbation', n_top=20)

Return a Figure of cell counts for up to n_top perturbations; save it separately.

<!-- api:end -->

Dependencies

anndata, matplotlib, numpy, pandas, scanpy, scipy

© TianGzlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/singlecell/scrna/sc-perturb-prep of TianGzlab/OmicsClaw.

  • SKILL.md
  • _api.py
  • examples/example_step.py
  • references/methodology.md
  • references/output_contract.md
  • references/parameters.md
  • references/r_visualization.md
  • sc_perturb_prep.py
  • tests/test_prep_api.py
  • tests/test_sc_perturb_prep_methods.py

Open the folder on GitHubat commit 90a3bec

Compare with similar skills

Sc Perturb Prep next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sc Perturb Prep compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sc Perturb Prep this skillTianGzlab/OmicsClaw161—~1.2kAutomated safety check: PassApache-2.0
Spatial XeniumQING1105/ezST101—~535Automated safety check: PassMIT
Single2spatial Spatial MappingFreedomIntelligence/OpenClaw-Medical-Skills3.1k2 repos~994Automated safety check: PassNone
Cerna Analysisaipoch/medical-research-skills2k—~2.4kAutomated safety check: PassMIT
Plannotate Plasmid Annotationjaechang-hits/SciAgent-Skills3711 repos~4.7kAutomated safety check: PassGPL-3.0
Scanpy Single-Cell Analysisdavila7/claude-code-templates32k15 repos~2.8kAutomated safety check: PassMIT

Similar skills

  • Spatial Xenium

    QING1105/ezST

    Xenium platform branch of the spatial transcriptomics workflow — load and validate the platform's cell-level matrix for downstream analysis.

    101 GitHub stars~535 tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Single2spatial Spatial Mapping

    FreedomIntelligence/OpenClaw-Medical-Skills

    Map scRNA-seq atlases onto spatial transcriptomics slides using omicverse's Single2Spatial workflow for deep-forest training, spot-level assessment, and marker visualisation.

    3.1k GitHub starsUsed in 2 repos~994 tokens
    Research & ScienceAuto-check passed
  • Cerna Analysis

    aipoch/medical-research-skills

    A skill your agent uses when building a ceRNA regulatory network from a key gene list by combining bundled miRNA-mRNA and miRNA-lncRNA database files, with flat-file CSV exports and PDF…

    2k GitHub stars~2.4k tokensUpdated 22 days ago
    Research & ScienceAuto-check passed
  • Plannotate Plasmid Annotation

    jaechang-hits/SciAgent-Skills

    Auto-annotate plasmids with features (promoters, terminators, resistance, origins, tags, fluorescent proteins) via BLAST against curated DBs (Addgene, fpbase, SnapGene).

    371 GitHub starsUsed in 1 repo~4.7k tokens
    Research & ScienceAuto-check passed
  • Scanpy Single-Cell Analysis

    davila7/claude-code-templates

    Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.

    32k GitHub starsUsed in 15 repos~2.8k tokens
    Research & ScienceAuto-check passed
  • Scgpt

    JimLiu/science-skills

    Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology.

    227 GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed

More from TianGzlab/OmicsClaw

All 88 skills in this repo
  • Bulkrna Cosinor Rhythm

    TianGzlab/OmicsClaw

    Load when the user needs Deterministic fixed-period 24-hour single-component cosinor OLS rhythm analysis for a bulk RNA time-course CSV.

    161 GitHub stars~840 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Batch Correction

    TianGzlab/OmicsClaw

    Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation.

    161 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Coexpression

    TianGzlab/OmicsClaw

    Load when discovering bulk gene co-expression modules and hub genes with R WGCNA.

    161 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Bulkrna De

    TianGzlab/OmicsClaw

    Load when comparing gene expression between two conditions in bulk RNA-seq count data.

    161 GitHub stars~867 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Deconvolution

    TianGzlab/OmicsClaw

    Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or signature-matrix reference.

    161 GitHub stars~757 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Enrichment

    TianGzlab/OmicsClaw

    Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list.

    161 GitHub stars~860 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Sc Perturb Prep

What does Sc Perturb Prep do?

Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns. Sc Perturb Prep is an agent skill from TianGzlab/OmicsClaw. Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns.

When should I use Sc Perturb Prep?

Sc Perturb Prep fits situations like: tasks that involve Bioinformatics; tasks that involve CSV and tabular files.

How do I install Sc Perturb Prep in Claude Code?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-perturb-prep -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-perturb-prep in TianGzlab/OmicsClaw) into .claude/skills/sc-perturb-prep in your project. Claude Code loads it when a task matches its description.

How do I install Sc Perturb Prep in Codex?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-perturb-prep -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-perturb-prep in TianGzlab/OmicsClaw) into .agents/skills/sc-perturb-prep in your project. Codex loads it when a task matches its description.

Can I use Sc Perturb Prep in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill sc-perturb-prep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sc-perturb-prep, .gemini/skills/sc-perturb-prep, .github/skills/sc-perturb-prep and .opencode/skills/sc-perturb-prep in your project.

What does Sc Perturb Prep need to run?

Going by SKILL.md and its folder, Sc Perturb Prep needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Sc Perturb Prep access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sc Perturb Prep safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sc Perturb Prep use?

Sc Perturb Prep is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sc Perturb Prep use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 505 tokens, read only when the agent opens those files.

What are the alternatives to Sc Perturb Prep?

Skills that share tags, products or a category with Sc Perturb Prep: Spatial Xenium (QING1105/ezST, 101 stars), Single2spatial Spatial Mapping (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars), Cerna Analysis (aipoch/medical-research-skills, 2k stars) and Plannotate Plasmid Annotation (jaechang-hits/SciAgent-Skills, 371 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sc Perturb Prep?

TianGzlab (a GitHub organization) maintains it in TianGzlab/OmicsClaw, which has 161 GitHub stars. The repository holds 88 skills in this directory. The repository was last updated on October 7, 2026.

Source: TianGzlab/OmicsClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.