diff options
Diffstat (limited to 'public/what-would-dna-sound-if-synthesized.html')
| -rwxr-xr-x | public/what-would-dna-sound-if-synthesized.html | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/public/what-would-dna-sound-if-synthesized.html b/public/what-would-dna-sound-if-synthesized.html index 767ea51..1e3a987 100755 --- a/public/what-would-dna-sound-if-synthesized.html +++ b/public/what-would-dna-sound-if-synthesized.html | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=generator content="JBMAFP - github.com/mitjafelicijan/jbmafp"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>What would DNA sound if synthesized to an audio file</title><meta name=description content="IntroductionLately, I have been thinking a lot about the nature of life, what are thefoundation blocks of life and things like that."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>:root{--border-color:gainsboro}body{padding:2.5rem;max-width:1900px;background:#fff;font-family:sans-serif;line-height:1.35rem;font-size:16px}hr{margin-block-start:1.5rem}a{color:blue;text-decoration:none}h1,h2,h3{line-height:initial}h1{font-size:xx-large}footer{margin-block-start:2rem}cap{text-transform:capitalize}blockquote{font-style:italic}table{max-width:100%;border:1px solid var(--border-color);border-collapse:separate;border-spacing:0}table thead tr th{border-bottom:1px solid var(--border-color)}table th,table td{padding:.3em .5em}ul.list li{padding:.2em 0}ul{line-height:1.35em}pre{text-wrap:nowrap;overflow-x:auto;padding:0 1em;border:1px solid var(--border-color)}code{padding:0 3px;font-size:14px;border:0}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace}figure{margin-inline-start:0;margin-inline-end:0}figcaption{text-align:center}figcaption p{margin:.3em 0 0}img,video,audio{width:800px;max-width:100%}header nav{display:flex;gap:.9rem}@media only screen and (max-width:600px){body{padding:.5em;word-wrap:break-word}header nav{gap:.7rem}header nav .hob{display:none}a{word-wrap:break-word}}</style><header><nav class=main itemscope itemtype=http://schema.org/SiteNavigationElement role=toolbar><a href=/>Home</a> | 1 | <!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=generator content="JBMAFP - github.com/mitjafelicijan/jbmafp"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAA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AAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>What would DNA sound if synthesized to an audio file</title><meta name=description content="IntroductionLately, I have been thinking a lot about the nature of life, what are thefoundation blocks of life and things like that."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>:root{--border-color:gainsboro}body{padding:2.5rem;max-width:1900px;background:#fff;font-family:sans-serif;line-height:1.35rem;font-size:16px}hr{margin-block-start:1.5rem;border:1px solid var(--border-color)}a{color:blue;text-decoration:none}h1,h2,h3{line-height:initial}h1{font-size:xx-large}footer{margin-block-start:2rem}cap{text-transform:capitalize}blockquote{font-style:italic}table{max-width:100%;border:2px solid var(--border-color);border-collapse:separate;border-spacing:0}table thead tr th{border-bottom:2px solid var(--border-color)}table th,table td{padding:.3em .5em}ul.list li{padding:.2em 0}ul{line-height:1.35em}pre{text-wrap:nowrap;overflow-x:auto;padding:0 1em;border:2px solid var(--border-color)}code{padding:0 3px;font-size:14px;border:0}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace}figure{margin-inline-start:0;margin-inline-end:0}figcaption{text-align:center}figcaption p{margin:.3em 0 0}img,video,audio{width:800px;max-width:100%}header nav{display:flex;gap:.9rem}@media only screen and (max-width:600px){body{padding:.5em;word-wrap:break-word}header nav{gap:.7rem}header nav .hob{display:none}a{word-wrap:break-word}}</style><header><nav class=main itemscope itemtype=http://schema.org/SiteNavigationElement role=toolbar><a href=/>Home</a> |
| 2 | <a href=/#posts>Posts</a> | 2 | <a href=/#posts>Posts</a> |
| 3 | <a href=/#notes>Notes</a> | 3 | <a href=/#notes>Notes</a> |
| 4 | <a href=/#sideprojects class=hob>Side Projects</a> | 4 | <a href=/#sideprojects class=hob>Side Projects</a> |
| @@ -108,31 +108,31 @@ however.<pre tabindex=0 style=background-color:#fff><code><span style=display:fl | |||
| 108 | </span></span><span style=display:flex><span>tail -n+3 audio.dat > audio_only.dat | 108 | </span></span><span style=display:flex><span>tail -n+3 audio.dat > audio_only.dat |
| 109 | </span></span><span style=display:flex><span>gnuplot audio.gpi | 109 | </span></span><span style=display:flex><span>gnuplot audio.gpi |
| 110 | </span></span></code></pre><p>And input file <code>audio.gpi</code> that would be passed to gnuplot looks something like | 110 | </span></span></code></pre><p>And input file <code>audio.gpi</code> that would be passed to gnuplot looks something like |
| 111 | this.<pre><code># set output format and size | 111 | this.<pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span># set output format and size |
| 112 | set term png size 1000,280 | 112 | </span></span><span style=display:flex><span>set term png size 1000,280 |
| 113 | 113 | </span></span><span style=display:flex><span> | |
| 114 | # set output file | 114 | </span></span><span style=display:flex><span># set output file |
| 115 | set output "audio.png" | 115 | </span></span><span style=display:flex><span>set output "audio.png" |
| 116 | 116 | </span></span><span style=display:flex><span> | |
| 117 | # set y range | 117 | </span></span><span style=display:flex><span># set y range |
| 118 | set yr [-1:1] | 118 | </span></span><span style=display:flex><span>set yr [-1:1] |
| 119 | 119 | </span></span><span style=display:flex><span> | |
| 120 | # we want just the data | 120 | </span></span><span style=display:flex><span># we want just the data |
| 121 | unset key | 121 | </span></span><span style=display:flex><span>unset key |
| 122 | unset tics | 122 | </span></span><span style=display:flex><span>unset tics |
| 123 | unset border | 123 | </span></span><span style=display:flex><span>unset border |
| 124 | set lmargin 0 | 124 | </span></span><span style=display:flex><span>set lmargin 0 |
| 125 | set rmargin 0 | 125 | </span></span><span style=display:flex><span>set rmargin 0 |
| 126 | set tmargin 0 | 126 | </span></span><span style=display:flex><span>set tmargin 0 |
| 127 | set bmargin 0 | 127 | </span></span><span style=display:flex><span>set bmargin 0 |
| 128 | 128 | </span></span><span style=display:flex><span> | |
| 129 | # draw rectangle to change background color | 129 | </span></span><span style=display:flex><span># draw rectangle to change background color |
| 130 | set obj 1 rectangle behind from screen 0,0 to screen 1,1 | 130 | </span></span><span style=display:flex><span>set obj 1 rectangle behind from screen 0,0 to screen 1,1 |
| 131 | set obj 1 fillstyle solid 1.0 fillcolor rgbcolor "#ffffff" | 131 | </span></span><span style=display:flex><span>set obj 1 fillstyle solid 1.0 fillcolor rgbcolor "#ffffff" |
| 132 | 132 | </span></span><span style=display:flex><span> | |
| 133 | # draw data with foreground color | 133 | </span></span><span style=display:flex><span># draw data with foreground color |
| 134 | plot "audio_only.dat" with lines lt rgb 'red' | 134 | </span></span><span style=display:flex><span>plot "audio_only.dat" with lines lt rgb 'red' |
| 135 | </code></pre><h2 id=pre-generated-sequences>Pre-generated sequences</h2><p>What I did was take interesting parts from an animal's genome and feed it to a | 135 | </span></span></code></pre><h2 id=pre-generated-sequences>Pre-generated sequences</h2><p>What I did was take interesting parts from an animal's genome and feed it to a |
| 136 | tone generator script. This then generated a WAV file and I converted those to | 136 | tone generator script. This then generated a WAV file and I converted those to |
| 137 | MP3, so they can be played in a browser. The last step was creating a | 137 | MP3, so they can be played in a browser. The last step was creating a |
| 138 | spectrogram based on a WAV file.<h3 id=niels-bohr-quote>Niels Bohr quote</h3><audio controls><source src=/posts/dna-synthesized/quote/out.mp3 type=audio/mpeg></audio><figure><img src=/posts/dna-synthesized/quote/spectogram.png alt=Spectogram></figure><h3 id=mouse>Mouse</h3><p>This is part of a mouse genome <code>Mus_musculus.GRCm39.dna.nonchromosomal</code>. You | 138 | spectrogram based on a WAV file.<h3 id=niels-bohr-quote>Niels Bohr quote</h3><audio controls><source src=/posts/dna-synthesized/quote/out.mp3 type=audio/mpeg></audio><figure><img src=/posts/dna-synthesized/quote/spectogram.png alt=Spectogram></figure><h3 id=mouse>Mouse</h3><p>This is part of a mouse genome <code>Mus_musculus.GRCm39.dna.nonchromosomal</code>. You |
