← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-phasing-imputation-imputation-qc / references / usage-guide.md

Imputation QC - Usage Guide

Overview

Assess and filter phasing and imputation output. The core idea is that the routine quality score (Beagle DR2, Minimac R2, IMPUTE/GLIMPSE INFO) is the model grading its own posterior, not a measured accuracy: it estimates r2 from the dosage variance without ever seeing the truth, it is confounded with allele frequency, and a flat INFO >= 0.3 cutoff is therefore a hidden rare-variant filter. True accuracy comes only from masking known genotypes and computing dosage-r2 binned by MAF; concordance lies for rare variants. The second trap is the differential-imputation confound: imputing cases and controls separately manufactures false GWAS hits that every per-group QC metric passes. This skill covers the metrics, MAF-stratified filtering, masked-truth accuracy, phasing switch-error QC, and dosage-based downstream usage.

Prerequisites

Quick Start

Tell your AI agent what you want to do: - "Filter my imputed VCF by DR2 and MAF before GWAS" - "Report imputation quality stratified by minor allele frequency" - "Validate my imputation accuracy by masking typed genotypes" - "Check my phasing switch-error rate against trios" - "Why do my imputed case-control hits not replicate?"

Example Prompts

Quality filtering

"I have a Beagle-imputed VCF. Filter it for GWAS using the correct quality field plus a MAF floor, and explain why a single flat INFO cutoff acts as a hidden rare-variant filter."

Accuracy validation

"I have array genotypes and an imputed VCF. Mask the typed sites, compute the true dosage-r2 binned by minor allele frequency, and tell me why I should not report concordance for rare variants."

Diagnosing inflation

"My imputed case-control GWAS has genome-wide-significant hits that do not replicate and the QC looks clean. Could separate imputation of cases and controls be the cause, and how do I confirm it?"

Phasing QC

"I have parent-parent-child trios. Compute my phaser's switch-error rate stratified by minor allele count and explain switch versus Hamming error."

What the Agent Will Do

  1. Detect the engine's quality field (DR2, R2, or INFO) and extract it with AF.
  2. Filter on the correct field with a MAF floor, MAF-stratified where rare variants matter, and state the thresholds.
  3. Where a truth/array set exists, mask typed genotypes, re-impute, and compute dosage-r2 binned by MAF as the gold-standard accuracy curve.
  4. Check the Rsq-versus-EmpRsq gap and the allele-frequency concordance plot for strand/ancestry problems (routing strand fixes to reference-panels).
  5. Benchmark phasing switch-error against trios where available, stratified by minor allele count.
  6. Confirm imputation was done jointly across batches, and hand filtered dosages to population-genetics/association-testing.

Tips