aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-08-05 12:09:37 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-08-05 12:09:37 +0200
commit2f5ea5f4982d6276881c9a3342ed8847ebc7d326 (patch)
treec405cf24bce11c00d7d453bdd18995cf8cda97aa /content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
parentc181dc5c37435029a0f5f2c51d6f36da4d32afd5 (diff)
downloadmitjafelicijan.com-2f5ea5f4982d6276881c9a3342ed8847ebc7d326.tar.gz
Moved assets to posts
Diffstat (limited to 'content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md')
-rw-r--r--content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
index b285756..f003fc3 100644
--- a/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
+++ b/content/posts/2019-01-03-encoding-binary-data-into-dna-sequence.md
@@ -109,7 +109,7 @@ The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases
109Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine 109Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine
110bases. The sugar and the base together are called a nucleoside. 110bases. The sugar and the base together are called a nucleoside.
111 111
112![DNA](/assets/dna-sequence/dna-basics.jpg) 112![DNA](/posts/dna-sequence/dna-basics.jpg)
113 113
114*DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and 114*DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and
115cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, 115cytosine pairs with guanine. (credit a: modification of work by Jerome Walker,
@@ -300,13 +300,13 @@ Then we encode FASTA file from previous operation to encode this data into PNG.
300 300
301After encoding into PNG format this file looks like this. 301After encoding into PNG format this file looks like this.
302 302
303![Encoded Quote in PNG format](/assets/dna-sequence/quote.png) 303![Encoded Quote in PNG format](/posts/dna-sequence/quote.png)
304 304
305The larger the input stream is the larger the PNG file would be. 305The larger the input stream is the larger the PNG file would be.
306 306
307Compiled basic Hello World C program with 307Compiled basic Hello World C program with
308[GCC](https://www.gnu.org/software/gcc/) would [look 308[GCC](https://www.gnu.org/software/gcc/) would [look
309like](/assets/dna-sequence/sample.png). 309like](/posts/dna-sequence/sample.png).
310 310
311```c 311```c
312// gcc -O3 -o sample sample.c 312// gcc -O3 -o sample sample.c
@@ -372,7 +372,7 @@ dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=
372Our freshly generated 1KB file looks something like this (its full of garbage 372Our freshly generated 1KB file looks something like this (its full of garbage
373data as intended). 373data as intended).
374 374
375![Sample binary file 1KB](/assets/dna-sequence/sample-binary-file.png) 375![Sample binary file 1KB](/posts/dna-sequence/sample-binary-file.png)
376 376
377We create following binary files: 377We create following binary files:
378 378
@@ -398,9 +398,9 @@ gzip -9 < 10MB.fa > 10MB.fa.gz
398 398
399[Download ODS file with benchmarks](/dna-sequence/benchmarks.ods). 399[Download ODS file with benchmarks](/dna-sequence/benchmarks.ods).
400 400
401![Sample binary file 1KB](/assets/dna-sequence/chart-1.png) 401![Sample binary file 1KB](/posts/dna-sequence/chart-1.png)
402 402
403![Sample binary file 1KB](/assets/dna-sequence/chart-2.png) 403![Sample binary file 1KB](/posts/dna-sequence/chart-2.png)
404 404
405## References 405## References
406 406