用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/BrainStOrmics/Spateo-Skills --skill spateo-morphogenesis命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | spateo-morphogenesis |
| description | Vector field inference, trajectory analysis, GLM differential expression |
Infer cell state transitions and vector fields between developmental stages, compute trajectory paths, and identify differentially expressed genes.
# Vector field + cell mapping between two stages
python -m skills.04_morphogenesis.vectorfield \
--stage1 ./data/stage1.h5ad --stage2 ./data/stage2.h5ad
# Feature extraction (velocity, acceleration, curvature) + GLM DEG
python -m skills.04_morphogenesis.feature \
--input ./data/vectorfield.h5ad --out-dir ./output
vectorfield.py — Cell mapping & vector fieldComputes cell state transitions between two time points using sparse VFC (Vector Field Corrector).
from skills.04_morphogenesis.vectorfield import (
VectorFieldConfig, run_vectorfield_pipeline,
)
config = VectorFieldConfig(
stage1_path="./data/stage1.h5ad",
stage2_path="./data/stage2.h5ad",
groupby="celltype",
method="sparsevfc",
)
result = run_vectorfield_pipeline(config)
Key APIs: st.tools.morphofield_sparsevfc, st.tools.morphopath, cell mapping via optimal transport (POT).
feature.py — Feature extraction + GLM DEGExtracts dynamic features from vector fields and identifies differentially expressed genes.
from skills.04_morphogenesis.feature import (
FeatureConfig, run_feature_pipeline,
)
config = FeatureConfig(
input_path="./data/vectorfield.h5ad",
features=["velocity", "acceleration", "curvature", "curl", "torsion", "jacobian"],
run_glm_deg=True,
deg_groupby="celltype",
)
Features:
| Feature | Description |
|---|---|
velocity | Cell state change speed |
acceleration | Rate of velocity change |
curvature | Path bending |
curl | Local rotation in vector field |
torsion | 3D twisting of paths |
jacobian | Local divergence/convergence |
Input (vectorfield): Two AnnData objects from consecutive time stages. Input (feature): AnnData with vector field computed. Output: AnnData with vector field layers, GLM DEG tables (CSV), trajectory paths.
| Parameter | Purpose | Default |
|---|---|---|
stage1_path, stage2_path | Input stage paths | — |
groupby | Cell grouping column | "celltype" |
method | Vector field method | "sparsevfc" |
features | Features to compute | All |
run_glm_deg | Run GLM differential expression | True |
deg_threshold | Significance threshold | 0.05 |
| Problem | Fix |
|---|---|
| POT import error | conda install -c conda-forge pot |
| Vector field diverges | Check stage1/stage2 have same gene set |
| GLM fails on sparse data | Filter low-expression genes first |
| CUDA OOM | Set device="cpu" in config |