[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DKQDYFZ3AP1YP6F2RK76T2":3,"skill-same:01M7DKQDYFZ3AP1YP6F2RK76T2":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M7DKQDYFZ3AP1YP6F2RK76T2","rank-perturbations-by-edistance",null,"Rank the perturbations of a pooled CRISPR screen with single-cell readout (Perturb-seq, CROP-seq, CRISPRi or CRISPRa) by E-distance (energy distance) to the non-targeting control in PCA space, with a label-permutation test and Benjamini-Hochberg correction, from an AnnData with a guide or perturbation column to a ranked CSV, the list of hits to carry into differential expression, and an optional perturbation-by-perturbation distance matrix. Use when asking which guides actually changed the transcriptome, when separating real hits from silent guides before per-perturbation DE, or when grouping perturbations with similar effects.","lijinbio\u002Faiscientist-skills","lijinbio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16247242?v=4","01M7DKPQK7Q6V7QXAAPV51Z89N","Jin Li","01M7DKPQM0NMDN3M6XH7Z9AAKM",0,"MIT","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcrispr-screens\u002Frank-perturbations-by-edistance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rank-perturbations-by-edistance\ndescription: Rank the perturbations of a pooled CRISPR screen with single-cell readout (Perturb-seq, CROP-seq, CRISPRi or CRISPRa) by E-distance (energy distance) to the non-targeting control in PCA space, with a label-permutation test and Benjamini-Hochberg correction, from an AnnData with a guide or perturbation column to a ranked CSV, the list of hits to carry into differential expression, and an optional perturbation-by-perturbation distance matrix. Use when asking which guides actually changed the transcriptome, when separating real hits from silent guides before per-perturbation DE, or when grouping perturbations with similar effects.\nlicense: MIT\ncompatibility: Python 3.12+ with scanpy and anndata (conda or pip). No GPU, no scheduler.\nmetadata:\n  category: crispr-screens\n  version: \"1.0.0\"\n  status: community\n  author: \"Yijun Sun\"\n  aliases: \"perturbation_edistance\"\n  tags: \"crispr, perturb-seq, crop-seq, scrna-seq, e-distance, energy-distance, permutation-test, scperturb\"\n  tested-with: \"scanpy 1.12.1, anndata 0.12.16, pandas 2.3.3, numpy 2.4.6, scikit-learn 1.9.0, Python 3.13.9\"\n  compute: \"1 CPU, under 0.5 GB RAM, seconds for 270 cells x 60 genes with 1000 permutations; about 0.1 s per perturbation per 1000 permutations with 2000 control cells and 30 PCs\"\n  requires-gpu: \"false\"\n  scheduler: \"none\"\n  requires-network: \"install\"\n  requires-secrets: \"none\"\n---\n\n# Rank perturbations by E-distance to the control\n\nIn a pooled screen most guides are silent: the guide did not edit, or the gene is dispensable in\nthis context. `scripts\u002Freference.py` answers \"which perturbations actually did something?\" before\nany differential expression. It measures how far each perturbation moved its cells away from the\nnon-targeting control in PCA space (the scPerturb E-distance, Peidli et al., *Nat. Methods* 2024),\ntests the shift with a label permutation, corrects with Benjamini-Hochberg, and writes a ranked\ntable, the hits for the DE step (`compare-perturbations-to-control`, `ONLY_PERTURBATIONS`) and,\noptionally, a perturbation-by-perturbation distance matrix.\n\nThe most likely mistake is keeping `N_PERM = 1000` for a large screen. The smallest permutation\np-value is 1\u002F(N_PERM + 1), so after Benjamini-Hochberg over *m* tested perturbations a lone hit\nneeds N_PERM + 1 > *m* \u002F FDR. With 1000 permutations and FDR 0.05 that holds only up to 50 tested\nperturbations; for 1000 perturbations use at least 20 000. The second most likely is reading the\nranking by distance alone: under no effect the distance is larger for smaller groups (see\nsection 5), so read it with the permutation p-values.\n\nTested on synthetic data only (`tests\u002F`: 270 cells, 60 genes, a non-targeting control of 80\ncells, two guides that switch on the same 5-gene program, one silent guide and one 10-cell\nguide; plus a 30-cell and a 300-cell silent guide, and a check against the pairwise definition)\nwith scanpy 1.12.1, anndata 0.12.16, pandas 2.3.3, numpy 2.4.6, scikit-learn 1.9.0 and Python\n3.13.9. It has been the AiScientist template for this step of the Perturb-seq pipeline; no\nreal-screen run is recorded here.\n\n## What the statistic is\n\nE(P,C) = 2·δ(P,C) − δ(P,P) − δ(C,C), where δ(X,Y) is the mean squared Euclidean distance over\nall pairs of a cell of X and a cell of Y. The script computes it in closed form from group means\nand variances (O(n·d) memory, no n×n matrix), so it is exact and scales to large screens. The\nmeans include each cell paired with itself, and then E(P,C) = 2·‖mean(P) − mean(C)‖²: with\nsquared Euclidean cost the statistic measures a shift of the centroid, not a change of shape.\n\n| Implementation | Same number as this script? |\n| --- | --- |\n| scPerturb `edist(..., dist=\"sqeuclidean\", sample_correct=False)` | yes |\n| scPerturb `edist` defaults (`sample_correct=True`, within-group means over n(n−1) pairs) | no: smaller by 2·Var(P)\u002F(n_P − 1) + 2·Var(C)\u002F(n_C − 1) |\n| pertpy `Distance(metric=\"edistance\")` (checked in pertpy 1.4.0) | no: it uses plain Euclidean distances |\n\nA variant sensitive to the shape of the distribution needs non-squared Euclidean distances and\nsubsampled pairwise distances. Say which definition you used when you compare numbers across\ntools.\n\nSignificance: for each perturbation the script pools its cells with the control cells, shuffles\nthe two labels `N_PERM` times, counts how often the shuffled E-distance reaches the observed one\n(plus one for the observed, Davison-Hinkley), and applies Benjamini-Hochberg across the tested\nperturbations. A perturbation not significant at `FDR` is **silent**.\n\n## 1. Environment setup\n\n```bash\nmamba create -y -n scanpy_1.12 -c conda-forge python=3.13 scanpy=1.12.1 anndata=0.12.16\nsource \"$(conda info --base)\u002Fetc\u002Fprofile.d\u002Fconda.sh\"\nconda activate scanpy_1.12\npython -c \"import scanpy; print(scanpy.__version__)\"\n```\n\n`pip install scanpy==1.12.1 anndata==0.12.16` in a Python 3.12+ venv works too. Inside an\nAiScientist run, the analysis image already has scanpy.\n\n## 2. Prepare inputs\n\n- An AnnData file with a guide or perturbation label per cell in an `obs` column. The script\n  reads, in this order, `adata_clustered.h5ad` or `adata_qc.h5ad` from `$AISCIENTIST_WORK`, else\n  the file named by `$AISCIENTIST_DATASET`.\n- It uses the first `N_PCS` columns of `obsm[\"X_pca\"]` when present (a clustered checkpoint\n  has it). Otherwise it runs `sc.pp.pca(adata, n_comps=N_PCS)` on `X`, which should then be\n  log-normalized (HVG-subset if you like).\n- `$AISCIENTIST_ARTIFACTS` is where the tables go (`tables\u002F` is created).\n\nIdentify the perturbation column and the non-targeting control level from the data (column names\nsuch as `perturbation`, `guide`, `sgRNA`, `target_gene`, `feature_call`; control levels such as\n`NT`, `NTC`, `non-targeting`, `control`, `sgLacZ`, `sgGFP`, `scramble`), state which you chose,\nand ask if it is ambiguous. Count cells per perturbation. If guide identity is not in `obs`,\nassign cells to guides first; never invent the column. The PCA must include the control cells.\n\n## 3. Configure\n\nEdit the values at the top of the script:\n\n| Variable | Meaning | Default |\n| --- | --- | --- |\n| `PERT_KEY` | the `obs` column naming the guide or perturbation | `perturbation` |\n| `CONTROL` | the shared non-targeting level of `PERT_KEY` | `NT` |\n| `N_PCS` | PCA dimensions the distance is measured in | `30` |\n| `MIN_CELLS` | perturbations with fewer cells are counted but not tested | `30` |\n| `N_PERM` | label permutations per perturbation; `0` gives distances only, no calls | `1000` |\n| `FDR` | Benjamini-Hochberg threshold on the permutation p-values | `0.05` |\n| `PAIRWISE` | also write the perturbation-by-perturbation E-distance matrix | `False` |\n| `SEED` | seed of the permutations | `0` |\n\nSet `N_PERM` from the number of perturbations you will test (above). The cost grows linearly\nwith `N_PERM`, the number of perturbations, and the cells in each perturbation plus the control.\nThe script works at whatever level `PERT_KEY` holds; to work at target-gene level, collapse the\nguide labels into a new column first and point `PERT_KEY` at it.\n\n## 4. Run\n\n```bash\nexport AISCIENTIST_WORK=\u002Fpath\u002Fto\u002Fwork AISCIENTIST_ARTIFACTS=\u002Fpath\u002Fto\u002Fresults\n# or, with no checkpoint in the work directory:\nexport AISCIENTIST_DATASET=\u002Fpath\u002Fto\u002Fscreen.h5ad\npython scripts\u002Freference.py\n```\n\nIn AiScientist: read the file with `read_skill_reference`, set the values for this dataset, and\nrun it with `run_code`, which sets the variables.\n\n## 5. Validate before using the output\n\nOutputs under `$AISCIENTIST_ARTIFACTS\u002Ftables\u002F`:\n\n| Path | Contents |\n| --- | --- |\n| `perturbation_edistance.csv` | tested perturbations sorted by `edistance`, with `n_cells`, `perm_pvalue`, `perm_padj`, `significant` |\n| `perturbation_edistance_pairwise.csv` | with `PAIRWISE = True`: symmetric matrix of E-distances between perturbations with at least `MIN_CELLS` cells |\n\nCheck, in this order:\n\n1. **The JSON summary**: `n_perturbations`, `n_tested`, `n_skipped_low_cells`, `n_significant`.\n   Perturbations below `MIN_CELLS` are counted but not in the table; list them yourself from the\n   cell counts, because the report must name them.\n2. **The permutation floor**: if every hit has `perm_pvalue` = 1\u002F(N_PERM + 1) and nothing passes\n   `FDR`, the permutations, not the data, limited the call. Raise `N_PERM`.\n3. **Distance against group size**: with no effect the expected E-distance is about\n   2·V·(1\u002Fn_P + 1\u002Fn_C), V being the total variance of the PCs used. A 30-cell silent guide\n   therefore sits higher in the ranking than a 300-cell silent guide (the tests show it). The\n   permutation null has the same group sizes, so `perm_padj` is the call; the distance is the\n   effect size among the called hits.\n4. **Silent perturbations**: not significant means no detectable transcriptional effect at this\n   depth. It is a result: report it, and do not run downstream biology on it.\n5. **`real_hits_for_DE`**: the significant perturbations, for `ONLY_PERTURBATIONS`. With\n   `N_PERM = 0` it is every tested perturbation ranked by distance, with nothing called.\n6. **Pairwise matrix**: a small distance between two perturbations means a similar shift, a\n   candidate shared pathway or module. Frame it as a hypothesis.\n\n## Report\n\nThe perturbation column, the control level, guide or target level, `N_PCS`, `MIN_CELLS`,\n`N_PERM`, `FDR` and the E-distance definition (squared Euclidean, self-pairs included). The\nranked perturbations with E-distance, permutation p-value and adjusted p-value, never names\nalone. The silent perturbations, and every perturbation skipped for low cell count. Keep \"the\nranking ran\" separate from \"the hits are real\": a hit that also fails its self-knockdown check in\nthe DE step needs a second look.\n","# Rank perturbations by E-distance to the control\n\nIn a pooled screen most guides are silent: the guide did not edit, or the gene is dispensable in\nthis context. `scripts\u002Freference.py` answers \"which perturbations actually did something?\" before\nany differential expression. It measures how far each perturbation moved its cells away from the\nnon-targeting control in PCA space (the scPerturb E-distance, Peidli et al., *Nat. Methods* 2024),\ntests the shift with a label permutation, corrects with Benjamini-Hochberg, and writes a ranked\ntable, the hits for the DE step (`compare-perturbations-to-control`, `ONLY_PERTURBATIONS`) and,\noptionally, a perturbation-by-perturbation distance matrix.\n\nThe most likely mistake is keeping `N_PERM = 1000` for a large screen. The smallest permutation\np-value is 1\u002F(N_PERM + 1), so after Benjamini-Hochberg over *m* tested perturbations a lone hit\nneeds N_PERM + 1 > *m* \u002F FDR. With 1000 permutations and FDR 0.05 that holds only up to 50 tested\nperturbations; for 1000 perturbations use at least 20 000. The second most likely is reading the\nranking by distance alone: under no effect the distance is larger for smaller groups (see\nsection 5), so read it with the permutation p-values.\n\nTested on synthetic data only (`tests\u002F`: 270 cells, 60 genes, a non-targeting control of 80\ncells, two guides that switch on the same 5-gene program, one silent guide and one 10-cell\nguide; plus a 30-cell and a 300-cell silent guide, and a check against the pairwise definition)\nwith scanpy 1.12.1, anndata 0.12.16, pandas 2.3.3, numpy 2.4.6, scikit-learn 1.9.0 and Python\n3.13.9. It has been the AiScientist template for this step of the Perturb-seq pipeline; no\nreal-screen run is recorded here.\n\n## What the statistic is\n\nE(P,C) = 2·δ(P,C) − δ(P,P) − δ(C,C), where δ(X,Y) is the mean squared Euclidean distance over\nall pairs of a cell of X and a cell of Y. The script computes it in closed form from group means\nand variances (O(n·d) memory, no n×n matrix), so it is exact and scales to large screens. The\nmeans include each cell paired with itself, and then E(P,C) = 2·‖mean(P) − mean(C)‖²: with\nsquared Euclidean cost the statistic measures a shift of the centroid, not a change of shape.\n\n| Implementation | Same number as this script? |\n| --- | --- |\n| scPerturb `edist(..., dist=\"sqeuclidean\", sample_correct=False)` | yes |\n| scPerturb `edist` defaults (`sample_correct=True`, within-group means over n(n−1) pairs) | no: smaller by 2·Var(P)\u002F(n_P − 1) + 2·Var(C)\u002F(n_C − 1) |\n| pertpy `Distance(metric=\"edistance\")` (checked in pertpy 1.4.0) | no: it uses plain Euclidean distances |\n\nA variant sensitive to the shape of the distribution needs non-squared Euclidean distances and\nsubsampled pairwise distances. Say which definition you used when you compare numbers across\ntools.\n\nSignificance: for each perturbation the script pools its cells with the control cells, shuffles\nthe two labels `N_PERM` times, counts how often the shuffled E-distance reaches the observed one\n(plus one for the observed, Davison-Hinkley), and applies Benjamini-Hochberg across the tested\nperturbations. A perturbation not significant at `FDR` is **silent**.\n\n## 1. Environment setup\n\n```bash\nmamba create -y -n scanpy_1.12 -c conda-forge python=3.13 scanpy=1.12.1 anndata=0.12.16\nsource \"$(conda info --base)\u002Fetc\u002Fprofile.d\u002Fconda.sh\"\nconda activate scanpy_1.12\npython -c \"import scanpy; print(scanpy.__version__)\"\n```\n\n`pip install scanpy==1.12.1 anndata==0.12.16` in a Python 3.12+ venv works too. Inside an\nAiScientist run, the analysis image already has scanpy.\n\n## 2. Prepare inputs\n\n- An AnnData file with a guide or perturbation label per cell in an `obs` column. The script\n  reads, in this order, `adata_clustered.h5ad` or `adata_qc.h5ad` from `$AISCIENTIST_WORK`, else\n  the file named by `$AISCIENTIST_DATASET`.\n- It uses the first `N_PCS` columns of `obsm[\"X_pca\"]` when present (a clustered checkpoint\n  has it). Otherwise it runs `sc.pp.pca(adata, n_comps=N_PCS)` on `X`, which should then be\n  log-normalized (HVG-subset if you like).\n- `$AISCIENTIST_ARTIFACTS` is where the tables go (`tables\u002F` is created).\n\nIdentify the perturbation column and the non-targeting control level from the data (column names\nsuch as `perturbation`, `guide`, `sgRNA`, `target_gene`, `feature_call`; control levels such as\n`NT`, `NTC`, `non-targeting`, `control`, `sgLacZ`, `sgGFP`, `scramble`), state which you chose,\nand ask if it is ambiguous. Count cells per perturbation. If guide identity is not in `obs`,\nassign cells to guides first; never invent the column. The PCA must include the control cells.\n\n## 3. Configure\n\nEdit the values at the top of the script:\n\n| Variable | Meaning | Default |\n| --- | --- | --- |\n| `PERT_KEY` | the `obs` column naming the guide or perturbation | `perturbation` |\n| `CONTROL` | the shared non-targeting level of `PERT_KEY` | `NT` |\n| `N_PCS` | PCA dimensions the distance is measured in | `30` |\n| `MIN_CELLS` | perturbations with fewer cells are counted but not tested | `30` |\n| `N_PERM` | label permutations per perturbation; `0` gives distances only, no calls | `1000` |\n| `FDR` | Benjamini-Hochberg threshold on the permutation p-values | `0.05` |\n| `PAIRWISE` | also write the perturbation-by-perturbation E-distance matrix | `False` |\n| `SEED` | seed of the permutations | `0` |\n\nSet `N_PERM` from the number of perturbations you will test (above). The cost grows linearly\nwith `N_PERM`, the number of perturbations, and the cells in each perturbation plus the control.\nThe script works at whatever level `PERT_KEY` holds; to work at target-gene level, collapse the\nguide labels into a new column first and point `PERT_KEY` at it.\n\n## 4. Run\n\n```bash\nexport AISCIENTIST_WORK=\u002Fpath\u002Fto\u002Fwork AISCIENTIST_ARTIFACTS=\u002Fpath\u002Fto\u002Fresults\n# or, with no checkpoint in the work directory:\nexport AISCIENTIST_DATASET=\u002Fpath\u002Fto\u002Fscreen.h5ad\npython scripts\u002Freference.py\n```\n\nIn AiScientist: read the file with `read_skill_reference`, set the values for this dataset, and\nrun it with `run_code`, which sets the variables.\n\n## 5. Validate before using the output\n\nOutputs under `$AISCIENTIST_ARTIFACTS\u002Ftables\u002F`:\n\n| Path | Contents |\n| --- | --- |\n| `perturbation_edistance.csv` | tested perturbations sorted by `edistance`, with `n_cells`, `perm_pvalue`, `perm_padj`, `significant` |\n| `perturbation_edistance_pairwise.csv` | with `PAIRWISE = True`: symmetric matrix of E-distances between perturbations with at least `MIN_CELLS` cells |\n\nCheck, in this order:\n\n1. **The JSON summary**: `n_perturbations`, `n_tested`, `n_skipped_low_cells`, `n_significant`.\n   Perturbations below `MIN_CELLS` are counted but not in the table; list them yourself from the\n   cell counts, because the report must name them.\n2. **The permutation floor**: if every hit has `perm_pvalue` = 1\u002F(N_PERM + 1) and nothing passes\n   `FDR`, the permutations, not the data, limited the call. Raise `N_PERM`.\n3. **Distance against group size**: with no effect the expected E-distance is about\n   2·V·(1\u002Fn_P + 1\u002Fn_C), V being the total variance of the PCs used. A 30-cell silent guide\n   therefore sits higher in the ranking than a 300-cell silent guide (the tests show it). The\n   permutation null has the same group sizes, so `perm_padj` is the call; the distance is the\n   effect size among the called hits.\n4. **Silent perturbations**: not significant means no detectable transcriptional effect at this\n   depth. It is a result: report it, and do not run downstream biology on it.\n5. **`real_hits_for_DE`**: the significant perturbations, for `ONLY_PERTURBATIONS`. With\n   `N_PERM = 0` it is every tested perturbation ranked by distance, with nothing called.\n6. **Pairwise matrix**: a small distance between two perturbations means a similar shift, a\n   candidate shared pathway or module. Frame it as a hypothesis.\n\n## Report\n\nThe perturbation column, the control level, guide or target level, `N_PCS`, `MIN_CELLS`,\n`N_PERM`, `FDR` and the E-distance definition (squared Euclidean, self-pairs included). The\nranked perturbations with E-distance, permutation p-value and adjusted p-value, never names\nalone. The silent perturbations, and every perturbation skipped for low cell count. Keep \"the\nranking ran\" separate from \"the hits are real\": a hit that also fails its self-knockdown check in\nthe DE step needs a second look.\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":36},{"tags":25,"author":26,"status":27,"aliases":28,"compute":29,"version":30,"category":31,"scheduler":32,"tested-with":33,"requires-gpu":34,"requires-network":35,"requires-secrets":32},"crispr, perturb-seq, crop-seq, scrna-seq, e-distance, energy-distance, permutation-test, scperturb","Yijun Sun","community","perturbation_edistance","1 CPU, under 0.5 GB RAM, seconds for 270 cells x 60 genes with 1000 permutations; about 0.1 s per perturbation per 1000 permutations with 2000 control cells and 30 PCs","1.0.0","crispr-screens","none","scanpy 1.12.1, anndata 0.12.16, pandas 2.3.3, numpy 2.4.6, scikit-learn 1.9.0, Python 3.13.9","false","install","Python 3.12+ with scanpy and anndata (conda or pip). No GPU, no scheduler.","main","5c42aa74b19348cb68aa35301eba042a737d94d4","skills\u002Fcrispr-screens\u002Frank-perturbations-by-edistance",2,"https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills","https:\u002F\u002Fgithub.com\u002Flijinbio","2026-11-14 05:44:08",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add lijinbio\u002Faiscientist-skills --skill rank-perturbations-by-edistance",{"tool":50,"command":51},"bunx","bunx skills add lijinbio\u002Faiscientist-skills --skill rank-perturbations-by-edistance",{"tool":53,"command":54},"pnpm","pnpm dlx skills add lijinbio\u002Faiscientist-skills --skill rank-perturbations-by-edistance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcrispr-screens\u002Frank-perturbations-by-edistance\u002FSKILL.md",true,[58,64],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Freference.py","SCRIPT","脚本",7613,"https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcrispr-screens\u002Frank-perturbations-by-edistance\u002Fscripts\u002Freference.py",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"tests\u002Ftest_rank_perturbations_by_edistance.py",6591,"https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcrispr-screens\u002Frank-perturbations-by-edistance\u002Ftests\u002Ftest_rank_perturbations_by_edistance.py",[69,76,83,90,97,104],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7DKZPCPYM78N1R0MVAVVYKT","verb-object-with-tool","One or two sentences on what the skill does and when to use it. Name the tool, the input it takes and the output it produces, then list the situations that should trigger it (for example \"Use when setting up X, writing a Y config, or diagnosing a failed Z run\").","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Ftemplate\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DKZCJMFJJB9ZH9YGCSQHR5","write-variant-tables","Write the five standard variant-annotation result tables - consequence, impact and ClinVar-significance distributions, a ClinVar pathogenic and likely-pathogenic list, and a shortlist of rare, damaging variants not in ClinVar - plus a JSON summary, from an annotated per-variant TSV (VEP consequence and impact, SIFT, PolyPhen, max population AF, rsID, ClinVar significance), in pure Python without re-parsing the VCF or re-running VEP. Use when a study needs these tables with a different rarity cutoff, impact set or damaging-predictor rule, or when rebuilding them from an existing annotation table. In AiScientist, annotate_variants already writes the default tables, so use this only for a custom cut.","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvariants\u002Fwrite-variant-tables\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DKZ3R4E6JEJT3YB6AHXE60","rank-phenotype-differentials-with-mcp","Map clinical phenotype text to grounded HPO terms and rank a research differential through an already configured phenotype-diagnosis MCP service with LIRICAL and optional literature adjudication. Use for explicit service-based analysis while preserving negation, uncertainty and original probabilities; retain the established workflow when the service is unavailable.","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvariants\u002Frank-phenotype-differentials-with-mcp\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7DKYS9R4F5EPCMDHSH3TEZ7","qc-vcf-callset","Judge whether a germline VCF callset is trustworthy before interpreting any variant - Ti\u002FTv, Het\u002FHom, SNP, indel and multiallelic counts, sample count and genotype call rate from bcftools stats (falling back to cyvcf2, then to a plain-Python Ti\u002FTv scan) - and flag values outside the expected human WGS or WES ranges. Writes tables\u002Fvcf_qc_summary.csv and data\u002Fvcf_qc.json with a qc_flags list. Use when a VCF (one sample or a cohort) arrives for annotation or prioritization, when a Ti\u002FTv or Het\u002FHom value needs interpreting, or when deciding whether downstream variant tables must carry a low-confidence caveat.","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvariants\u002Fqc-vcf-callset\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7DKYDRBFTBS2J58QMB7SMHK","prioritize-clinical-variants","Rank annotated variants into research-triage tiers (ClinVar pathogenic, likely pathogenic, VUS favouring pathogenic, VUS, likely benign, benign) from ClinVar significance used verbatim, gnomAD allele frequency against a dominant or recessive disease-model cutoff and the ACMG BA1 5 percent rule, and in-silico predictors (SIFT, PolyPhen, REVEL, CADD, AlphaMissense) as supporting evidence only. Pure Python; reads a per-variant annotation TSV and writes a tier-sorted CSV with the evidence for each tier plus a JSON of tier counts. Use when a rare-variant list from VEP, ClinVar and gnomAD annotation must be ordered for review (which variants to look at first) or when choosing the disease model and cutoffs for that ordering. Research triage only, NOT a clinical ACMG\u002FAMP classification.","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvariants\u002Fprioritize-clinical-variants\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7DKY2XPCQ2S639KTPSAJ170","normalize-vcf-with-bcftools","Normalize a VCF with bcftools norm before annotation or ClinVar\u002FgnomAD matching - split multiallelic sites into biallelic records, atomize MNPs into SNPs, then left-align and trim indels against the reference FASTA of the same build - writing an indexed normalized.vcf.gz and a JSON of record counts before and after. Use when a VCF not known to be normalized (especially an indel-heavy one) will be matched against ClinVar, gnomAD or dbSNP, compared between callers or loaded into PLINK, or when a known pathogenic indel comes back as not in ClinVar. In AiScientist, the offline annotate_variants path already normalizes, so do not plan it as a separate step there.","https:\u002F\u002Fgithub.com\u002Flijinbio\u002Faiscientist-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvariants\u002Fnormalize-vcf-with-bcftools\u002FSKILL.md",[],[]]