AGENT SKILL

genomics-analysis

Use dense Hail MatrixTable workflows for VCF, PLINK, BGEN, variant/sample QC, multiallelic splitting, PCA, LD pruning, association tests, VEP/Nirvana-style annotation, and reference genome or locus/call handling.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
genomics-analysis
license
MIT
metadata
{ "disco-role": "operating" }
description
Use dense Hail MatrixTable workflows for VCF, PLINK, BGEN, variant/sample QC, multiallelic splitting, PCA, LD pruning, association tests, VEP/Nirvana-style annotation, and reference genome or locus/call handling.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Hail Genomics Analysis

Use this sub-skill when the task is about dense genotype data represented as a Hail MatrixTable: importing VCF, PLINK, or BGEN; reasoning about row, column, entry, and global axes; annotating samples or variants; filtering calls; running QC; splitting multiallelics; running PCA, LD pruning, relatedness, or association tests; applying VEP/Nirvana-style annotation; or diagnosing reference genome and contig issues.

Start Here

  • Read references/matrixtable-workflows.md for import-to-native-cache, annotation, filtering, QC, split, PCA, association, VEP, and export recipes.
  • Read references/genomic-methods.md for task-to-method selection across QC, PCA, association, relatedness, VEP/Nirvana boundaries, reference genomes, Locus, Call, and Pedigree.
  • Read references/data-formats.md before choosing import/export options or interpreting locus, alleles, s, GT, DP, GQ, PL, info, dosage, and phenotype fields.
  • Read references/troubleshooting.md when imports fail, references mismatch, split_multi_hts produces surprising INFO fields, VEP/Nirvana cannot run, association covariates fail, or collect/entries is too expensive.
  • Use scripts/matrixtable_recipe_template.py --print-template to generate a safe, editable dense MatrixTable recipe skeleton.

Route Elsewhere

  • Use ../variant-datasets/SKILL.md for sparse GVCF, VDS, combiner, hl.vds, local allele fields, or VDS-to-dense conversion work.
  • Use ../tables-and-expressions/SKILL.md for generic Table pipelines, one-dimensional annotations, joins, aggregations, or expression-index errors that do not depend on MatrixTable axes.
  • Use ../setup-and-backends/SKILL.md for hl.init, Spark/local/Batch backend choice, package installation, Java/JAR/runtime problems, cloud credentials, logs, and storage configuration.
  • Use ../batch-and-cli/SKILL.md for hailctl, hailtop.batch, job DAGs, cloud Batch execution, Dataproc/HDInsight command families, or CLI automation.

Core Mental Model

A dense MatrixTable has four axes:

  • row: variant/site fields, usually keyed by locus and alleles.
  • column: sample fields, usually keyed by s.
  • entry: per-row-by-column values such as GT, DP, GQ, AD, PL, GP, or dosage.
  • global: metadata shared by the full dataset.

Choose axis-specific methods deliberately: annotate_rows, annotate_cols, annotate_entries, annotate_globals, filter_rows, filter_cols, filter_entries, select_rows, select_cols, select_entries, and select_globals. Avoid converting to entries() unless the task truly needs coordinate-form rows.

Verified API Anchors

The inspected package exposes these dense-genomics entry points: hl.import_vcf, hl.import_plink, hl.import_bgen, hl.export_vcf, hl.variant_qc, hl.sample_qc, hl.split_multi_hts, hl.linear_regression_rows, hl.logistic_regression_rows, hl.pca, hl.ld_prune, and hl.vep. Treat hl.vep and hl.nirvana as external annotation boundaries: Hail joins annotations back to row variants, but executables, configs, caches, schemas, and assembly compatibility are environment responsibilities.

Safe Defaults

  • Import external genetics formats with an explicit reference_genome, inspect mt.describe(), then write or checkpoint native .mt before iterative analysis.
  • Use hl.variant_qc and hl.sample_qc only when GT is a call entry field and row keys represent variant-like locus/alleles.
  • Run hl.split_multi_hts before biallelic-only HWE-sensitive QC, LD pruning, many association workflows, and allele-specific annotations.
  • Include an intercept explicitly in association covariates, usually covariates=[1, ...].
  • Keep dense workflows separate from VDS workflows; do not force sparse GVCF data into dense MatrixTables unless the task explicitly calls for densification.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351