The MeAnd23W_AncestryCompSegments table holds the painted-segment side of 23andMe’s Ancestry Composition. Each row is one chromosome segment that has been assigned (“painted”) to a single population on one of the two chromosome copies. Together these segments are the raw chromosome painting that the percentages in the summary table are computed from.
This table pairs with the MeAnd23W_AncestryCompSummary table: a segment’s population_id plus threshold point back to the matching summary row, which carries that population’s label, color, and percentages. A single population at a single threshold typically owns many segment rows across the chromosomes.
| Column | Type | Description |
|---|---|---|
| Id | int (PK) | Auto-incrementing primary key |
| psid | string | The 23andMe profile ID being gathered |
| threshold | string | The confidence threshold this painting was reported at. Pairs with the summary row at the same threshold. |
| population_id | string | Identifier of the population this segment is assigned to. Joins to the summary table. |
| chromosome | string | The chromosome the segment lies on |
| haplotype | int | Which of the two chromosome copies the segment is painted on — 1 for the first haplotype, 2 for the second |
| start_bp | long | Start position of the segment, in base pairs |
| end_bp | long | End position of the segment, in base pairs |
| created_date | string | When this record was created |
Segments are produced alongside the summary rows while the Ancestry Composition population tree is being walked for a profile. For each population node, the painting for both haplotypes is read:
population_id, chromosome, the haplotype number (1 or 2), and start_bp / end_bp, all at the current threshold.psid are deleted first, then the freshly gathered rows are written, so a profile’s painting always reflects the most recent gather.population_id + threshold.