Case 977

The cousins shared an eighth and the risk was four times

the_cousins_shared_an_eighth_and_the_risk_was_four_times.eml - Two first cousins planning a child reason that cousins share only one gene in eight by descent, that the other seven in eight are as unrelated as any couple's, and that the extra risk of a recessive condition must therefore be about an eighth. What sharing grandparents does to that risk is computed below.

ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-23

EML

eml
# Self-authored for the EML case corpus (no external origin). Two first cousins
# planning a child reason that cousins share only one gene in eight by descent,
# that the other seven in eight are as unrelated as any couple's, and that the
# extra risk of a recessive condition must therefore be about an eighth. What
# sharing grandparents does to that risk is computed below.
#
# The reasoning is careful. First cousins really do share one gene in eight by
# descent; the rest really are unrelated; the condition they have in mind really
# is rare, its gene one copy in 50; and the intent is exactly 'how much does
# being cousins add'.
#
# A recessive condition needs two copies of the same rare gene. For unrelated
# parents both copies must arrive by two independent rare draws, 400 per
# million. Shared grandparents open a second route: with chance one in 16 the
# child's two copies are both copies of one grandparent's gene, and that route
# needs only one rare draw. It adds 1225 per million - four times the risk, not
# an eighth more - and the rarer the gene, the bigger the multiple: at one copy
# in 500 it is thirty-two times.

50 => gene_copies_per_variant_copy
8 => cousins_share_one_gene_in
16 => both_copies_from_one_grandparent_one_time_in
500 => gene_copies_per_variant_copy_for_a_rarer_gene

int(1000000 / (gene_copies_per_variant_copy * gene_copies_per_variant_copy)) => risk_unrelated_parents_per_million
int(1000000 * (gene_copies_per_variant_copy - 1) / (both_copies_from_one_grandparent_one_time_in * gene_copies_per_variant_copy * gene_copies_per_variant_copy)) => risk_the_shared_grandparents_add_per_million
risk_unrelated_parents_per_million + risk_the_shared_grandparents_add_per_million => risk_cousin_parents_per_million
int(risk_cousin_parents_per_million * 100 / risk_unrelated_parents_per_million) => cousins_vs_unrelated_per_hundred
int(risk_unrelated_parents_per_million * (cousins_share_one_gene_in + 1) / cousins_share_one_gene_in) => risk_read_as_an_eighth_more_per_million
int(1000000 / (gene_copies_per_variant_copy_for_a_rarer_gene * gene_copies_per_variant_copy_for_a_rarer_gene)) => rarer_gene_risk_unrelated_per_million
int(1000000 * (gene_copies_per_variant_copy_for_a_rarer_gene - 1) / (both_copies_from_one_grandparent_one_time_in * gene_copies_per_variant_copy_for_a_rarer_gene * gene_copies_per_variant_copy_for_a_rarer_gene)) => rarer_gene_risk_the_grandparents_add_per_million
rarer_gene_risk_unrelated_per_million + rarer_gene_risk_the_grandparents_add_per_million => rarer_gene_risk_cousins_per_million
int(rarer_gene_risk_cousins_per_million * 100 / rarer_gene_risk_unrelated_per_million) => rarer_gene_cousins_vs_unrelated_per_hundred

"gene                            : one copy in " + str(gene_copies_per_variant_copy) + " is the variant" ^0
"first cousins share             : one gene in " + str(cousins_share_one_gene_in) + " by descent" ^0
"their child, both copies from one grandparent : one time in " + str(both_copies_from_one_grandparent_one_time_in) ^0
"" ^0
"risk, unrelated parents         : " + str(risk_unrelated_parents_per_million) + " per million" ^0
"risk the shared grandparents add : " + str(risk_the_shared_grandparents_add_per_million) + " per million" ^0
"risk, cousin parents            : " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of the unrelated risk" ^0
"risk, read as an eighth more    : " + str(risk_read_as_an_eighth_more_per_million) + " per million" ^0
"" ^0
"a rarer gene, one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene) + "     : unrelated " + str(rarer_gene_risk_unrelated_per_million) + ", cousins " + str(rarer_gene_risk_cousins_per_million) + " per million, " + str(rarer_gene_cousins_vs_unrelated_per_hundred) + " per hundred" ^0
"" ^0

# ---- what the cousins verified ----

