{
  "branches": {
    "build": "Genome build",
    "normalization": "Allele normalization",
    "method": "Method selection",
    "phase": "Phase resolution",
    "qc": "Inference and QC",
    "output": "CLI output"
  },
  "cases": [
    {
      "id": "conflicting-build",
      "branch": "build",
      "title": "Conflicting assembly metadata stops auto detection",
      "input": "A GRCh37 VCF header and two marker positions that match GRCh38.",
      "expected": "Auto detection reports an ambiguous build. Explicit hg38 selects GRCh38.",
      "node": "tests/test_build_detection.py::test_conflicting_metadata_stops_auto_even_with_multiple_matching_markers",
      "runs": 1,
      "guide": "../workflow/#pipeline-stages"
    },
    {
      "id": "deletion-orientation",
      "branch": "normalization",
      "title": "Deletion state follows the allele across REF and ALT",
      "input": "Three rs8176719 REF/ALT encodings: G/G-, G-/G, and T/TC. Each is tested as a phased heterozygote and a deletion homozygote.",
      "expected": "Heterozygotes normalize to O_DEL/NON_O in chromosome order. Homozygotes have two O_DEL copies.",
      "node": "tests/test_normalization.py::test_deletion_state_respects_legacy_and_genomic_allele_order",
      "runs": 3,
      "guide": "../markers/#biological-allele-mapping"
    },
    {
      "id": "strict-three-marker",
      "branch": "method",
      "title": "Strict three-marker selection rejects a missing marker",
      "input": "Only rs8176719 and rs8176746 are available. The requested method is three-marker with strict mode enabled.",
      "expected": "Selection raises RuntimeError for the missing rs8176747.",
      "node": "tests/test_method_selection.py::test_explicit_three_marker_strict_errors_if_6747_missing",
      "runs": 1,
      "guide": "../methods/#4-auto-selection-hierarchy"
    },
    {
      "id": "phase-set-fallback",
      "branch": "phase",
      "title": "Different phase sets trigger per-sample fallback",
      "input": "Three VCF samples have matching phase sets, unphased GT, or different phase sets at the contributing markers. The test runs with phase auto and phased.",
      "expected": "The matching pair yields phased A/O. Both other samples use copy counts and yield B/O with the default assumption. The run is mixed.",
      "node": "tests/test_vcf.py::test_phase_is_resolved_per_sample_and_phase_set",
      "runs": 2,
      "guide": "../workflow/#genotype-and-phase-modes"
    },
    {
      "id": "synthetic-mixed-qc",
      "branch": "qc",
      "title": "The phased synthetic cohort distinguishes three QC outcomes",
      "input": "Bundled 18-sample GRCh38 phased VCF, three-marker method, phase auto.",
      "expected": "Mixed run: 9 phased PASS (high), 2 phased CONFLICT (low), and 7 unphased MISSING_MARKER (none).",
      "node": "tests/test_examples_cohort.py::test_hg38_phased_vcf",
      "runs": 1,
      "guide": "../examples/synthetic/#expected-results"
    },
    {
      "id": "eas-assume-bo",
      "branch": "phase",
      "title": "Disabling the unphased B/O assumption exposes EAS ambiguity",
      "input": "Bundled 504-sample phased 1000 Genomes NYGC EAS extract, run with phase auto and with forced unphased calls plus --no-assume-bo.",
      "expected": "Phase auto uses phase for all 504 samples and yields zero ambiguous calls. The forced-unphased run yields 124 ambiguous calls.",
      "node": "tests/test_cli_docs.py::test_eas_documented_cli",
      "runs": 2,
      "guide": "../examples/1kg-eas/#expected-results"
    },
    {
      "id": "cli-output-schema",
      "branch": "output",
      "title": "The quick start writes the documented files and TSV schema",
      "input": "Usage quick-start command on the bundled unphased GRCh38 synthetic VCF.",
      "expected": "Four nonempty files (ABO TSV, QC TSV, summary text, and HTML report). The ABO TSV has 18 rows and its column order matches Usage.",
      "node": "tests/test_cli_docs.py::test_usage_quick_start_matches_output_schema",
      "runs": 1,
      "guide": "../usage/#per-sample-tsv-columns"
    }
  ]
}
