--- license: cc-by-4.0 task_categories: - feature-extraction - text-classification tags: - biology - genomics - dna - cancer - bioinformatics - binary-encoding - knot-theory pretty_name: Bitwise Genome Datasets size_categories: - 10K TP53.bw # Count mutations between sequences bw count ref.fasta tumor.fasta # Compression stats bw stats datasets/cancer-genes/fasta/BRCA1.fasta ``` ### With WASM (JavaScript/TypeScript) ```typescript import { pack_bases, search_packed, mutation_count } from 'bitwise'; const packed = pack_bases(new TextEncoder().encode('ATGCTAGCATGC')); const needle = pack_bases(new TextEncoder().encode('TAGC')); const matches = search_packed(packed, 12, needle, 4); // matches = [4] -- found TAGC at position 4 ``` ## Theory Every dataset is backed by mechanized Lean 4 theorems (zero sorry): - `dna_is_folded_knot`: DNA IS a folded knot (PsycheGrindExtended Pass 17) - `two_bit_four_per_byte`: 4 bases per byte by construction (Pass 39) - `word_parallel_speedup`: 32x search speedup (Pass 39) - `xor_detects_mutations`: XOR = mutation detection (Pass 39) - `noncoding_is_void`: non-coding DNA IS the void boundary (Pass 43) - `junk_not_junk`: "junk" DNA carries MORE information (Pass 43) - `sigma_monotone_with_age`: σ IS a molecular clock (GenomicVoidArchaeology) - `unwinding_theorem`: history reconstructible from void (GenomicVoidArchaeology) 402 theorems total. The math proves the encoding. The encoding enables the search. The search reveals the biology. ## Source All sequences from NCBI RefSeq (public domain). Fetched via E-utilities API. Reproducible via `scripts/fetch-and-convert.sh`. ## Related - [helix.repair](https://helix.repair) -- DNA topology search engine - [Aunt Sandy](https://github.com/forkjoin-ai/aunt-sandy) -- Cancer genomics via Buleyean probability - [Gnosis](https://github.com/forkjoin-ai/gnosis) -- Formal verification engine (402 Lean theorems) ## License Data: CC-BY-4.0 (sequences are public domain from NCBI) Code: MPL-2.0 ## hg38 -- Full Human Reference Genome **2.9GB FASTA → 736MB Bitwise binary. 25 chromosomes.** | Chromosome | Bases | Bitwise Size | |------------|-------|-------------| | chr1 | 248,956,422 | 59 MB | | chr2 | 242,193,529 | 58 MB | | chr3 | 198,295,559 | 47 MB | | chr4 | 190,214,555 | 45 MB | | chr5 | 181,538,259 | 43 MB | | chr6 | 170,805,979 | 41 MB | | chr7 | 159,345,973 | 38 MB | | chr8 | 145,138,636 | 35 MB | | chr9 | 138,394,717 | 33 MB | | chr10 | 133,797,422 | 32 MB | | chr11 | 135,086,622 | 32 MB | | chr12 | 133,275,309 | 32 MB | | chr13 | 114,364,328 | 27 MB | | chr14 | 107,043,718 | 26 MB | | chr15 | 101,991,189 | 24 MB | | chr16 | 90,338,345 | 22 MB | | chr17 | 83,257,441 | 20 MB | | chr18 | 80,373,285 | 19 MB | | chr19 | 58,617,616 | 14 MB | | chr20 | 64,444,167 | 15 MB | | chr21 | 46,709,983 | 11 MB | | chr22 | 50,818,468 | 12 MB | | chrX | 156,040,895 | 37 MB | | chrY | 57,227,415 | 14 MB | | chrM | 16,569 | 4.1 KB | **Too large for GitHub.** Reproduce locally: ```bash # Download and convert (requires ~4GB disk) bash scripts/fetch-and-convert-hg38.sh # Or use Cloud Build gcloud builds submit --config=cloudbuild-whole-genome.yaml --substitutions=_ASSEMBLY=hg38 . ``` Search speed: **90 million bases per second** on a single CPU core.