"the one-in-eight reasoning" ^0
"  shared by descent : one gene in " + str(cousins_share_one_gene_in) ^0
"  the rest : as unrelated as any couple's" ^0
"  the condition : recessive, its gene one copy in " + str(gene_copies_per_variant_copy) ^0
"  intent : how much does being cousins add" ^0
"  facts wrong : 0" ^0
"  verdict : AN EIGHTH SHARED IS ABOUT AN EIGHTH MORE RISK" ^0
"" ^0
"  knowing exactly how much first cousins share is the part done" ^0
"  right here, and it is why one in " + str(cousins_share_one_gene_in) + " is the true figure for their" ^0
"  shared genes" ^0
"" ^0

# ---- what shared grandparents do ----

"two routes to two copies" ^0
"  what the condition needs : two copies of the same rare gene" ^0
"  unrelated parents : each copy is a separate rare draw, one in" ^0
"    " + str(gene_copies_per_variant_copy) + " times one in " + str(gene_copies_per_variant_copy) + ", " + str(risk_unrelated_parents_per_million) + " per million" ^0
"  cousin parents : that route, plus one more - both copies" ^0
"    descended from the same grandparent, one time in " + str(both_copies_from_one_grandparent_one_time_in) ^0
"  why the second route is so strong : it needs only one rare" ^0
"    draw, the grandparent's, and adds " + str(risk_the_shared_grandparents_add_per_million) + " per million" ^0
"  what the eighth measured : how many genes they share, not how" ^0
"    much sharing multiplies a rare pairing" ^0
"  a rarer gene : the unrelated route shrinks with the square, the" ^0
"    shared route only with the gene, " + str(rarer_gene_cousins_vs_unrelated_per_hundred) + " per hundred at one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene) ^0
"" ^0

# ---- what the cousins got ----

"the risk" ^0
"  believed : about an eighth more, " + str(risk_read_as_an_eighth_more_per_million) + " per million" ^0
"  actual : " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of the unrelated risk" ^0
"  in plain size : still under two in a thousand" ^0
"  is the one-in-eight wrong : no; it is what cousins share" ^0
"  does sharing an eighth add an eighth : no; for a rare" ^0
"    recessive gene it multiplies the risk" ^0
"" ^0

# ---- null control ----

# The same risk worked out through the shared grandparents instead of scaled up
# by the eighth that cousins share.
450 => nc_risk_read_as_an_eighth_more_per_million
1625 => nc_risk_through_the_shared_grandparents_per_million
1175 => nc_per_million_the_shared_route_adds

"null control - count the route through the shared grandparents" ^0
"  risk, read as an eighth more : " + str(nc_risk_read_as_an_eighth_more_per_million) + " per million" ^0
"  risk, through the shared grandparents : " + str(nc_risk_through_the_shared_grandparents_per_million) + " per million" ^0
"  per million the shared route adds : " + str(nc_per_million_the_shared_route_adds) ^0
"  no couple and no gene changed; the second way to receive two" ^0
"  copies was counted" ^0
"" ^0

# ---- the rule ----

"what sharing one gene in eight guarantees" ^0
"  seven in eight of their genes are not shared by descent : exactly" ^0
"  the child's risk rises by about an eighth : not addressed; the" ^0
"    shared grandparents can supply both copies, one time in " + str(both_copies_from_one_grandparent_one_time_in) + "," ^0
"    and for a gene at one copy in " + str(gene_copies_per_variant_copy) + " that takes the risk from " + str(risk_unrelated_parents_per_million) ^0
"    to " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of it" ^0
"" ^0

"a small overlap can carry a large share of a rare event; what matters is not" ^0
"how much is shared but whether the rare thing needs the sharing to happen" ^0
"" ^0

"First cousins share one gene in " + str(cousins_share_one_gene_in) + " - exactly. But a recessive condition needs" ^0
"two copies, and shared grandparents supply both one time in " + str(both_copies_from_one_grandparent_one_time_in) + ", so for a gene" ^0
"at one copy in " + str(gene_copies_per_variant_copy) + " the risk goes from " + str(risk_unrelated_parents_per_million) + " to " + str(risk_cousin_parents_per_million) + " per million, four times, and for one" ^0
"at one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene) + " thirty-two times, until the risk is counted by its routes and not by the overlap." ^0

Python (deterministic transpilation)

