sc-velocity
БесплатноБез исполняемых скриптовНе проверенLoad when computing RNA velocity vectors and latent time on a scRNA AnnData with spliced / unspliced layers via scVelo (stochastic / dynamical /…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
sc-velocity
When to use
The user has a scRNA AnnData with layers["spliced"] and
layers["unspliced"] already populated (typically from
sc-velocity-prep running velocyto / STARsolo / kb-python) and
wants per-cell velocity vectors, magnitude maps, and optional latent
time. Three scVelo modes:
scvelo_stochastic(default) — fast, robust to noise.scvelo_dynamical— full splicing-kinetics model + latent time (slower, more interpretable).scvelo_steady_state— simplest approximation, fastest.
For ordering cells along a trajectory without splicing kinetics use
sc-pseudotime. To generate the spliced/unspliced layers from raw
FASTQs / cellranger output, run sc-velocity-prep first.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| AnnData with spliced + unspliced layers | .h5ad |
yes (unless --demo) |
| Output | Path | Notes |
|---|---|---|
| Annotated AnnData | processed.h5ad |
adds layers["velocity"], optional obs["latent_time"] (dynamical mode), velocity-graph in obsp |
| Run summary | tables/velocity_summary.csv |
always |
| Per-cell summary | tables/velocity_cells.csv |
velocity magnitude, latent time per cell |
| Top genes | tables/top_velocity_genes.csv |
ranked by mean absolute velocity |
| Figures | figures/velocity_stream.png, figures/velocity_magnitude_umap.png, figures/velocity_magnitude_distribution.png, figures/velocity_top_genes.png |
always |
| Latent time UMAP | figures/latent_time_umap.png |
when mode == scvelo_dynamical (i.e., has_latent_time = True) |
| Report | report.md + result.json |
always |
Flow
- Load AnnData (
--input) or build a synthetic demo with spliced / unspliced layers. - Preflight
requires_layers=("spliced", "unspliced")for the chosen method. - Run scVelo: filter & normalise → moments → velocity (mode-specific) → velocity graph.
- If
scvelo_dynamical: also compute latent time and gene-level dynamics. - Detect degenerate output (zero velocity genes / all-NaN) and emit a multi-action fix message in
result.json["suggested_actions"]— does NOT raise. - Render figures, write tables, save
processed.h5ad,report.md,result.json.
Gotchas
- Missing
spliced/unsplicedlayers fail at preflight. The METHOD_REGISTRY entries atsc_velocity.py:112/:118/:124declarerequires_layers=("spliced", "unspliced"); the shared preflight aborts before scVelo runs. Generate the layers withsc-velocity-prep(--method velocyto,starsolo, orkb-python) first. - Degenerate velocity is a soft fail, not an exception. When scVelo can't fit a meaningful kinetics model,
sc_velocity.py:795-806recordsresult.json["degenerate"]=True,n_velocity_genes=0,all_zero_velocity=Trueand writessuggested_actions: [...]— but the script returns 0. Always checkresult.json["n_velocity_genes"]before consuming thevelocitylayer downstream (e.g., before passing tosc-pseudotime --method cellrank --cellrank-use-velocity). --methodaccepts both METHOD_REGISTRY names and_MODE_ALIAS_MAPkeys.sc_velocity.py:656buildschoicesas the union — passing a legacy alias (e.g.,--mode stochastic) silently maps toscvelo_stochastic. The actual mode used is recorded inresult.json["mode"].scvelo_dynamicalis the only mode that produceslatent_time.sc_velocity.py:818-822writesresult.json["latent_time_range"]only whenobs["latent_time"]is populated. Stochastic / steady-state modes return velocity but no latent time —figures/latent_time_umap.pngwon't be written.--inputis mandatory unless--demo(parser.error, exit code 2).sc_velocity.py:682callsparser.error("--input required when not using --demo"). Once--inputis provided,:685raisesFileNotFoundError(f"Input file not found: {input_path}")for a bad path.- All scVelo backends require the
scveloPython package. All 3 METHOD_REGISTRY entries declaredependencies=("scvelo",). The shared dependency manager raisesImportErrorif scvelo isn't installed.
Key CLI
# Demo (synthetic spliced/unspliced)
python omicsclaw.py run sc-velocity --demo --output /tmp/sc_velocity_demo
# Default stochastic on real velocity-prepped data
python omicsclaw.py run sc-velocity \
--input velocity_ready.h5ad --output results/
# Dynamical (full kinetics + latent time)
python omicsclaw.py run sc-velocity \
--input velocity_ready.h5ad --output results/ \
--method scvelo_dynamical --n-jobs 8
# Steady-state (fastest approximation)
python omicsclaw.py run sc-velocity \
--input velocity_ready.h5ad --output results/ \
--method scvelo_steady_state
See also
references/parameters.md— every CLI flag, per-mode notesreferences/methodology.md— when each scVelo mode wins; degenerate-output checklistreferences/output_contract.md—layers["velocity"]/obs["latent_time"]schema- Adjacent skills:
sc-velocity-prep(upstream — produ
Установить sc-velocity в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sc-velocity?
Load when computing RNA velocity vectors and latent time on a scRNA AnnData with spliced / unspliced layers via scVelo (stochastic / dynamical / steady-state). Skip when input lacks spliced+unspliced layers (run sc-velocity-prep first) or for trajectory pseudotime ordering (use sc-pseudotime).
Как установить скилл sc-velocity?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sc-velocity запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic