[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DTJTEQAGFAAMMS9CS5X2Q8":3,"skill-same:01M6DTJTEQAGFAAMMS9CS5X2Q8":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6DTJTEQAGFAAMMS9CS5X2Q8","sc-perturb",null,"Load when classifying perturbed vs non-perturbed cells in a Perturb-seq \u002F CRISPR-screen scRNA AnnData via the pertpy Mixscape workflow. Skip when guide labels are not yet attached to the expression object (use sc-perturb-prep); in-silico KO predictions on unperturbed data (use sc-in-silico-perturbation).","TianGzlab\u002FOmicsClaw","TianGzlab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F150978281?v=4","01M6DT9WNJJ470ADHPSMFAA02Y","01M6DT9WSN09C5K65GB6RK18R9",161,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"sc perturb","workflow","data","anndata","guide","use","screen","expression","scrna","singlecell","in-silico-perturbation","perturb-seq","crispr","perturbation","mixscape","pertpy","2026-11-10 10:12:30",false,"---\nname: sc-perturb\ndescription: Load when classifying perturbed vs non-perturbed cells in a Perturb-seq \u002F CRISPR-screen scRNA\n  AnnData via the pertpy Mixscape workflow. Skip when guide labels are not yet attached to the expression\n  object (use sc-perturb-prep); in-silico KO predictions on unperturbed data (use sc-in-silico-perturbation).\ntags:\n- singlecell\n- scrna\n- perturbation\n- perturb-seq\n- crispr\n- mixscape\n- pertpy\n---\n\n# sc-perturb\n\nClassify observed Perturb-seq cells with pertpy Mixscape. Guide labels and a\nnon-targeting control group must already exist; otherwise use `sc-perturb-prep`.\nThis is not an in-silico knockout predictor.\n\n## Key CLI\n\n```bash\npython skills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py --demo --seed 0 --output \u002Ftmp\u002Fsc_perturb_demo\npython skills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py --input prepared.h5ad --pert-key perturbation --control NT --split-by replicate --seed 0 --output results\u002Fperturb\n```\n\n`mixscape` (`--method mixscape`) is the only method. Tune `--n-neighbors`,\n`--logfc-threshold`, `--pval-cutoff` and `--perturbation-type KO|OE` explicitly.\n\n## Workflow\n\nUpstream: `sc-perturb-prep`, or an AnnData with verified screen labels. Validate\nlabels, supply\u002Fcompute PCA, build perturbation signatures, then classify cells.\nBoth pertpy stages receive `--seed` (API `random_state`, default 0).\nDownstream: `sc-de` or `sc-enrichment` after reviewing target-level calls.\n\n## Matrix Contract\n\nUses normalized expression. Count-like X is saved in `layers['counts']` and\nlog-normalized. Existing `X_pca` is reused; otherwise PCA is computed before the\nlegacy normalization step. Prefer an upstream PCA on appropriate normalized\nfeatures for real screens. The API leaves its input unchanged.\n\n## Inputs & Outputs\n\nInput: `.h5ad` with a perturbation column, control label and optional split key.\nThe CLI writes `processed.h5ad`, `report.md`, `result.json`,\n`reproducibility\u002Fcommands.sh`, `tables\u002Fmixscape_cell_classes.csv`,\n`tables\u002Fmixscape_class_counts.csv`, `tables\u002Fmixscape_global_class_counts.csv`\nand `figures\u002Fmixscape_global_classes.png`. Plot data and their manifest are in\n`figure_data\u002F`; R-enhanced figures are optional.\n\n## Gotchas\n\n- `result.json` → `data.params.split_by` records the CLI's resolved split key. A missing CLI split column warns and disables splitting; the API instead raises unless you pass `split_by=None`.\n- `tables\u002Fmixscape_global_class_counts.csv` must contain biological signal before you interpret a run. Exit 0 alone does not establish an effect; the example asserts KO detection in both known-effect groups.\n- `tables\u002Fmixscape_cell_classes.csv` preserves target-specific and global classes plus `mixscape_class_p_ko` (or `_oe`). Posterior probabilities are not experimental validation.\n- For pertpy 1.0.3, split-based signatures use controls within each split rather than nearest-neighbour selection. `n_neighbors` affects the `split_by=None` path.\n\n## API\n\n\u003C!-- api:begin generated from _api.py; regenerate with run.py api \u003Cskill dir> --write -->\n\n### `mixscape(adata, *, pert_key='perturbation', control='NT', split_by='replicate', n_neighbors=20, logfc_threshold=0.25, pval_cutoff=0.05, perturbation_type='KO', random_state=0)`\n\nReturn an AnnData copy with Mixscape classes and posterior probabilities.\n\nUses normalized expression, preserving count-like X in layers['counts']\nbefore log-normalization. split_by=None selects nearest-neighbour controls.\nBoth pertpy stages receive random_state; a missing control or split column\nraises ValueError. Requires pertpy (validated with 1.0.3 and sklearn 1.7.2).\n\n### `run_info(adata, *, keep: bool=True)`\n\nReturn method, seed and output columns; keep=False removes the run record.\n\n### `class_counts(adata)`\n\nReturn class and n_cells columns for target-specific Mixscape labels.\n\n### `global_class_counts(adata)`\n\nReturn global_class and n_cells columns for control, KO\u002FOE and NP cells.\n\n### `global_class_figure(adata)`\n\nReturn a Figure of global Mixscape cell counts without saving files.\n\n\u003C!-- api:end -->\n\n## Dependencies\n\n`anndata`, `matplotlib`, `numpy`, `pandas`, `pertpy`, `scanpy`, `scipy`, `scikit-learn`, `filelock`\n\nThe Python 3.11 CPU example is verified with `pertpy==1.0.3`,\n`scikit-learn==1.7.2`, `anndata==0.11.4`, `statsmodels==0.14.6` and\n`filelock==4.0.12`. statsmodels 0.15 removed a private import used by this pertpy\nrelease. It also needs filelock\nat import time but omits it from dependency metadata. Its dependencies include\nJAX; use the separate extended environment. blitzgsea may need pip's isolated\nsource build, which the production wheels-only installer does not perform.\n","# sc-perturb\n\nClassify observed Perturb-seq cells with pertpy Mixscape. Guide labels and a\nnon-targeting control group must already exist; otherwise use `sc-perturb-prep`.\nThis is not an in-silico knockout predictor.\n\n## Key CLI\n\n```bash\npython skills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py --demo --seed 0 --output \u002Ftmp\u002Fsc_perturb_demo\npython skills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py --input prepared.h5ad --pert-key perturbation --control NT --split-by replicate --seed 0 --output results\u002Fperturb\n```\n\n`mixscape` (`--method mixscape`) is the only method. Tune `--n-neighbors`,\n`--logfc-threshold`, `--pval-cutoff` and `--perturbation-type KO|OE` explicitly.\n\n## Workflow\n\nUpstream: `sc-perturb-prep`, or an AnnData with verified screen labels. Validate\nlabels, supply\u002Fcompute PCA, build perturbation signatures, then classify cells.\nBoth pertpy stages receive `--seed` (API `random_state`, default 0).\nDownstream: `sc-de` or `sc-enrichment` after reviewing target-level calls.\n\n## Matrix Contract\n\nUses normalized expression. Count-like X is saved in `layers['counts']` and\nlog-normalized. Existing `X_pca` is reused; otherwise PCA is computed before the\nlegacy normalization step. Prefer an upstream PCA on appropriate normalized\nfeatures for real screens. The API leaves its input unchanged.\n\n## Inputs & Outputs\n\nInput: `.h5ad` with a perturbation column, control label and optional split key.\nThe CLI writes `processed.h5ad`, `report.md`, `result.json`,\n`reproducibility\u002Fcommands.sh`, `tables\u002Fmixscape_cell_classes.csv`,\n`tables\u002Fmixscape_class_counts.csv`, `tables\u002Fmixscape_global_class_counts.csv`\nand `figures\u002Fmixscape_global_classes.png`. Plot data and their manifest are in\n`figure_data\u002F`; R-enhanced figures are optional.\n\n## Gotchas\n\n- `result.json` → `data.params.split_by` records the CLI's resolved split key. A missing CLI split column warns and disables splitting; the API instead raises unless you pass `split_by=None`.\n- `tables\u002Fmixscape_global_class_counts.csv` must contain biological signal before you interpret a run. Exit 0 alone does not establish an effect; the example asserts KO detection in both known-effect groups.\n- `tables\u002Fmixscape_cell_classes.csv` preserves target-specific and global classes plus `mixscape_class_p_ko` (or `_oe`). Posterior probabilities are not experimental validation.\n- For pertpy 1.0.3, split-based signatures use controls within each split rather than nearest-neighbour selection. `n_neighbors` affects the `split_by=None` path.\n\n## API\n\n\u003C!-- api:begin generated from _api.py; regenerate with run.py api \u003Cskill dir> --write -->\n\n### `mixscape(adata, *, pert_key='perturbation', control='NT', split_by='replicate', n_neighbors=20, logfc_threshold=0.25, pval_cutoff=0.05, perturbation_type='KO', random_state=0)`\n\nReturn an AnnData copy with Mixscape classes and posterior probabilities.\n\nUses normalized expression, preserving count-like X in layers['counts']\nbefore log-normalization. split_by=None selects nearest-neighbour controls.\nBoth pertpy stages receive random_state; a missing control or split column\nraises ValueError. Requires pertpy (validated with 1.0.3 and sklearn 1.7.2).\n\n### `run_info(adata, *, keep: bool=True)`\n\nReturn method, seed and output columns; keep=False removes the run record.\n\n### `class_counts(adata)`\n\nReturn class and n_cells columns for target-specific Mixscape labels.\n\n### `global_class_counts(adata)`\n\nReturn global_class and n_cells columns for control, KO\u002FOE and NP cells.\n\n### `global_class_figure(adata)`\n\nReturn a Figure of global Mixscape cell counts without saving files.\n\n\u003C!-- api:end -->\n\n## Dependencies\n\n`anndata`, `matplotlib`, `numpy`, `pandas`, `pertpy`, `scanpy`, `scipy`, `scikit-learn`, `filelock`\n\nThe Python 3.11 CPU example is verified with `pertpy==1.0.3`,\n`scikit-learn==1.7.2`, `anndata==0.11.4`, `statsmodels==0.14.6` and\n`filelock==4.0.12`. statsmodels 0.15 removed a private import used by this pertpy\nrelease. It also needs filelock\nat import time but omits it from dependency metadata. Its dependencies include\nJAX; use the separate extended environment. blitzgsea may need pip's isolated\nsource build, which the production wheels-only installer does not perform.\n",{"name":5,"tags":44,"description":7},[32,31,36,34,35,37,38],"main","90a3bec3e6549bc33dddbf67e4b23869736c49d1","skills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb",27,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw","https:\u002F\u002FTianGzlab.github.io\u002FOmicsClaw\u002F","https:\u002F\u002Fgithub.com\u002FTianGzlab","2026-10-08 01:36:11",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add TianGzlab\u002FOmicsClaw --skill sc-perturb",{"tool":59,"command":60},"bunx","bunx skills add TianGzlab\u002FOmicsClaw --skill sc-perturb",{"tool":62,"command":63},"pnpm","pnpm dlx skills add TianGzlab\u002FOmicsClaw --skill sc-perturb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002FSKILL.md",true,[67,73,77,83,87,91,95,99,103],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"_api.py","SCRIPT","脚本",3402,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002F_api.py",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"examples\u002Fexample_step.py",1678,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fexamples\u002Fexample_step.py",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fmethodology.md","REFERENCE","参考文档",851,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fmethodology.md",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Foutput_contract.md",537,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Foutput_contract.md",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fparameters.md",463,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fparameters.md",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fr_visualization.md",474,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fr_visualization.md",{"path":96,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":97,"sourceHtmlUrl":98},"sc_perturb.py",18582,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py",{"path":100,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":101,"sourceHtmlUrl":102},"tests\u002Ftest_perturb_api.py",2020,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Ftests\u002Ftest_perturb_api.py",{"path":104,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":105,"sourceHtmlUrl":106},"tests\u002Ftest_sc_perturb_methods.py",1588,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Ftests\u002Ftest_sc_perturb_methods.py",[108,122,134,151,177,198],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":39},"01M6DTP4X225Q92RMY8XXHPCTT","demo-skill","A fixture skill for the skill environment tests. Use it for nothing else.","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Ftests\u002Fskillenv\u002Ffixtures\u002Fskills\u002Fdemo\u002Fdemo-skill\u002FSKILL.md",[114],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[116,117,118,119,120,28,121],"demo skill","demo","tests","fixture","fixture skill","environment",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M6DTP28JTWQK3HHXDNQV8BBV","fake-domains","Test fixture for the golden deployment in tests\u002Fentry. Load never; it has no script.","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Ftests\u002Fentry\u002Ffake_skills\u002Fspatial\u002Ffake-domains\u002FSKILL.md",[],[129,130,131,118,119,132,133],"domains","fake domains","deployment","never","test",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":141,"publishedAt":39},"01M6DTNZ4AMWKTME1T18K5C643","replace-me-skill","Load when copying this directory to bootstrap a new OmicsClaw skill. Skip when an existing skill already covers the request.","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[140],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[142,143,144,145,146,147,148,149,150],"me","replace me skill","template","directory","skill template","existing skill","new skill","bootstrap","scaffold",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":39},"01M6DTNV63MTD0Q6YRC52F0B1Y","spatial-velocity","Load when estimating RNA velocity on a spatial AnnData with `layers[\"spliced\"]` + `layers[\"unspliced\"]` via scVelo (stochastic \u002F deterministic \u002F dynamical) or veloVI (deep generative). Skip when input lacks the spliced\u002Funspliced layers (must be quantified upstream by velocyto \u002F kb-python \u002F STARsolo); non-spatial scRNA velocity (use sc-velocity).","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fspatial\u002Fspatial-velocity\u002FSKILL.md",[],[158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,28,175,176],"velocity","spatial velocity","Spatial","scvelo","input","starsolo","time","deep","RNA","kb-python","via","velocyto","rna-velocity","velovi","dynamics","upstream","kb","python","deterministic",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M6DTNPMR227NAT8QFY620YDW","spatial-trajectory","Load when inferring pseudotime \u002F lineage trajectories on a preprocessed spatial AnnData via DPT (default — diffusion pseudotime), CellRank (terminal-state + fate-probability), or Palantir (waypoint branch probabilities). Skip when the data has spliced\u002Funspliced layers and you want velocity-driven dynamics (use spatial-velocity); non-spatial scRNA pseudotime (use sc-pseudotime).","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fspatial\u002Fspatial-trajectory\u002FSKILL.md",[],[160,184,185,186,187,188,189,190,168,191,192,193,194,195,158,196,28,197,26,25],"trajectory","spatial trajectory","state","terminal","lineage","diffusion","cellrank","palantir","dpt","pseudotime","probability","cell","default","branch",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":39},"01M6DTNJEYFT33P84DGHDNXW95","spatial-statistics","Load when running spatial autocorrelation \u002F hotspot \u002F co-occurrence \u002F neighbourhood-enrichment \u002F Ripley K stats on a clustered spatial AnnData via squidpy. Skip when ranking spatially variable genes (use spatial-genes); tissue domain detection (use spatial-domains).","https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fspatial\u002Fspatial-statistics\u002FSKILL.md",[],[205,206,160,168,207,208,209,210,211,212,129,213,214,215,216,28,26,217,218,219],"spatial statistics","statistics","nhood-enrichment","co-occurrence","ripley","geary","moran","neighbourhood","ranking","autocorrelation","local","domain","detection","enrichment","stats"]