RECURRENCE
Chromosome inversion recurrence summary:
  High-quality inversions with consensus labels: 93 (single-event = 61, recurrent = 32).
  Fraction recurrent = 34.41%.

SAMPLE SIZES
Sample sizes for diversity analyses:
  Inversion callset columns indicate 44 phased individuals (sample columns).
  Reporting haplotypes as twice the sample count yields 88 potential phased haplotypes.
  Number of loci with at least two haplotypes (total across orientations): 92.
  Number of loci with at least two direct haplotypes: 91.
  Number of loci with at least two inverted haplotypes: 61.
  Number of loci with at least two haplotypes in either orientation (union): 92.
  Number of loci with at least two haplotypes in each orientation (intersection): 60.
  Loci with ≥2 haplotypes per orientation for π: 60 (from output.csv).

DIVERSITY
Nucleotide diversity (π) by orientation and recurrence:
  Total loci with finite π estimates: 62.
  Across all loci: mean π(inverted) = 0.000358, mean π(direct) = 0.000486.
    Median π(inverted) = 0.000257, median π(direct) = 0.000438.
    Median π(inverted) is 1.706-fold lower than median π(direct).
    Two-sided paired t-test comparing orientations: t = -2.977, p = 4.169e-03.
  Single-event inversions: median π(inverted) = 0.000065, median π(direct) = 0.000376.
  Recurrent inversions: median π(inverted) = 0.000382, median π(direct) = 0.000465.
  Within inverted haplotypes: recurrent median π = 0.000382; single-event median π = 0.000065.

PI STRUCTURE
Nucleotide diversity structure (Edge vs Middle and Internal Decay), filtered by consensus inversion status:
  Qualifying regions (≥40kbp): 57 unique inversions.
  [Edge vs Middle] Direct/Group 0: n=57 regions. Haplotypes (N): Total=3544, Mean=62.2 [Min 6, Max 81]. Flank Mean = 4.012e-04, Middle Mean = 4.844e-04.
  [Edge vs Middle] Inverted/Group 1: n=39 regions. Haplotypes (N): Total=765, Mean=19.6 [Min 2, Max 58]. Flank Mean = 2.388e-04, Middle Mean = 2.726e-04.
  [Edge vs Middle] Overall: n=96 regions. Haplotypes (N): Total=4309, Mean=44.9 [Min 2, Max 81]. Flank Mean = 3.352e-04, Middle Mean = 3.984e-04.
    - Single-event Inverted (Group 1, Recurrence 0): n=13 regions. Haplotypes (N): Total=138, Mean=10.6 [Min 2, Max 52]. Flank Mean = 2.400e-04, Middle Mean = 1.163e-04.
    - Recurrent Direct (Group 0, Recurrence 1): n=26 regions. Haplotypes (N): Total=1259, Mean=48.4 [Min 16, Max 77]. Flank Mean = 2.463e-04, Middle Mean = 4.156e-04.
    - Single-event Direct (Group 0, Recurrence 0): n=31 regions. Haplotypes (N): Total=2285, Mean=73.7 [Min 6, Max 81]. Flank Mean = 5.312e-04, Middle Mean = 5.421e-04.
    - Recurrent Inverted (Group 1, Recurrence 1): n=26 regions. Haplotypes (N): Total=627, Mean=24.1 [Min 2, Max 58]. Flank Mean = 2.382e-04, Middle Mean = 3.508e-04.

