LIVE cartercole.net --:--:-- UTC

// 04 RESTRICTED

opensourcegenome

PYTHON SQLITE GRAPHQL ACCESS RESTRICTED

Open-source genome reports in the style of Promethease, and the start of a "DNA with friends" network. Raw files from 23andMe, AncestryDNA, FamilyTreeDNA, MyHeritage or LivingDNA, or a VCF, all land in one representation, and everything downstream reads that: a self-contained HTML report against ClinVar and SNPedia, gene-allele calls such as APOE, kinship and shared segments between relatives, Mendelian checks on trios, and association scans over traits people report themselves.

One byte per genotype

Every locus is a row in a shared site catalog, and a person is a zlib-compressed blob with one byte per site: two 3-bit alleles (A, C, G, T, deletion, insertion, other), a phased bit and an imputed bit. Alleles are plus strand and unphased pairs are stored sorted, so the same genotype is always the same byte. A chip file keyed by rsID and a VCF keyed by position land on the same sites: one simulated person imported both ways compares as the same person, kinship 0.49.

The reference side is ClinVar, NCBI Gene and RefSeq on GRCh37, 1000 Genomes allele frequencies by super-population, and SNPedia, whose multi-SNP genosets are evaluated in SNPedia's own criteria language (and, or, atleast, atmost). The report is one HTML file that needs no network to open.

Relatives

Kinship is the KING-robust estimator, which needs no allele frequencies and so holds up across ancestries. Shared segments are half-identical regions, stretches with no opposite homozygotes, of at least 7 cM on the HapMap genetic map, plus fully identical regions, the sibling signature. A single mismatch counts as a genotyping error unless another follows within 40 sites.

The test is a simulated ten-person, three-generation family: founders drawn from 1000 Genomes frequencies, children made by placing crossovers along the genetic map, 0.1% genotyping error added.

Traits and the API

A phenotype is binary or quantitative. Binary traits get the Cochran-Armitage trend test and quantitative ones least squares on allele dosage, in pure Python; export-plink writes .bed/.bim/.fam for plink2 or regenie when a cohort outgrows that. osg serve puts all of it behind a Relay-style GraphQL API: accounts, friend requests, genome upload, comparisons, phenotypes, and GWAS that returns aggregate statistics only. Resolvers enforce privacy: you can see and compare only your own samples and those of accepted friends.

Stated honestly