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
- 参考文档references/data-formats.md8.7 KB
- 参考文档references/genomic-methods.md9.8 KB
- 参考文档references/matrixtable-workflows.md10.7 KB
- 参考文档references/troubleshooting.md8.9 KB
- 脚本scripts/matrixtable_recipe_template.py10.7 KB
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.mdfor import-to-native-cache, annotation, filtering, QC, split, PCA, association, VEP, and export recipes. - Read
references/genomic-methods.mdfor task-to-method selection across QC, PCA, association, relatedness, VEP/Nirvana boundaries, reference genomes,Locus,Call, andPedigree. - Read
references/data-formats.mdbefore choosing import/export options or interpretinglocus,alleles,s,GT,DP,GQ,PL,info, dosage, and phenotype fields. - Read
references/troubleshooting.mdwhen imports fail, references mismatch,split_multi_htsproduces surprising INFO fields, VEP/Nirvana cannot run, association covariates fail, orcollect/entriesis too expensive. - Use
scripts/matrixtable_recipe_template.py --print-templateto generate a safe, editable dense MatrixTable recipe skeleton.
Route Elsewhere
- Use
../variant-datasets/SKILL.mdfor sparse GVCF, VDS, combiner,hl.vds, local allele fields, or VDS-to-dense conversion work. - Use
../tables-and-expressions/SKILL.mdfor genericTablepipelines, one-dimensional annotations, joins, aggregations, or expression-index errors that do not depend on MatrixTable axes. - Use
../setup-and-backends/SKILL.mdforhl.init, Spark/local/Batch backend choice, package installation, Java/JAR/runtime problems, cloud credentials, logs, and storage configuration. - Use
../batch-and-cli/SKILL.mdforhailctl,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 bylocusandalleles.column: sample fields, usually keyed bys.entry: per-row-by-column values such asGT,DP,GQ,AD,PL,GP, ordosage.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, inspectmt.describe(), then write or checkpoint native.mtbefore iterative analysis. - Use
hl.variant_qcandhl.sample_qconly whenGTis acallentry field and row keys represent variant-likelocus/alleles. - Run
hl.split_multi_htsbefore 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
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.
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.
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.
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.
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.
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).