Answers.Body: <p>I was quite curious when I saw that as well. I've spent more time than I'd care to admit trying the sort of things you have. I've gotten it decoded now, but I can't really claim any sort of victory, as the problem was pre-solved.</p>
  <p>After struggling through some of the same experiments you did, I decided to take a closer look at their explainer video here: <a href="https://youtu.be/DMYgjOHgHxc" rel="noreferrer">https://youtu.be/DMYgjOHgHxc</a></p>
  <p>First I tried to decipher the blackboard sketch around 1:30, but it was quite vague. A closer investigation into the speaker, however, yielded some luck. Googling Dr. Reinhard Heckel brought me to his website here: <a href="http://www.reinhardheckel.com/" rel="noreferrer">http://www.reinhardheckel.com/</a> which shows his <a href="https://sci-hub.tw/10.1038/s41596-019-0244-5" rel="noreferrer">most recent publication</a> – a paper on encoding digital data in DNA.</p>
  <p>The encoding is relatively complex (something nearly impossible to stumble upon accidentally, I'd reckon) but fascinating. The fragments are indexed and have two, layered error-correcting codes. Perhaps making our job harder (but serving the practical purpose of minimizing homopolymers and unwanted annealing) is the fact that the data is XORed with a pseudo-random noise that shuffles the data. The paper obviously has all of the details.</p>
  <p>From my skim, however, I stumbled across this Github repo linked in the paper: <a href="https://github.com/reinhardh/dna_rs_coding" rel="noreferrer">https://github.com/reinhardh/dna_rs_coding</a></p>
  <p>As it happens, the README was just updated in this last week, describing how to decode the episode from the file provided. If you have Docker, you just need to copy-paste some commands.</p>
  <p>The product is indeed the full and final episode – coming in at a dainty 63.1MB. How did they get 40 minutes of video that compressed? Well, in short, 720x360 at 24 fps. It looks a little awful and is in German only, but is certainly a cool little easter egg. If nothing else, I have a cool paper to read.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-27T00:22:56.830Z
Answers.Text: I haven't thought about going that way, good job! If I get this correctly they inserted error correction codes (ECCs) to the binary video file using some kind of Reed-Solomon-Encoding (RS) approach. So not having this information makes the decoding challenge almost impossible to solve from scratch. Also some specific parameters like size of the ECCs to encode AND decode data have to be known which favors the insolubility. Haven't heard about RS, seems to be kind of complicated but pretty important technique to recover broken/lost information (used in CDs, QR codes and more).
Answers.UserDisplayName: xamax 
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-27T00:25:39.103Z
Answers.Text: Here in more detail about RS: https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders
  And a RS implementation in Python:
  https://github.com/tomerfiliba/reedsolomon
  Works pretty good I played around with it a little.
  Very interesting.
Answers.UserDisplayName: xamax 
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-26T20:40:27.850Z
Answers.LastActivityDate: 2020-08-26T20:40:27.850Z
Answers.UserDisplayName: Brooks
Body: <p>I'm not sponsored or anything, just interested in their challenge to decipher their DNA code.</p>
  <p>They encoded their first episode of &quot;Biohackers&quot; video/binary file to DNA code and said if we could decode it we can watch it (without Netflix).
  Here's their page: <a href="https://biohackersnetflix.com" rel="nofollow noreferrer">https://biohackersnetflix.com</a> with description and download for the DNA sequence file.
  (Don't know if it's just in German or you can translate it. If questions regarding this page, ask me.)</p>
  <p>The file is ~550MB small and contains 3.882.771 lines (not in fasta format). Every line has a length of 147 characters including primers at both ends (Illumina?).
  Here are the first 5 lines:</p>
  <pre><code>ACACGACGCTCTTCCGATCTCTCCCAGGGACAAAGGTTCTGCATTTGCAGCAAGACTCCTGTAGTGCTGCAGATTCTCTGGTTGGATAGTACGGCGTACATTTCTGTATTGTAGCACCATGGGGTAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTTAAGGCTTCGTAACAGATATTCTATATCGTCACATTGGTCTGAAGGAAGTCGCCTATAATCGCTCCTCTGTTTTTTAAAACTGCTATGGACCCGCTGTTCGGTGGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTCATGGTATAAGTGTTAAGGGTAATAACCACCTACCCCCCTCATTGCTCGTTTTTCCTGGAACCTTAACATTCGCAATAGCTAGCTGTTTCCTAGTAGAACCAAGGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTAGGATGTAGTCACAGGTCATTGTCATTAACTCAACCGAGGACATAACACTAAGTCCCACTAGGCCTGGATTCTCTAACGCGGTCTCTCTATTGGGGGAAGGGGTGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTTCTGGTAAGGCGGGTTGATATCAGTCACCTCCCTTTGAGCTAAAATACGATGGCGATTTAGTGTGAAACTAATAATGCTTGTCATACCAGCAGTACCGGATCGGGAGATCGGAAGAGCACACGTCT
  </code></pre>
  <p>I trimmed all the primers and tried to decode {A, C, G, T} considering every permutation {00, 01, 10, 11} as the obvious(?) decryption method (4! = 24 possible decodings) using python.</p>
  <p>Then I hoped to get 1 of these 24 files loaded into VLC media player or something to be played, but it didn't work and every file seemed to be broken in the same way. I think I'm missing something here.</p>
  <p>Can I assume that a text file containing only 0's and 1's should be playable in VLC if the DNA code is correctly decrypted?</p>
  <p>(If I am wrong here, please tell or move me.)</p>
  <p>//Edit: I converted all 24 files to ASCII to see if there's some kind of &quot;video-like header&quot;. (All videos have some sort of description in their first lines if opened in text editor?) But there's just gibberish.</p>
  <p>//Edit: I saw that every 84th sequence position has a &quot;T&quot;, which is kind of weird.
  So I tried to run my script again with these T's removed, but still no solution.</p>
  <p>//Edit: I searched for &quot;AVI&quot;, &quot;264&quot;, &quot;codec&quot; and some other strings in every video file I created and hexdumped. Nothing found.
  For clarification: I translated the DNA into every 24 binary and then into their ASCII representation following the 19 upvotes answer: <a href="https://stackoverflow.com/questions/7290943/write-a-string-of-1s-and-0s-to-a-binary-file">https://stackoverflow.com/questions/7290943/write-a-string-of-1s-and-0s-to-a-binary-file</a>. The 104 bases / 208 Bits (removed repetetive &quot;T&quot; and primers) are actually a multiple of 8 (respectively 26 Bytes) so I could be on the right way (even if not 32 Bytes?).
  De novo Assembly didn't work and I found no obvious ORF &quot;genes&quot; representing some kind of URL to the video or something which was a neat idea considering the video file would be only ~150MB. (See comments.)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T09:56:06.487Z
Comments.Text: Are the primers all the same and if not are you sure the read direction is not inverted for some? And do any of them align? (I.e. maybe you have to assemble it like a genome).
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T11:25:38.410Z
Comments.Text: @MatteoFerla Yes, all primers are the same. And there are not many overlapping regions, so assembly isn't the right way I think.
Comments.UserDisplayName: xamax 
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T11:43:42.137Z
Comments.Text: This fact plus your re-occuring T, suggests it's a problem to be solved with normal encryption cracking techniques, rather than bioinformatics. Say, what is expected at the beginning of an AVI encoded file —you mentioned text-like metadata.
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T11:48:47.540Z
Comments.Text: Is your 500 MB file a text file? If so the data present is 2 bits per byte, which would make it a 125 MB binary, which seems low. Had it been a DNA assembly problem, the information would be even less. So I was suspecting it would be an ORF prediction and translation into AA making a URL kind of gimmick.
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T12:25:40.640Z
Comments.Text: It's also worth noting that the order in which the sequences are listed in the file might not be the order in which they are to be read once converted to binary.
Comments.UserDisplayName: Pallie
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-25T20:58:29.753Z
Comments.Text: @MatteoFerla Yes, 500MB text file. That's also the point which surprised me. How would a 40 minute (maybe even HD) Video fit in ~ 150MB? On the other hand their says something like it's the world's first series stored in DNA and "HERE YOU WILL FIND THE COMPLETE DNA CODE OF THE FIRST EPISODE[...]" (then the download link follows). So I think it should be the binary file converted to DNA. But anyways I tried to find the ORF with ORFfinder (min len 100) but nothing suspicious. Also assembly (Velvet and SPAdes) didn't work (not even one contig).
Comments.UserDisplayName: xamax 
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-26T09:47:16.070Z
Comments.Text: The adaptors `5-ACACGACGCTCTTCCGATCT` and `5-AGACGTGTGCTCTTCCGATCT` (RC'ed) are parts of Illumina adaptors but are too short. Is there an application that uses such short ones? The T at 104 makes me think there is barcoding going on at the 3' terminus: are bases 105-127 repeated?
Comments.UserDisplayName: Matteo Ferla
Tags: <python><phylogenetics><encode>
Title: Biohackers Netflix - DNA to binary and video
ThreadText: # Biohackers Netflix - DNA to binary and video
  
  (Asked by: username_0 on 2020-08-20)
  
  I'm not sponsored or anything, just interested in their challenge to decipher their DNA code.
  
  They encoded their first episode of "Biohackers" video/binary file to DNA code and said if we could decode it we can watch it (without Netflix).
  Here's their page: <https://biohackersnetflix.com> with description and download for the DNA sequence file.
  (Don't know if it's just in German or you can translate it. If questions regarding this page, ask me.)
  
  The file is ~550MB small and contains 3.882.771 lines (not in fasta format). Every line has a length of 147 characters including primers at both ends (Illumina?).
  Here are the first 5 lines:
  
  ```
  ACACGACGCTCTTCCGATCTCTCCCAGGGACAAAGGTTCTGCATTTGCAGCAAGACTCCTGTAGTGCTGCAGATTCTCTGGTTGGATAGTACGGCGTACATTTCTGTATTGTAGCACCATGGGGTAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTTAAGGCTTCGTAACAGATATTCTATATCGTCACATTGGTCTGAAGGAAGTCGCCTATAATCGCTCCTCTGTTTTTTAAAACTGCTATGGACCCGCTGTTCGGTGGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTCATGGTATAAGTGTTAAGGGTAATAACCACCTACCCCCCTCATTGCTCGTTTTTCCTGGAACCTTAACATTCGCAATAGCTAGCTGTTTCCTAGTAGAACCAAGGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTAGGATGTAGTCACAGGTCATTGTCATTAACTCAACCGAGGACATAACACTAAGTCCCACTAGGCCTGGATTCTCTAACGCGGTCTCTCTATTGGGGGAAGGGGTGAGATCGGAAGAGCACACGTCT
  ACACGACGCTCTTCCGATCTTCTGGTAAGGCGGGTTGATATCAGTCACCTCCCTTTGAGCTAAAATACGATGGCGATTTAGTGTGAAACTAATAATGCTTGTCATACCAGCAGTACCGGATCGGGAGATCGGAAGAGCACACGTCT
  
  ```
  
  I trimmed all the primers and tried to decode {A, C, G, T} considering every permutation {00, 01, 10, 11} as the obvious(?) decryption method (4! = 24 possible decodings) using python.
  
  Then I hoped to get 1 of these 24 files loaded into VLC media player or something to be played, but it didn't work and every file seemed to be broken in the same way. I think I'm missing something here.
  
  Can I assume that a text file containing only 0's and 1's should be playable in VLC if the DNA code is correctly decrypted?
  
  (If I am wrong here, please tell or move me.)
  
  //Edit: I converted all 24 files to ASCII to see if there's some kind of "video-like header". (All videos have some sort of description in their first lines if opened in text editor?) But there's just gibberish.
  
  //Edit: I saw that every 84th sequence position has a "T", which is kind of weird.
  So I tried to run my script again with these T's removed, but still no solution.
  
  //Edit: I searched for "AVI", "264", "codec" and some other strings in every video file I created and hexdumped. Nothing found.
  For clarification: I translated the DNA into every 24 binary and then into their ASCII representation following the 19 upvotes answer: <https://stackoverflow.com/questions/7290943/write-a-string-of-1s-and-0s-to-a-binary-file>. The 104 bases / 208 Bits (removed repetetive "T" and primers) are actually a multiple of 8 (respectively 26 Bytes) so I could be on the right way (even if not 32 Bytes?).
  De novo Assembly didn't work and I found no obvious ORF "genes" representing some kind of URL to the video or something which was a neat idea considering the video file would be only ~150MB. (See comments.)
  
  **Tags:** python, phylogenetics, encode
  
  > **Comments:**
  > **username_1**: Are the primers all the same and if not are you sure the read direction is not inverted for some? And do any of them align? (I.e. maybe you have to assemble it like a genome).  
  > **username_0**: @username_1 Yes, all primers are the same. And there are not many overlapping regions, so assembly isn't the right way I think.  
  > **username_1**: This fact plus your re-occuring T, suggests it's a problem to be solved with normal encryption cracking techniques, rather than bioinformatics. Say, what is expected at the beginning of an AVI encoded file —you mentioned text-like metadata.  
  > **username_1**: Is your 500 MB file a text file? If so the data present is 2 bits per byte, which would make it a 125 MB binary, which seems low. Had it been a DNA assembly problem, the information would be even less. So I was suspecting it would be an ORF prediction and translation into AA making a URL kind of gimmick.  
  > **username_2**: It's also worth noting that the order in which the sequences are listed in the file might not be the order in which they are to be read once converted to binary.  
  > **username_0**: @username_1 Yes, 500MB text file. That's also the point which surprised me. How would a 40 minute (maybe even HD) Video fit in ~ 150MB? On the other hand their says something like it's the world's first series stored in DNA and "HERE YOU WILL FIND THE COMPLETE DNA CODE OF THE FIRST EPISODE[...]" (then the download link follows). So I think it should be the binary file converted to DNA. But anyways I tried to find the ORF with ORFfinder (min len 100) but nothing suspicious. Also assembly (Velvet and SPAdes) didn't work (not even one contig).  
  > **username_1**: The adaptors `5-ACACGACGCTCTTCCGATCT` and `5-AGACGTGTGCTCTTCCGATCT` (RC'ed) are parts of Illumina adaptors but are too short. Is there an application that uses such short ones? The T at 104 makes me think there is barcoding going on at the 3' terminus: are bases 105-127 repeated?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2020-08-26. Score: 6 | Accepted answer
  
  I was quite curious when I saw that as well. I've spent more time than I'd care to admit trying the sort of things you have. I've gotten it decoded now, but I can't really claim any sort of victory, as the problem was pre-solved.
  
  After struggling through some of the same experiments you did, I decided to take a closer look at their explainer video here: <https://youtu.be/DMYgjOHgHxc>
  
  First I tried to decipher the blackboard sketch around 1:30, but it was quite vague. A closer investigation into the speaker, however, yielded some luck. Googling Dr. Reinhard Heckel brought me to his website here: <http://www.reinhardheckel.com/> which shows his [most recent publication](https://sci-hub.tw/10.1038/s41596-019-0244-5) – a paper on encoding digital data in DNA.
  
  The encoding is relatively complex (something nearly impossible to stumble upon accidentally, I'd reckon) but fascinating. The fragments are indexed and have two, layered error-correcting codes. Perhaps making our job harder (but serving the practical purpose of minimizing homopolymers and unwanted annealing) is the fact that the data is XORed with a pseudo-random noise that shuffles the data. The paper obviously has all of the details.
  
  From my skim, however, I stumbled across this Github repo linked in the paper: <https://github.com/reinhardh/dna_rs_coding>
  
  As it happens, the README was just updated in this last week, describing how to decode the episode from the file provided. If you have Docker, you just need to copy-paste some commands.
  
  The product is indeed the full and final episode – coming in at a dainty 63.1MB. How did they get 40 minutes of video that compressed? Well, in short, 720x360 at 24 fps. It looks a little awful and is in German only, but is certainly a cool little easter egg. If nothing else, I have a cool paper to read.
  
  > **Comments:**
  > **username_0**: I haven't thought about going that way, good job! If I get this correctly they inserted error correction codes (ECCs) to the binary video file using some kind of Reed-Solomon-Encoding (RS) approach. So not having this information makes the decoding challenge almost impossible to solve from scratch. Also some specific parameters like size of the ECCs to encode AND decode data have to be known which favors the insolubility. Haven't heard about RS, seems to be kind of complicated but pretty important technique to recover broken/lost information (used in CDs, QR codes and more).  
  > **username_0**: Here in more detail about RS: https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders And a RS implementation in Python: https://github.com/tomerfiliba/reedsolomon Works pretty good I played around with it a little. Very interesting.  
  
  ---
  
  