diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-02-08 06:53:16 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-02-08 06:53:16 +0100 |
| commit | 7db700a96cb36f233201ed88244f1a7dbfe7ebd9 (patch) | |
| tree | 2b18b2d16c02de5633dc90f048fb670bba973aa4 /_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | |
| parent | 537ccd14634c1736c03d487388bd9d2278af4493 (diff) | |
| download | mitjafelicijan.com-7db700a96cb36f233201ed88244f1a7dbfe7ebd9.tar.gz | |
Tweaks
Diffstat (limited to '_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md')
| -rw-r--r-- | _posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md index 1de83af..6980ed1 100644 --- a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md +++ b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | |||
| @@ -111,6 +111,7 @@ Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine | |||
| 111 | bases. The sugar and the base together are called a nucleoside. | 111 | bases. The sugar and the base together are called a nucleoside. |
| 112 | 112 | ||
| 113 | {:loading="lazy"} | 113 | {:loading="lazy"} |
| 114 | |||
| 114 | *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and | 115 | *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and |
| 115 | cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, | 116 | cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, |
| 116 | Dennis Myts)* | 117 | Dennis Myts)* |
| @@ -301,6 +302,7 @@ Then we encode FASTA file from previous operation to encode this data into PNG. | |||
| 301 | After encoding into PNG format this file looks like this. | 302 | After encoding into PNG format this file looks like this. |
| 302 | 303 | ||
| 303 | {:loading="lazy"} | 304 | {:loading="lazy"} |
| 305 | |||
| 304 | The larger the input stream is the larger the PNG file would be. | 306 | The larger the input stream is the larger the PNG file would be. |
| 305 | 307 | ||
| 306 | Compiled basic Hello World C program with | 308 | Compiled basic Hello World C program with |
| @@ -368,8 +370,8 @@ First we generate some binary sample data with dd. | |||
| 368 | dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock | 370 | dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero) of=1KB.bin bs=1KB count=1 iflag=fullblock |
| 369 | ``` | 371 | ``` |
| 370 | 372 | ||
| 371 | |||
| 372 | {:loading="lazy"} | 373 | {:loading="lazy"} |
| 374 | |||
| 373 | Our freshly generated 1KB file looks something like this (its full of | 375 | Our freshly generated 1KB file looks something like this (its full of |
| 374 | garbage data as intended). | 376 | garbage data as intended). |
| 375 | 377 | ||
| @@ -396,9 +398,11 @@ gzip -9 < 10MB.fa > 10MB.fa.gz | |||
| 396 | ``` | 398 | ``` |
| 397 | 399 | ||
| 398 | {:loading="lazy"} | 400 | {:loading="lazy"} |
| 401 | |||
| 399 | The speed increase that occurs when encoding to FASTA format. | 402 | The speed increase that occurs when encoding to FASTA format. |
| 400 | 403 | ||
| 401 | {:loading="lazy"} | 404 | {:loading="lazy"} |
| 405 | |||
| 402 | Size of the out file after encoding. | 406 | Size of the out file after encoding. |
| 403 | 407 | ||
| 404 | [Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). | 408 | [Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). |
