human dna visualisation in k

human dna visualisation in k

$cd ~/Downloads/GCA_009914755.4
$k
mi 2021.10.21 4 8 (c)shakti 2.0
 vf@1:`21
"/tmp/59722018.bmp"
 \open /tmp/59722018.bmp

mitochondrion

mitochondrion can be an example to display in this page since it has roughly 16569 base pairs. exact number varies slightly between individuals due to mutations.

here it's in a 148x112 image with colors:ATGC atgc

human mitochondrial dna sequence visualisation: 148x112 pixel grid representing approximately 16569 base pairs. each pixel corresponds to a nucleotide (a/t/g/c) in the circular genome.

genome data (3gb)

https://ncbi.nlm.nih.gov/datasets/genome/GCF_009914755.1

code (shakti-k9)

cf:("fff 000 f31 1e1 33e fd2 f70 fa0 0af ac5 ac5 f6a a6f ac5 0fa bf0"
    "f65 36f 889 f36 68f 4f6 f92 09f f50 f06 75a 09f fc0 0cf 76f 54f"
    "eff ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5 ac5"
    "bef bef bef bef bef bef bef bef bef bef ac5 ac5 ac5 ac5 ac5 ac5"
    "ac5 e15 aea 27f aea aea aea 2c3 aea aea aea aea aea aea aea aea"
    "aea aea aea aea e80 aea aea aea aea aea aea ac5 ac5 ac5 ac5 ac5"
    "ac5 f67 ae9 7be ae9 ae9 ae9 7da ae9 ae9 ae9 ae9 ae9 ae9 ae9 ae9"
    "ae9 ae9 ae9 ae9 fb6 ae9 ae9 ae9 ae9 ae9 ae9 ac5 ac5 ac5 ac5 736"
    "737 727 717 707 626 616 606 525 515 505 424 414 404 323 313 303"
    "636 635 634 633 632 631 630 536 535 534 533 532 531 530 436 435"
    "434 433 432 431 430 336 335 334 333 332 331 330 236 235 234 233"
    "232 231 230 136 135 134 133 132 131 130 625 624 623 622 621 620"
    "525 524 523 522 521 520 425 424 423 422 421 420 325 324 323 322"
    "321 320 225 224 223 222 221 220 125 124 123 122 121 120 614 613"
    "612 611 610 514 513 512 511 510 414 413 412 411 410 314 313 312"
    "311 310 214 213 212 211 210 114 113 112 111 110 202 101 201 100")

di:{(w,'a)@&b=w:_b:x%a:1_1+!_sqrt x} /divisors
ih:{(|17*x-"07W"@"@`"bin x),,0};cc:,/ih'" "\" "/cf  /palette
ar:{$[#r:(~4 mod*')#({(~2<x)|~1<x}@%/')#di x;*|r;ar 1+x]} /aspect ratio
vf:{("/tmp/",($`i@.z.t),".bmp")1:bm[wh]x,`c@&(*/wh:ar@#x)-#x} /visualise file
bm:{"BM",(`c(,/+|(4#256)\(1078+#y;0;1078;40;x 0;-x 1)),(1 0 8,&25),cc),y} /bmp
c:,/'f@i:(&s)_&~s:">"=*'f:0:"GCA_009914755.4_T2T-CHM13v2.0_genomic.fna"
(($1+!22),,'("x";"y";"m"))1:'c /tidy up the ugly .fna files

1hr video demo (lang:turkish)