From 7db700a96cb36f233201ed88244f1a7dbfe7ebd9 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 8 Feb 2024 06:53:16 +0100 Subject: Tweaks --- _posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | 6 +++++- _posts/2022-06-30-trying-out-helix-editor.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to '_posts') 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 bases. The sugar and the base together are called a nucleoside. ![DNA](/assets/posts/dna-sequence/dna-basics.jpg){:loading="lazy"} + *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts)* @@ -301,6 +302,7 @@ Then we encode FASTA file from previous operation to encode this data into PNG. After encoding into PNG format this file looks like this. ![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png){:loading="lazy"} + The larger the input stream is the larger the PNG file would be. Compiled basic Hello World C program with @@ -368,8 +370,8 @@ First we generate some binary sample data with dd. 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 ``` - ![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png){:loading="lazy"} + Our freshly generated 1KB file looks something like this (its full of garbage data as intended). @@ -396,9 +398,11 @@ gzip -9 < 10MB.fa > 10MB.fa.gz ``` ![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg){:loading="lazy"} + The speed increase that occurs when encoding to FASTA format. ![File sizes](/assets/posts/dna-sequence/chart-size.svg){:loading="lazy"} + Size of the out file after encoding. [Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). diff --git a/_posts/2022-06-30-trying-out-helix-editor.md b/_posts/2022-06-30-trying-out-helix-editor.md index 61f653a..be369a1 100644 --- a/_posts/2022-06-30-trying-out-helix-editor.md +++ b/_posts/2022-06-30-trying-out-helix-editor.md @@ -36,7 +36,8 @@ One thing to do before you are able to use autocompletion and make use Language Server support is to install the language server with NPM. ```sh -npm install -g typescript typescript-language-server +# For C development this installs C LSP. +sudo dnf install clang-tools-extra ``` I am still getting used to the keyboard shortcuts and getting better. What Helix -- cgit v1.2.3