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-10-08
- Stars
- ★ 11
- Forks
- 3
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 资源文件 4
- 参考文档references/data-formats.md8.7 KB
- 参考文档references/genomic-methods.md9.8 KB
- 参考文档references/matrixtable-workflows.md10.7 KB
- 参考文档references/troubleshooting.md8.9 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
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.