python
gene_copies_per_variant_copy = 50
cousins_share_one_gene_in = 8
both_copies_from_one_grandparent_one_time_in = 16
gene_copies_per_variant_copy_for_a_rarer_gene = 500
risk_unrelated_parents_per_million = int(1000000 / (gene_copies_per_variant_copy * gene_copies_per_variant_copy))
risk_the_shared_grandparents_add_per_million = int(1000000 * (gene_copies_per_variant_copy - 1) / (both_copies_from_one_grandparent_one_time_in * gene_copies_per_variant_copy * gene_copies_per_variant_copy))
risk_cousin_parents_per_million = risk_unrelated_parents_per_million + risk_the_shared_grandparents_add_per_million
cousins_vs_unrelated_per_hundred = int(risk_cousin_parents_per_million * 100 / risk_unrelated_parents_per_million)
risk_read_as_an_eighth_more_per_million = int(risk_unrelated_parents_per_million * (cousins_share_one_gene_in + 1) / cousins_share_one_gene_in)
rarer_gene_risk_unrelated_per_million = int(1000000 / (gene_copies_per_variant_copy_for_a_rarer_gene * gene_copies_per_variant_copy_for_a_rarer_gene))
rarer_gene_risk_the_grandparents_add_per_million = int(1000000 * (gene_copies_per_variant_copy_for_a_rarer_gene - 1) / (both_copies_from_one_grandparent_one_time_in * gene_copies_per_variant_copy_for_a_rarer_gene * gene_copies_per_variant_copy_for_a_rarer_gene))
rarer_gene_risk_cousins_per_million = rarer_gene_risk_unrelated_per_million + rarer_gene_risk_the_grandparents_add_per_million
rarer_gene_cousins_vs_unrelated_per_hundred = int(rarer_gene_risk_cousins_per_million * 100 / rarer_gene_risk_unrelated_per_million)
print("gene                            : one copy in " + str(gene_copies_per_variant_copy) + " is the variant")
print("first cousins share             : one gene in " + str(cousins_share_one_gene_in) + " by descent")
print("their child, both copies from one grandparent : one time in " + str(both_copies_from_one_grandparent_one_time_in))
print("")
print("risk, unrelated parents         : " + str(risk_unrelated_parents_per_million) + " per million")
print("risk the shared grandparents add : " + str(risk_the_shared_grandparents_add_per_million) + " per million")
print("risk, cousin parents            : " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of the unrelated risk")
print("risk, read as an eighth more    : " + str(risk_read_as_an_eighth_more_per_million) + " per million")
print("")
print("a rarer gene, one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene) + "     : unrelated " + str(rarer_gene_risk_unrelated_per_million) + ", cousins " + str(rarer_gene_risk_cousins_per_million) + " per million, " + str(rarer_gene_cousins_vs_unrelated_per_hundred) + " per hundred")
print("")
print("the one-in-eight reasoning")
print("  shared by descent : one gene in " + str(cousins_share_one_gene_in))
print("  the rest : as unrelated as any couple's")
print("  the condition : recessive, its gene one copy in " + str(gene_copies_per_variant_copy))
print("  intent : how much does being cousins add")
print("  facts wrong : 0")
print("  verdict : AN EIGHTH SHARED IS ABOUT AN EIGHTH MORE RISK")
print("")
print("  knowing exactly how much first cousins share is the part done")
print("  right here, and it is why one in " + str(cousins_share_one_gene_in) + " is the true figure for their")
print("  shared genes")
print("")
print("two routes to two copies")
print("  what the condition needs : two copies of the same rare gene")
print("  unrelated parents : each copy is a separate rare draw, one in")
print("    " + str(gene_copies_per_variant_copy) + " times one in " + str(gene_copies_per_variant_copy) + ", " + str(risk_unrelated_parents_per_million) + " per million")
print("  cousin parents : that route, plus one more - both copies")
print("    descended from the same grandparent, one time in " + str(both_copies_from_one_grandparent_one_time_in))
print("  why the second route is so strong : it needs only one rare")
print("    draw, the grandparent's, and adds " + str(risk_the_shared_grandparents_add_per_million) + " per million")
print("  what the eighth measured : how many genes they share, not how")
print("    much sharing multiplies a rare pairing")
print("  a rarer gene : the unrelated route shrinks with the square, the")
print("    shared route only with the gene, " + str(rarer_gene_cousins_vs_unrelated_per_hundred) + " per hundred at one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene))
print("")
print("the risk")
print("  believed : about an eighth more, " + str(risk_read_as_an_eighth_more_per_million) + " per million")
print("  actual : " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of the unrelated risk")
print("  in plain size : still under two in a thousand")
print("  is the one-in-eight wrong : no; it is what cousins share")
print("  does sharing an eighth add an eighth : no; for a rare")
print("    recessive gene it multiplies the risk")
print("")
nc_risk_read_as_an_eighth_more_per_million = 450
nc_risk_through_the_shared_grandparents_per_million = 1625
nc_per_million_the_shared_route_adds = 1175
print("null control - count the route through the shared grandparents")
print("  risk, read as an eighth more : " + str(nc_risk_read_as_an_eighth_more_per_million) + " per million")
print("  risk, through the shared grandparents : " + str(nc_risk_through_the_shared_grandparents_per_million) + " per million")
print("  per million the shared route adds : " + str(nc_per_million_the_shared_route_adds))
print("  no couple and no gene changed; the second way to receive two")
print("  copies was counted")
print("")
print("what sharing one gene in eight guarantees")
print("  seven in eight of their genes are not shared by descent : exactly")
print("  the child's risk rises by about an eighth : not addressed; the")
print("    shared grandparents can supply both copies, one time in " + str(both_copies_from_one_grandparent_one_time_in) + ",")
print("    and for a gene at one copy in " + str(gene_copies_per_variant_copy) + " that takes the risk from " + str(risk_unrelated_parents_per_million))
print("    to " + str(risk_cousin_parents_per_million) + " per million, " + str(cousins_vs_unrelated_per_hundred) + " per hundred of it")
print("")
print("a small overlap can carry a large share of a rare event; what matters is not")
print("how much is shared but whether the rare thing needs the sharing to happen")
print("")
print("First cousins share one gene in " + str(cousins_share_one_gene_in) + " - exactly. But a recessive condition needs")
print("two copies, and shared grandparents supply both one time in " + str(both_copies_from_one_grandparent_one_time_in) + ", so for a gene")
print("at one copy in " + str(gene_copies_per_variant_copy) + " the risk goes from " + str(risk_unrelated_parents_per_million) + " to " + str(risk_cousin_parents_per_million) + " per million, four times, and for one")
print("at one copy in " + str(gene_copies_per_variant_copy_for_a_rarer_gene) + " thirty-two times, until the risk is counted by its routes and not by the overlap.")

stdout (executed)

text
gene                            : one copy in 50 is the variant
first cousins share             : one gene in 8 by descent
their child, both copies from one grandparent : one time in 16

risk, unrelated parents         : 400 per million
risk the shared grandparents add : 1225 per million
risk, cousin parents            : 1625 per million, 406 per hundred of the unrelated risk
risk, read as an eighth more    : 450 per million

a rarer gene, one copy in 500     : unrelated 4, cousins 128 per million, 3200 per hundred

the one-in-eight reasoning
  shared by descent : one gene in 8
  the rest : as unrelated as any couple's
  the condition : recessive, its gene one copy in 50
  intent : how much does being cousins add
  facts wrong : 0
  verdict : AN EIGHTH SHARED IS ABOUT AN EIGHTH MORE RISK

  knowing exactly how much first cousins share is the part done
  right here, and it is why one in 8 is the true figure for their
  shared genes

two routes to two copies
  what the condition needs : two copies of the same rare gene
  unrelated parents : each copy is a separate rare draw, one in
    50 times one in 50, 400 per million
  cousin parents : that route, plus one more - both copies
    descended from the same grandparent, one time in 16
  why the second route is so strong : it needs only one rare
    draw, the grandparent's, and adds 1225 per million
  what the eighth measured : how many genes they share, not how
    much sharing multiplies a rare pairing
  a rarer gene : the unrelated route shrinks with the square, the
    shared route only with the gene, 3200 per hundred at one copy in 500

the risk
  believed : about an eighth more, 450 per million
  actual : 1625 per million, 406 per hundred of the unrelated risk
  in plain size : still under two in a thousand
  is the one-in-eight wrong : no; it is what cousins share
  does sharing an eighth add an eighth : no; for a rare
    recessive gene it multiplies the risk

null control - count the route through the shared grandparents
  risk, read as an eighth more : 450 per million
  risk, through the shared grandparents : 1625 per million
  per million the shared route adds : 1175
  no couple and no gene changed; the second way to receive two
  copies was counted

what sharing one gene in eight guarantees
  seven in eight of their genes are not shared by descent : exactly
  the child's risk rises by about an eighth : not addressed; the
    shared grandparents can supply both copies, one time in 16,
    and for a gene at one copy in 50 that takes the risk from 400
    to 1625 per million, 406 per hundred of it

a small overlap can carry a large share of a rare event; what matters is not
how much is shared but whether the rare thing needs the sharing to happen

First cousins share one gene in 8 - exactly. But a recessive condition needs
two copies, and shared grandparents supply both one time in 16, so for a gene
at one copy in 50 the risk goes from 400 to 1625 per million, four times, and for one
at one copy in 500 thirty-two times, until the risk is counted by its routes and not by the overlap.

Trace event types

eml:run:starteml:assigneml:outputeml:run:done