[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DTJTEQAGFAAMMS9CS5X2Q8":3,"skill-same:01M6DTJTEQAGFAAMMS9CS5X2Q8":102},{"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":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"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",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"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":39,"description":7},[27,26,31,29,30,32,33],"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":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add TianGzlab\u002FOmicsClaw --skill sc-perturb",{"tool":54,"command":55},"bunx","bunx skills add TianGzlab\u002FOmicsClaw --skill sc-perturb",{"tool":57,"command":58},"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,[62,68,72,78,82,86,90,94,98],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"_api.py","SCRIPT","脚本",3402,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002F_api.py",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"examples\u002Fexample_step.py",1678,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fexamples\u002Fexample_step.py",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fmethodology.md","REFERENCE","参考文档",851,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fmethodology.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Foutput_contract.md",537,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Foutput_contract.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fparameters.md",463,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fparameters.md",{"path":87,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fr_visualization.md",474,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Freferences\u002Fr_visualization.md",{"path":91,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":92,"sourceHtmlUrl":93},"sc_perturb.py",18582,"https:\u002F\u002Fgithub.com\u002FTianGzlab\u002FOmicsClaw\u002Fblob\u002Fmain\u002Fskills\u002Fsinglecell\u002Fscrna\u002Fsc-perturb\u002Fsc_perturb.py",{"path":95,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":96,"sourceHtmlUrl":97},"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":99,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":100,"sourceHtmlUrl":101},"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",[103,116,128,144,170,191],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":34},"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",[],[110,111,112,113,114,23,115],"demo skill","demo","tests","fixture","fixture skill","environment",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":34},"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",[],[123,124,125,112,113,126,127],"domains","fake domains","deployment","never","test",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":34},"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",[],[135,136,137,138,139,140,141,142,143],"me","replace me skill","template","directory","skill template","existing skill","new skill","bootstrap","scaffold",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":34},"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",[],[151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,23,168,169],"velocity","spatial velocity","Spatial","scvelo","input","starsolo","time","deep","RNA","kb-python","via","velocyto","rna-velocity","velovi","dynamics","upstream","kb","python","deterministic",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":34},"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",[],[153,177,178,179,180,181,182,183,161,184,185,186,187,188,151,189,23,190,21,20],"trajectory","spatial trajectory","state","terminal","lineage","diffusion","cellrank","palantir","dpt","pseudotime","probability","cell","default","branch",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":34},"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",[],[198,199,153,161,200,201,202,203,204,205,123,206,207,208,209,23,21,210,211,212],"spatial statistics","statistics","nhood-enrichment","co-occurrence","ripley","geary","moran","neighbourhood","ranking","autocorrelation","local","domain","detection","enrichment","stats"]