code wiki / _hdl_build / nx_bio_sequence.nx

nx_bio_sequence.nx

buildroot/runtime/_hdl_build/nx_bio_sequence.nx

7738 B205 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_bio_sequence.nx -- SOVEREIGN EXACT molecular-biology sequence engine (science-exceed arc, rung BIO-SEQUENCE; lifts the weakest domain). Exact, DETERMINISTIC DNA/RNA/protein transforms -- no float, no cloud, no license: transcribe DNA -> RNA (T -> U) translate RNA -> protein (codon table = knowledge/registry/sci_codon_table.tsv, stop-aware) revcomp DNA -> reverse complement (A<->T, C<->G, reversed) gc_count exact integer G+C count EXCEED vs Mathematica GenomeData/SequenceAlignment (cloud-tethered, proprietary): Nishi does the core transforms sovereign + offline + exact (the universal genetic code is a DATA table, not a service call). Honest scope: not GenomeData's breadth -- the exact deterministic primitives every downstream bio rung builds on (hardware-rung-up). BAKED GATE proves each transform on known sequences + a negative control (unknown codon rejected) before verdict=GREEN. module: nishi-core.science.bio_sequence depends: nishi-core.sys.syscalls capability: EXACT_DETERMINISTIC_BIOSEQUENCE license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_bio_sequence.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap bs_read sys_openat_rd sys_read sys_close bs_w sys_write sys_exit bs_transcribe bs_streq bs_translate sys_mmap ↻ bs_codon_lookup sys_mmap ↻ bs_field bs_streq ↻ bs_revcomp bs_gc_count bs_codon_lookup ↻ sys_openat_append bs_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_close ↻

structs

none

consts

23const BS_MAGIC_16384: i64 = 16384
25const BS_TABLE: *u8 = "knowledge/registry/sci_codon_table.tsv"
26const BS_LOG: *u8 = "knowledge/status/bio_sequence.log"

functions

28func bs_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
33func bs_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
35func bs_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
45func bs_field(buf: *u8, ls: i64, le: i64, f: i64, dst: *u8, cap: i64) -> i64
called by 1: bs_codon_lookup
58func bs_streq(a: *u8, b: *u8) -> i64
called by 2: bs_codon_lookupmain
66func bs_transcribe(dna: *u8, dlen: i64, out: *u8) -> i64
called by 1: main
78func bs_revcomp(dna: *u8, dlen: i64, out: *u8) -> i64
called by 1: main
94func bs_gc_count(seq: *u8, slen: i64) -> i64
called by 1: main
106func bs_codon_lookup(tbuf: *u8, tn: i64, codon: *u8, aa: *u8) -> i64
126func bs_translate(rna: *u8, rlen: i64, tbuf: *u8, tn: i64, out: *u8) -> i64
called by 1: main calls 2: sys_mmapbs_codon_lookup
143func main() -> i64