Skip to content

Genotyping array import — scope

Status: Draft scope (not yet approved for build) Date: 2026-07-29

Problem

sequencingFiles.kind has offered array-raw as a value since the genomics tables were written. No parser produces one. The genetics page accepts a VCF, a BED or a gVCF, and its own label field suggests "23andMe raw" as an example of what to name the upload — for a form that cannot read it.

Consumer genotyping exports from 23andMe, MyHeritage and AncestryDNA are the files most people actually possess. Sequencing is the minority case. The gap is the difference between a genomics feature that a reader can use and one they can only read about.

The format

Tab-separated, four columns — rsID, chromosome, position, genotype — with # comment lines carrying the vendor and build. The parsing is trivial. Everything that follows from it is not.

Property Consequence
Genotype is a pair of observed bases (AG), not a VCF GT Reference and alternate alleles are not stated anywhere in the file
Build is GRCh37 The app defaults to GRCh38; liftoverNeeded already exists for this
-- marks a no-call Position was on the chip and failed; not a variant, and not assessed either
Haploid calls are one character Y, MT, and X outside the pseudoautosomal regions in a male genome map to hemizygous, which the zygosity enum already has
The chip is a fixed panel Absence from the file says nothing about the genome
Indels are not representable See below

Reference alleles are the actual problem

The record stores GA4GH VRS Alleles, and a VRS Allele needs a reference sequence, an interval and a replacement state. A genotype of AG at a position supplies neither which base is the reference nor, therefore, which is the alternate. Vendors report on the plus strand of the reference assembly, but that fixes orientation, not identity.

This has a second and larger consequence. The overwhelming majority of the roughly 600–700k calls in such a file are homozygous reference. Writing them into variants would be several hundred thousand rows asserting that nothing is there — but the file cannot be filtered down to the non-reference calls without already knowing the reference base at each position, which is the thing it does not contain.

Resolving 650k positions against Ensembl at import is not available: the existing annotation path is capped at 40 lookups per import for good reason, and this repository does not ship a reference FASTA.

Import the panel, resolve on demand

The way out is to stop treating the file as a variant list.

An array is a fixed panel, which is to say a statement about which positions were assessed. The record already has a table for exactly that — coverage intervals, with BED semantics, populated today from explicit coverage results, displayed as how much of the genome a test actually looked at. An array manifest is that same statement at single-base resolution.

So:

  • The uploaded file is stored immutably and content-addressed, as every original is, with kind: 'array-raw'.
  • Its called positions become coverage, not variants. No-calls are excluded from coverage: the chip carried the position, the assay failed, and merging them in would claim assessment that did not happen. This is the same distinction the existing importer draws when it refuses to treat a plain variant VCF as coverage evidence.
  • Genotypes are retained against the stored file, queryable by position, without each becoming a clinical row.
  • A variants row is created only when a position is resolved — reference base known, call non-reference — which happens for the positions there is a reason to look at: the ones overlapping ClinVar, the pharmacogenomic panel, or a variant the user asks about by name.

This inverts the prior-art pipeline, which scanned the whole of ClinVar against the whole of the array and emitted every hit as a finding. Inverting it is the point: the coverage answer ("this was assessed and is reference") is the useful one for most positions, and it is available without minting a row.

Indels must be excluded, deliberately

A genotype call of two bases cannot represent an insertion or a deletion. If a ClinVar record whose reference allele is CTGCCCAAT and alternate is C is matched against an array call by position alone, a genotype of CC will appear to carry the alternate. It is a guaranteed false positive, and it will land on exactly the well-known genes people search for.

The prior-art code carries this filter with the reasoning written out beside it, and it is the single most valuable line in that workspace. Whatever performs the ClinVar overlap must skip any record where either allele is longer than one base, and must say so where a user might otherwise assume an absent finding means an absent variant.

Copy number variants are equally undetectable and equally out of reach.

What the user has to be told

An array result is not a sequencing result, and the interface must not let the two look alike once both can be imported. Two statements are load-bearing:

  • Nothing found is not nothing there. The panel covers a fraction of a percent of the genome. The coverage visualisation already makes this legible and is the reason to route the import through it.
  • A rare pathogenic call from an array is a lead, not a finding. The direction is well established even though the magnitudes quoted in the prior-art documents are uncited — see the evidence confidence gating scope, which is the mechanism for this and should ship first.

Open questions

  • Where do retained genotypes live? A table keyed by file and position is simplest but is 650k rows per import; parsing the stored original on demand keeps the record small and makes lookups slow. The originals are immutable, so a derived cache is legitimate either way.
  • Does coverageIntervals at one base per row survive a 650k-row import, or does the panel need run-length merging on the way in? mergeCoverageIntervals exists; whether adjacent chip positions should merge into intervals that imply coverage between them is a correctness question, not a performance one — they should not.
  • Vendor and chip version differ in panel content between v3, v4 and v5 exports. Is the manifest worth recording beyond the file itself?
  • Should a resolved reference base be cached per position across files, the way substances caches per substance rather than per medication?
  • AncestryDNA splits the genotype across two columns and MyHeritage quotes every field. One parser with vendor detection, or one per vendor?

Not in scope

Indel or copy number detection. Star-allele calling. Imputation of untyped positions — the record holds what was measured. Shipping a reference sequence. Any automatic whole-panel ClinVar sweep producing findings without a person asking for them.

Relationship to the other plans

Sequence after evidence confidence gating, which is what keeps the resulting thin calls from reading as diagnoses, and after population frequency and inheritance, whose frequency filter is the second line of defence against the same failure and whose inheritance data is what turns a heterozygous call into a carrier statement rather than an alarming one. Shares the ClinVar bulk provisioning question with that scope. Feeds pharmacogenomic guidelines, which is where an array genuinely performs well: the common pharmacogenomic SNPs are on the chip, well typed, and individually meaningful.