Internal decay (Spearman's ρ of diversity vs distance from start for first 100kb, loci ≥100kb):
  Overall (All Consensus 0+1): ρ = 0.080 (p(two-sided) = 1.054e-05, n = 60).
  Single-Event Inverted (G1, R0): ρ = 0.104 (p(two-sided) = 0.038, n = 8).
  Recurrent Direct (G0, R1): ρ = 0.036 (p(two-sided) = 0.306, n = 16).
  Recurrent Inverted (G1, R1): ρ = 0.067 (p(two-sided) = 0.058, n = 16).
  Single-Event Direct (G0, R0): ρ = 0.131 (p(two-sided) = 3.069e-05, n = 20).

Internal decay (median within 2kb bins, Spearman's ρ for first 100kb, loci ≥100kb):
  Overall (All Consensus 0+1): ρ = NA (p(two-sided) = NA, n = 60).
  Single-Event Inverted (G1, R0): ρ = NA (p(two-sided) = NA, n = 8).
  Recurrent Direct (G0, R1): ρ = NA (p(two-sided) = NA, n = 16).
  Recurrent Inverted (G1, R1): ρ = NA (p(two-sided) = NA, n = 16).
  Single-Event Direct (G0, R0): ρ = NA (p(two-sided) = NA, n = 20).

  Saved Spearman decay points (including q-values) to: data/spearman_decay_points.tsv.

HUDSON FST EDGE DECAY
Folded Hudson FST decay (two-sided Spearman testing for changes from edge to center):
  Reporting only inversions with ≥5 usable bins and finite two-sided p-values; others are omitted.
  chr10:46983451-47468232 (Recurrent):
    rho=0.601, p(two-sided)=1.01470054432865e-05, q=0.000643955398996532, bins=46
  chr10:46983451-47468232 (Recurrent):
    rho=0.585, p(two-sided)=1.95137999695919e-05, q=0.000643955398996532, bins=46
  chr10:46983451-47468232 (Recurrent):
    rho=-0.252, p(two-sided)=0.0917130083847862, q=0.288240883495042, bins=46
  chr10:79542901-80217413 (Single-event):
    rho=0.044, p(two-sided)=0.769199683620293, q=0.908774183046825, bins=46
  chr10:79542901-80217413 (Single-event):
    rho=-0.059, p(two-sided)=0.69561664458308, q=0.908774183046825, bins=46
  chr10:79542901-80217413 (Single-event):
    rho=0.046, p(two-sided)=0.763601461403526, q=0.908774183046825, bins=46
  chr11:50154999-50324102 (Recurrent):
    rho=-0.046, p(two-sided)=0.771081125009427, q=0.908774183046825, bins=42
  chr11:50154999-50324102 (Recurrent):
    rho=-0.014, p(two-sided)=0.931407480097165, q=0.945736825944813, bins=42
  chr11:50154999-50324102 (Recurrent):
    rho=-0.066, p(two-sided)=0.678504720513372, q=0.908774183046825, bins=42
  chr12:131312081-131644839 (Single-event):
    rho=0.182, p(two-sided)=0.206262046202554, q=0.518063779337086, bins=50
  chr12:131312081-131644839 (Single-event):
    rho=0.177, p(two-sided)=0.219463358173547, q=0.518063779337086, bins=50
  chr12:131312081-131644839 (Single-event):
    rho=0.148, p(two-sided)=0.305202457781846, q=0.612309615362223, bins=50
  chr15:30618103-32153204 (Recurrent):
    rho=0.053, p(two-sided)=0.713399511698228, q=0.908774183046825, bins=50
  chr15:30618103-32153204 (Recurrent):
    rho=0.193, p(two-sided)=0.178900213779884, q=0.48118157263903, bins=50
  chr15:30618103-32153204 (Recurrent):
    rho=0.063, p(two-sided)=0.662130151953696, q=0.908774183046825, bins=50
  chr16:14954790-15100859 (Recurrent):
    rho=0.213, p(two-sided)=0.219784633658158, q=0.518063779337086, bins=35
  chr16:14954790-15100859 (Recurrent):
    rho=0.134, p(two-sided)=0.444087570981947, q=0.705184945118033, bins=35
  chr16:14954790-15100859 (Recurrent):
    rho=0.187, p(two-sided)=0.281781795274797, q=0.612309615362223, bins=35
  chr16:16721273-18073542 (Recurrent):
    rho=0.402, p(two-sided)=0.0037629440317353, q=0.0389056978834163, bins=50
  chr16:16721273-18073542 (Recurrent):
    rho=0.359, p(two-sided)=0.0105605385854438, q=0.0696995546639288, bins=50
  chr16:16721273-18073542 (Recurrent):
    rho=-0.306, p(two-sided)=0.0308889934990196, q=0.1199219747609, bins=50
  chr16:28471892-28637651 (Recurrent):
    rho=0.276, p(two-sided)=0.140394657803136, q=0.421183973409409, bins=30
  chr16:28471892-28637651 (Recurrent):
    rho=0.246, p(two-sided)=0.182265747211754, q=0.48118157263903, bins=31
  chr16:28471892-28637651 (Recurrent):
    rho=0.190, p(two-sided)=0.306154807681112, q=0.612309615362223, bins=31
  chr17:16823490-18384190 (Single-event):
    rho=-0.378, p(two-sided)=0.0136941273852229, q=0.0821647643113372, bins=42
  chr17:16823490-18384190 (Single-event):
    rho=-0.502, p(two-sided)=0.000711143233335707, q=0.0156451511333856, bins=42
  chr17:16823490-18384190 (Single-event):
    rho=0.422, p(two-sided)=0.00541453392800131, q=0.0446699049060108, bins=42
  chr17:45585159-46292045 (Single-event):
    rho=0.108, p(two-sided)=0.459438676364779, q=0.705184945118033, bins=49
  chr17:45585159-46292045 (Single-event):
    rho=0.328, p(two-sided)=0.0212925755058234, q=0.100379284527453, bins=49
  chr17:45585159-46292045 (Single-event):
    rho=0.126, p(two-sided)=0.388625349942544, q=0.67498087095284, bins=49
  chr2:91832040-92012663 (Recurrent):
    rho=0.381, p(two-sided)=0.00979778205382389, q=0.0696995546639288, bins=45
  chr2:91832040-92012663 (Recurrent):
    rho=0.422, p(two-sided)=0.00385206548517487, q=0.0389056978834163, bins=45
  chr2:91832040-92012663 (Recurrent):
    rho=-0.048, p(two-sided)=0.752443256789048, q=0.908774183046825, bins=45
  chr2:95800191-96024403 (Recurrent):
    rho=-0.029, p(two-sided)=0.86258112018841, q=0.9137235980986, bins=37
  chr2:95800191-96024403 (Recurrent):
    rho=-0.048, p(two-sided)=0.766793817565099, q=0.908774183046825, bins=40
  chr2:95800191-96024403 (Recurrent):
    rho=-0.444, p(two-sided)=0.00412636189672597, q=0.0389056978834163, bins=40
  chr2:130138212-131200602 (Single-event):
    rho=0.340, p(two-sided)=0.0157552064743162, q=0.0866536356087393, bins=50
  chr2:130138212-131200602 (Single-event):
    rho=0.329, p(two-sided)=0.0195858314401358, q=0.0994357596191512, bins=50
  chr2:130138212-131200602 (Single-event):
    rho=-0.275, p(two-sided)=0.0530817090458888, q=0.190744237083307, bins=50
  chr2:130138212-131530534 (Single-event):
    rho=0.306, p(two-sided)=0.0305035595032682, q=0.1199219747609, bins=50
  chr2:130138212-131530534 (Single-event):
    rho=0.313, p(two-sided)=0.0270622378097977, q=0.11907384636311, bins=50
  chr2:130138212-131530534 (Single-event):
    rho=0.262, p(two-sided)=0.0663704969349968, q=0.219022639885489, bins=50
  chr3:195749463-195980207 (Recurrent):
    rho=0.031, p(two-sided)=0.832070148612193, q=0.9137235980986, bins=48
  chr3:195749463-195980207 (Recurrent):
    rho=0.026, p(two-sided)=0.860757045806475, q=0.9137235980986, bins=48
  chr3:195749463-195980207 (Recurrent):
    rho=-0.039, p(two-sided)=0.792000112953159, q=0.9137235980986, bins=48
  chr6:167209001-167357782 (Single-event):
    rho=-0.158, p(two-sided)=0.350642118616878, q=0.661210852248971, bins=37
  chr6:167209001-167357782 (Single-event):
    rho=-0.147, p(two-sided)=0.386092362239459, q=0.67498087095284, bins=37
  chr6:167209001-167357782 (Single-event):
    rho=-0.130, p(two-sided)=0.444276826377444, q=0.705184945118033, bins=37
  chr7:5989046-6735643 (Recurrent):
    rho=0.160, p(two-sided)=0.267468204682572, q=0.608720741691371, bins=50
  chr7:5989046-6735643 (Recurrent):
    rho=0.043, p(two-sided)=0.765448458884893, q=0.908774183046825, bins=50
  chr7:5989046-6735643 (Recurrent):
    rho=-0.441, p(two-sided)=0.00134610805726845, q=0.0222107829449295, bins=50
  chr7:60911891-61578023 (Recurrent):
    rho=0.226, p(two-sided)=0.178283509000257, q=0.48118157263903, bins=37
  chr7:60911891-61578023 (Recurrent):
    rho=0.131, p(two-sided)=0.439253036286709, q=0.705184945118033, bins=37
  chr7:60911891-61578023 (Recurrent):
    rho=4.505e-03, p(two-sided)=0.978890839458511, q=0.978890839458511, bins=37
  chr7:65219157-65531823 (Recurrent):
    rho=0.024, p(two-sided)=0.873115722428036, q=0.9137235980986, bins=47
  chr7:65219157-65531823 (Recurrent):
    rho=0.032, p(two-sided)=0.82955218580991, q=0.9137235980986, bins=47
  chr7:65219157-65531823 (Recurrent):
    rho=0.111, p(two-sided)=0.457577150190108, q=0.705184945118033, bins=47
  chr7:73113989-74799029 (Recurrent):
    rho=0.153, p(two-sided)=0.602150946993499, q=0.883154722257131, bins=14
  chr7:73113989-74799029 (Recurrent):
    rho=0.171, p(two-sided)=0.558114530685507, q=0.837171796028261, bins=14
  chr7:73113989-74799029 (Recurrent):
    rho=-0.042, p(two-sided)=0.886035004216825, q=0.9137235980986, bins=14
  chr7:74869950-75058098 (Recurrent):
    rho=-0.171, p(two-sided)=0.33263115290762, q=0.645695767408909, bins=34
  chr7:74869950-75058098 (Recurrent):
    rho=-0.160, p(two-sided)=0.367349549540859, q=0.673474174158241, bins=34
  chr7:74869950-75058098 (Recurrent):
    rho=0.332, p(two-sided)=0.0549112197664065, q=0.190744237083307, bins=34
  chrX:153149748-153250226 (Recurrent):
    rho=0.087, p(two-sided)=0.679498024677208, q=0.908774183046825, bins=25
  chrX:153149748-153250226 (Recurrent):
    rho=0.217, p(two-sided)=0.297618255146521, q=0.612309615362223, bins=25
  chrX:153149748-153250226 (Recurrent):
    rho=0.045, p(two-sided)=0.832293278759298, q=0.9137235980986, bins=25

LINEAR MODEL
Orientation × recurrence linear models (replicated strict logic):
  Model definitions (mirroring stats/inv_dir_recur_model.py):
    [Model A] Outcome Δlogπ = log(π_inverted+ε) − log(π_direct+ε); predictor is a Recurrent indicator (Single-event baseline); HC3 robust SEs; contrasts report single-event, recurrent, interaction, and pooled inversion effects.
    [Model B] Rows duplicated per orientation with outcome log(π+ε); OLS with design log_pi ~ Inverted + Inverted:Recurrent + C(region_id); cluster-robust by region_id; recurrence main effect absorbed by fixed effects; contrasts compare orientation within recurrence groups and their interaction.
    [Model C] Outcome Δlogπ as in Model A with predictors Recurrent + z-scored covariates ln1p(Number_recurrent_events), ln(Size_kbp), Inverted_AF (raw z), ln(Formation_rate_per_generation); HC3 robust SEs; rows with missing covariates are dropped and effects are per +1 SD.
  Detection floor applied before logs: ε = 6.500000e-06.
  [Model A] Δ-logπ = log(π_inv+ε) – log(π_dir+ε) ~ 1 + Recurrent (HC3 SEs). No weights or covariates; effects reported for single-event, recurrent, interaction, and pooled Δ-logπ.
    Single-event: Inverted vs Direct: fold-change = 0.263 (95% CI 0.136–0.509), p = 7.416e-05.
    Recurrent: Inverted vs Direct: fold-change = 1.090 (95% CI 0.902–1.317), p = 0.372.
    Interaction (difference between those two): fold-change = 4.149 (95% CI 2.086–8.254), p = 5.015e-05.
    Overall inversion effect (pooled Δ-logπ): fold-change = 0.548 (95% CI 0.376–0.796), p = 1.631e-03.
  [Model B] log(π+ε) ~ Inverted + Inverted:Recurrent + C(region_id); cluster-robust by region_id. Recurrence main effect absorbed by fixed effects; contrasts give single-event, recurrent, and interaction pairs.
    Single-event: Inverted vs Direct: fold-change = 0.263 (95% CI 0.104–0.661), p = 4.514e-03.
    Recurrent: Inverted vs Direct: fold-change = 1.090 (95% CI 0.836–1.421), p = 0.524.
    Interaction (difference between those two): fold-change = 4.149 (95% CI 1.589–10.836), p = 3.666e-03.
  [Model C] Δ-logπ ~ 1 + Recurrent + z-scored covariates from inv_properties.tsv (Number_recurrent_events ln1p, Size_.kbp. ln, Inverted_AF, Formation_rate_per_generation ln). HC3 SEs; rows require complete covariates with missingness dummies excluded.
    Covariates included in fit: Covariate: Number_recurrent_events (ln1p, z), Covariate: Size_.kbp. (ln, z), Covariate: Inverted_AF (z), Covariate: Formation_rate_per_generation (ln, z)
    Single-event: Inverted vs Direct (adjusted): fold-change = 0.355 (95% CI 0.210–0.598), p = 1.011e-04.
    Recurrent: Inverted vs Direct (adjusted): fold-change = 0.353 (95% CI 0.166–0.753), p = 7.071e-03.
    Interaction (difference between those two): fold-change = 0.996 (95% CI 0.403–2.464), p = 0.993.
    Covariate: Number_recurrent_events (ln1p, z): fold-change = 0.479 (95% CI 0.203–1.127), p = 0.092.
    Covariate: Size_.kbp. (ln, z): fold-change = 1.303 (95% CI 0.870–1.952), p = 0.200.
    Covariate: Inverted_AF (z): fold-change = 1.758 (95% CI 1.031–2.996), p = 0.038.
    Covariate: Formation_rate_per_generation (ln, z): fold-change = 3.618 (95% CI 1.145–11.429), p = 0.028.
  [Permutation] Model A interaction (n=10000):
    Observed Δ(mean log-ratio) = 1.4230, p = 1.9998e-04.

CDS CONSERVATION
CDS conservation GLM (proportion of identical CDS pairs):
  Model definition: Binomial GLM with logit link and frequency weights = n_pairs, cluster-robust by inversion; formula prop ~ C(consensus) * C(phy_group) + log_m + log_L + log_k (log of n_sites, inversion length, and n_sequences).
  Categories use Single/Recurrent × Direct/Inverted encoding; estimated marginal means are standardized with equal inversion weight and covariates set to their weighted means before pairwise contrasts.
  Source: loaded from cds_identical_proportions.tsv.
  Input summary: n_rows = 422, n_inversions = 26.
  Unadjusted model: logLik = -2.144e+05, null deviance = 2.377e+05, residual deviance = 2.362e+05, pseudo-R² = 6.205e-03.
  Unadjusted model: standardized marginal means (equal inversion weight):
    Single/Inverted: p̂ = 98.8860% (95% CI 91.0527–99.8710%).
    Recurrent/Inverted: p̂ = 79.5470% (95% CI 72.2340–85.3252%).
    Single/Direct: p̂ = 76.8741% (95% CI 72.5442–80.7028%).
    Recurrent/Direct: p̂ = 76.3153% (95% CI 66.5520–83.9174%).
  Unadjusted model: pairwise contrasts (BH-FDR):
    Recurrent/Direct vs Single/Inverted: Δlogit = -3.316, Δp = -22.6%, p = 3.400e-03, BH q = 0.010.
    Single/Direct vs Single/Inverted: Δlogit = -3.285, Δp = -22.0%, p = 3.006e-03, BH q = 0.010.
    Recurrent/Inverted vs Single/Inverted: Δlogit = -3.128, Δp = -19.3%, p = 5.388e-03, BH q = 0.011.
    Recurrent/Direct vs Recurrent/Inverted: Δlogit = -0.188, Δp = -3.2%, p = 0.444, BH q = 0.608.
    Recurrent/Inverted vs Single/Direct: Δlogit = 0.157, Δp = 2.7%, p = 0.506, BH q = 0.608.
    Recurrent/Direct vs Single/Direct: Δlogit = -0.031, Δp = -0.6%, p = 0.909, BH q = 0.909.
  Adjusted model: logLik = -2.008e+05, null deviance = 2.377e+05, residual deviance = 2.091e+05, pseudo-R² = 0.121.
  Adjusted model: standardized marginal means (equal inversion weight):
    Single/Inverted: p̂ = 99.0044% (95% CI 90.1197–99.9078%).
    Single/Direct: p̂ = 80.3418% (95% CI 56.8228–92.6964%).
    Recurrent/Direct: p̂ = 77.1761% (95% CI 55.4729–90.1746%).
    Recurrent/Inverted: p̂ = 72.5739% (95% CI 53.2933–85.9881%).
  Adjusted model: pairwise contrasts (BH-FDR):
    Recurrent/Direct vs Single/Inverted: Δlogit = -3.381, Δp = -21.8%, p = 4.935e-03, BH q = 0.015.
    Recurrent/Inverted vs Single/Inverted: Δlogit = -3.626, Δp = -26.4%, p = 2.529e-03, BH q = 0.015.
    Single/Direct vs Single/Inverted: Δlogit = -3.192, Δp = -18.7%, p = 7.776e-03, BH q = 0.016.
    Recurrent/Direct vs Recurrent/Inverted: Δlogit = 0.245, Δp = 4.6%, p = 0.134, BH q = 0.160.
    Recurrent/Inverted vs Single/Direct: Δlogit = -0.435, Δp = -7.8%, p = 0.123, BH q = 0.160.
    Recurrent/Direct vs Single/Direct: Δlogit = -0.190, Δp = -3.2%, p = 0.508, BH q = 0.508.

DIFFERENTIATION
Differentiation between orientations (Hudson's FST):
  Single-event: median FST = 0.257 (n = 27).
  Recurrent: median FST = 0.085 (n = 32).
  Mann–Whitney U test (single-event vs recurrent): U = 617.000, p = 4.999e-03.
  Highly differentiated loci: 25 with FST > 0.2 and 10 with FST > 0.5.

BREAKPOINT FRF
Breakpoint enrichment (Flat–Ramp–Flat Model):
  [Descriptive Levels] Raw FST averages (Unweighted):
    Single-event (n=14): Edge=0.501, Middle=0.458.
    Recurrent (n=25): Edge=0.127, Middle=0.167.

  [Unweighted Delta Analysis]
    Single-event mean delta: 0.043.
    Recurrent mean delta: -0.040.
    Diff-of-diffs (Single - Recurrent): 0.083.
    Energy Test p-value (Single > Recurrent): 6.800e-03.

  [Precision-Weighted Meta-Analysis]
    Weighted Median Delta: Single=0.176, Recurrent=-0.028, Diff=0.205.
    Median P-value (Two-sided): 1.3500e-06.
    Weighted Mean Delta:   Single=0.067, Recurrent=-0.024, Diff=0.091.
    Mean P-value (Two-sided):   0.0113.

IMPUTATION
Imputation performance summary:
  Models evaluated: 158; models with r² > 0.3 and BH p < 0.05: 30.
  Models flagged for downstream PheWAS (Use == True): 30.

PHEWAS SCALE
PheWAS scale summary:
  Unique phenotypes tested: 1089.
  Case counts span 1002 to 137692; controls span 182133–368254.
  Phenotype coverage per inversion (top 5): chr10-79542902-INV-674513: 1089, chr12-46897663-INV-16289: 1089, chr17-45585160-INV-706887: 1089, chr4-33098029-INV-7075: 1089, chr6-141867315-INV-29159: 1089; ...
  Inversions with ≥1 BH-significant phenotype: 4 of 6.

KEY ASSOCIATIONS
Selected inversion–phenotype associations (logistic regression with LRT p-values):
  Available source tables: all_pop_phewas_tag.tsv, phewas_results.tsv.
  [MAIN IMPUTED] chr10-79542902-INV-674513 vs Positive DNA test for high-risk HPV types: OR = 1.241 (95% CI 1.114–1.382), BH-adjusted p ≈ 0.032 (raw p = 1.144e-04).
    Interaction (Ancestry × Dosage): p = 0.074.
  [MAIN IMPUTED] chr6-141867315-INV-29159 vs Laryngitis and tracheitis: OR = 0.572 (95% CI 0.491–0.751), BH-adjusted p ≈ 0.041 (raw p = 2.193e-04).
    Interaction (Ancestry × Dosage): p = 5.670e-05.
    [AFR] p = 7.340e-05, OR = 0.518 (95% CI 0.451–0.689).
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Conjunctivitis: OR = 1.147 (95% CI 1.091–1.205), BH-adjusted p ≈ 1.970e-04 (raw p = 9.630e-08).
    Interaction (Ancestry × Dosage): p = 0.813.
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Acne: OR = 1.158 (95% CI 1.090–1.231), BH-adjusted p ≈ 2.225e-03 (raw p = 2.900e-06).
    Interaction (Ancestry × Dosage): p = 0.840.
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Epidermal thickening: OR = 1.111 (95% CI 1.060–1.128), BH-adjusted p ≈ 0.029 (raw p = 9.110e-05).
    Interaction (Ancestry × Dosage): p = 0.800.
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Inflammation of the eye: OR = 1.118 (95% CI 1.070–1.169), BH-adjusted p ≈ 8.678e-04 (raw p = 7.070e-07).
    Interaction (Ancestry × Dosage): p = 0.778.
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Migraine: OR = 1.086 (95% CI 1.044–1.103), BH-adjusted p ≈ 0.040 (raw p = 1.717e-04).
    Interaction (Ancestry × Dosage): p = 0.020.
  [MAIN IMPUTED] chr12-46897663-INV-16289 vs Disorder of nervous system: OR = 1.168 (95% CI 1.095–1.184), BH-adjusted p ≈ 0.018 (raw p = 5.090e-05).
    Interaction (Ancestry × Dosage): p = 0.690.
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Morbid obesity (Main Imputed): OR = 1.078 (95% CI 1.043–1.113), BH-adjusted p ≈ 4.138e-03 (raw p = 7.490e-06).
    Interaction (Ancestry × Dosage): p = 2.748e-03.
    [EUR] p = 5.607e-04, OR = 1.069 (95% CI 1.032–1.080).
    [AFR] p = 4.138e-04, OR = 1.228 (95% CI 1.097–1.352).
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Breast lump or abnormal exam (Main Imputed): OR = 0.929 (95% CI 0.928–0.951), BH-adjusted p ≈ 2.703e-03 (raw p = 4.400e-06).
    Interaction (Ancestry × Dosage): p = 0.025.
    [EUR] p = 1.140e-05, OR = 0.924 (95% CI 0.923–0.949).
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Abnormal mammogram (Main Imputed): OR = 0.906 (95% CI 0.897–0.940), BH-adjusted p ≈ 7.722e-03 (raw p = 1.640e-05).
    Interaction (Ancestry × Dosage): p = 0.023.
    [EUR] p = 5.790e-06, OR = 0.890 (95% CI 0.887–0.924).
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Mild cognitive impairment (Main Imputed): OR = 0.856 (95% CI 0.824–0.922), BH-adjusted p ≈ 0.040 (raw p = 1.707e-04).
    Interaction (Ancestry × Dosage): p = 0.013.
    [EUR] p = 4.998e-04, OR = 0.854 (95% CI 0.786–0.925).
    [AMR] p = 0.012, OR = 0.736 (95% CI 0.564–0.944).
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Abnormal Papanicolaou smear: OR = 0.898 (95% CI 0.879–0.943), BH-adjusted p ≈ 0.032 (raw p = 1.094e-04).
    Interaction (Ancestry × Dosage): p = 0.174.
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Melanocytic nevi: OR = 0.898 (95% CI 0.870–0.928), BH-adjusted p ≈ 3.480e-07 (raw p = 5.670e-11).
    Interaction (Ancestry × Dosage): p = 5.670e-05.
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Benign neoplasm of the skin: OR = 0.919 (95% CI 0.895–0.944), BH-adjusted p ≈ 2.970e-06 (raw p = 9.680e-10).
    Interaction (Ancestry × Dosage): p = 0.010.
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Diastolic Heart Failure: OR = 1.116 (95% CI 1.061–1.128), BH-adjusted p ≈ 0.040 (raw p = 1.778e-04).
    Interaction (Ancestry × Dosage): p = 0.414.
  [MAIN IMPUTED] chr17-45585160-INV-706887 vs Breast Cancer (Malignant neoplasm): OR = 0.901 (95% CI 0.880–0.949), BH-adjusted p ≈ 0.046 (raw p = 2.989e-04).
    Interaction (Ancestry × Dosage): p = 0.127.
  [TAG SNP] chr17-45974480-INV-29218 vs Morbid obesity (Tag SNP): OR = 1.054 (95% CI 1.031–1.078), BH-adjusted p ≈ 8.151e-04 (raw p = 3.650e-06).
  [TAG SNP] chr17-45974480-INV-29218 vs Breast lump or abnormal exam (Tag SNP): OR = 0.956 (95% CI 0.936–0.977), BH-adjusted p ≈ 6.375e-03 (raw p = 4.280e-05).
  [TAG SNP] chr17-45974480-INV-29218 vs Abnormal mammogram (Tag SNP): OR = 0.939 (95% CI 0.910–0.969), BH-adjusted p ≈ 7.326e-03 (raw p = 6.870e-05).
  [TAG SNP] chr17-45974480-INV-29218 vs Mild cognitive impairment (Tag SNP): OR = 0.903 (95% CI 0.853–0.956), BH-adjusted p ≈ 0.017 (raw p = 3.708e-04).

CATEGORY TESTS
Phecode category omnibus and directional tests:
  chr12-46897663-INV-16289: Gastrointestinal (Increased risk): GBJ q = 8.000e-05 (p = 2.000e-05), GLS q = 5.813e-04 (p = 9.320e-05); Genitourinary (Increased risk): GBJ q = 8.000e-05 (p = 2.000e-05), GLS q = 5.813e-04 (p = 1.817e-04); Neoplasms (Increased risk): GBJ q = 8.000e-05 (p = 2.000e-05), GLS q = 5.813e-04 (p = 1.500e-04); Dermatological (Increased risk): GBJ q = 8.000e-05 (p = 2.000e-05), GLS q = 3.860e-05 (p = 2.410e-06); Symptoms (Increased risk): GBJ q = 2.743e-04 (p = 8.570e-05), GLS q = 5.813e-04 (p = 1.390e-04); Sense organs (Increased risk): GBJ q = 3.048e-04 (p = 1.143e-04), GLS q = 0.019 (p = 9.060e-03); Muscloskeletal (Increased risk): GBJ q = 4.571e-04 (p = 2.000e-04), GLS q = 0.081 (p = 0.057); Endocrine/Metab (Increased risk): GBJ q = 2.844e-03 (p = 1.600e-03), GLS q = 4.501e-03 (p = 1.688e-03); Respiratory (Increased risk): GBJ q = 2.844e-03 (p = 1.600e-03), GLS q = 0.019 (p = 9.401e-03); Neurological (Increased risk): GBJ q = 0.020 (p = 0.012), GLS q = 0.353 (p = 0.308)
  chr17-45585160-INV-706887: Symptoms (Decreased risk): GBJ q = 1.067e-04 (p = 2.000e-05), GLS q = 1.791e-03 (p = 2.239e-04); Neoplasms (Decreased risk): GBJ q = 1.067e-04 (p = 2.000e-05), GLS q = 9.272e-04 (p = 5.800e-05); Dermatological (Decreased risk): GBJ q = 1.067e-04 (p = 2.000e-05), GLS q = 7.362e-03 (p = 1.380e-03); Gastrointestinal (Decreased risk): GBJ q = 1.280e-03 (p = 3.999e-04), GLS q = 0.033 (p = 9.044e-03); Neurological (Decreased risk): GBJ q = 1.280e-03 (p = 3.999e-04), GLS q = 0.137 (p = 0.068); Endocrine/Metab (Decreased risk): GBJ q = 1.600e-03 (p = 5.999e-04), GLS q = 0.156 (p = 0.107); Respiratory (Decreased risk): GBJ q = 1.828e-03 (p = 7.998e-04), GLS q = 0.101 (p = 0.044); Sense organs (Decreased risk): GBJ q = 5.999e-03 (p = 2.999e-03), GLS q = 0.228 (p = 0.171); Muscloskeletal (Decreased risk): GBJ q = 8.176e-03 (p = 4.599e-03), GLS q = 0.089 (p = 0.033); Cardiovascular (Decreased risk): GBJ q = 0.021 (p = 0.013), GLS q = 0.703 (p = 0.615); Blood/Immune (Decreased risk): GBJ q = 0.247 (p = 0.170), GLS q = 0.033 (p = 0.010)

PGS CONTROLS
[PGS CONTROL] Sensitivity of PheWAS associations to regional PGS covariates:
  Source table: PGS_controls.tsv.
  Largest p-value inflation: inversion chr17-45585160-INV-706887 × Morbid_obesity (p_nominal = 7.940e-09, p_with_pgs = 8.476e-03, fold-change = 1.068e+06).
  Specific disease statistics:
    Morbid_obesity: p_nominal = 7.940e-09 -> p_with_pgs = 8.476e-03 (fold-change = 1.068e+06)
    Diastolic_heart_failure: p_nominal = 3.820e-05 -> p_with_pgs = 0.038 (fold-change = 997.523)
    Obesity: p_nominal = 1.240e-06 -> p_with_pgs = 5.093e-04 (fold-change = 410.744)
    Overweight_and_obesity: p_nominal = 9.660e-07 -> p_with_pgs = 3.265e-04 (fold-change = 337.975)
    Mild_cognitive_impairment: p_nominal = 2.087e-04 -> p_with_pgs = 0.012 (fold-change = 58.628)
    Malignant_neoplasm_of_the_breast: p_nominal = 3.666e-03 -> p_with_pgs = 0.095 (fold-change = 25.843)
    Alzheimers_disease: p_nominal = 0.415 -> p_with_pgs = 0.743 (fold-change = 1.793)
    Lump_or_mass_in_breast_or_nonspecific_abnormal_breast_exam: p_nominal = 1.151e-04 -> p_with_pgs = 6.380e-05 (fold-change = 0.554)

FAMILY HISTORY
Family History Validation (Family-based PheWAS):
  [FAMILY FOLLOW-UP] Breast Cancer: OR = 0.914 (95% CI 0.862–0.968), p = 2.314e-03.
  [FAMILY FOLLOW-UP] Obesity: OR = 1.098 (95% CI 1.041–1.159), p = 5.796e-04.
  [FAMILY FOLLOW-UP] Heart Failure: OR = 1.043 (95% CI 0.984–1.106), p = 0.154.
  [FAMILY FOLLOW-UP] Cognitive Impairment: OR = 0.922 (95% CI 0.869–0.978), p = 6.748e-03.

SELECTION
Allele frequency trajectory summary (12_47296118_A_G):
  Windows analyzed: 101 spanning 0–1e+04 years before present.
  Observed allele-frequency ranges 0.019–0.090; net change from 1e+04 to 0 years BP is 0.071.
  Median haploid sample size per window ≈ 1e+03 alleles.
  Largest ~1,000-year change: Δf = 0.038934894346088 between 4500 and 5500 years BP.
