Live data from Hacker News

Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

biology.stackexchange.com

31–40 of 204 posts

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#31
What about length prefixed strings? There's obviously "byte" terminated strings (start and stop codons) but there's probably situations where it makes sense for biological systems to store the length (or likely reading different lengths produces different molecules, as a form of compression) at the beginning and count it out.

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#32
post #4

I teach a creativity and innovation course at my uni. There are many examples I share with my students of inventions which started life as observations of nature (e.g. Velcro came about from observing how burrs stick to the fur of the inventor's dog). My bones tell me that there are discoveries about computing waiting to be made from observing how things are done in nature, particularly in the human mind. I imagine t…

Convolutional neural networks come to mind.

Specifically inspired by the human brain.

https://www.ibm.com/topics/neural-networks#:~:text=Their%20n...

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#33
post #15
post #9

> There are no equivalents of function calls. All events happen is the same space and there is always a likelihood of interference. Proof that code with all functions inlined, with only global variables, with bugs and happy accidents all over the place, eventually gains sentience and becomes self aware.

Evolution is a wonderful algorithm - open ended, and yet in a single run it created all life, including human culture and technology.

Single run?

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#34

An interesting question because all of this genetic encoding and expression is probabilistic at its very core (it has to be, otherwise there wouldn't be evolution), whereas it would be very bad if basic operations in a CPU had similar level of error rates. Interesting to me how the top comment has talked about constructing logic gates out of biological circuits. I wonder if anyone has done the opposite, i.e., write a…

> whereas it would be very bad if basic operations in a CPU had similar level of error rates Evolution is about mutations when the executable file is copied.

That isn't how evolution works (or at least it is a gross generalization that is borderline wrong).

You own cells mutate over your lifetime and the mutations may trigger genetic features across your entire body. Sometimes, these mutations cause errors that we call cancer, but not always.

Evolution is when a certain genetic feature provides better fitness (which doesn't necessarily have to come from a mutation), and then gets selected through mating. For example, if suddenly people with brown hair were a better mate, it would be much more likely for the next generation to have brown hair, until non-brown hair were "evolved" out of the gene pool completely and it would be impossible to not have brown hair.

This is how we got orange carrots, which are distinct from the previous non-orange carrots, for example.

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#35
In grad school, I (briefly) researched synthetic DNA logic gates. Using these, you can build neural networks in DNA [1] and probabilistic switching circuits (my co-authored paper) [2].

To do this, you design DNA strands that bind to each other in designated regions when mixed.

To make a logic gate, you just make some bindings conditional on other bindings. To detect that the gate is closed, you make the final binding uncover a fluorophore, which is detectable by a machine. (This is all called a *displacement cascade*.)

Using our techniques, the DNA bindings could not be undone. However, I imagine that a source of new DNA strands to replenish the old would effectively implement re-callable functions.

[1] Neural nets in DNA: http://qianlab.caltech.edu/nature10262.pdf

[2] Probabilistic switching circuits: https://www.pnas.org/doi/full/10.1073/pnas.1715926115

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#36
post #9

> There are no equivalents of function calls. All events happen is the same space and there is always a likelihood of interference. Proof that code with all functions inlined, with only global variables, with bugs and happy accidents all over the place, eventually gains sentience and becomes self aware.

This isn't proof. Its wishful thinking. We don't yet understand the data structure of DNA fully, we don't know how a chemical storage system that is inherantly inert and relies on nanomachines (that it itself is responsible for providing the code for creating) to be useful even exists, let alone how it was made. How many happy accidents would it take to create cloudflare? This is overwhelmingly more complex than cloudflare and yet it works, and not only works robustly, but with exquisite UX.

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#37

My favorite thing about mtDNA is that two separate genes overlap using separate reading frames. The end of one gene is the same as the start of another, and they are laid out in the circular mitochondrial genome to take advantage of this fact. I've also read that DNA chromosomes can under go conformal changes in response to the environment it's in, making certain reading frames more or less likely to be transcribed,…

> The end of one gene is the same as the start of another

Kind of like "de Bruijn sequences" which can be used to reduce the total length of brute force attacks on pins.

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#38

My favorite thing about mtDNA is that two separate genes overlap using separate reading frames. The end of one gene is the same as the start of another, and they are laid out in the circular mitochondrial genome to take advantage of this fact. I've also read that DNA chromosomes can under go conformal changes in response to the environment it's in, making certain reading frames more or less likely to be transcribed,…

Is that specific to mtDNA? From what I remember it isn't that uncommon. There are a lot of bits of DNA that work in both directions for different genes.Been a a couple of decades since I studied that though.

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#39
post #26
post #20

Well, DNA might not have programming structures, but it acts like a neural network. See "Gene regulatory network" > Some proteins though serve only to activate other genes, and these are the transcription factors that are the main players in regulatory networks or cascades. By binding to the promoter region at the start of other genes they turn them on, initiating the production of another protein, and so on. Some tr…

Before anyone jumps to esoteric conclusions: This is more likely a result of neural networks being very general: General in the sense that they are able to approximate/model a lot of dynamic systems that allow operadic composition.

It's still an interesting fact that evolution seems to have figured out that neural networks are good at approximating arbitrary continuous functions. We could ask whether intelligent alien species are likely to use neural nets. In other words, are neural nets universal in some sense, or are they contingent to how life evolved on Earth?

Re: Does DNA have the equivalent of IF-statements, WHILE loops, or function calls?

#40
post #35

In grad school, I (briefly) researched synthetic DNA logic gates. Using these, you can build neural networks in DNA [1] and probabilistic switching circuits (my co-authored paper) [2]. To do this, you design DNA strands that bind to each other in designated regions when mixed. To make a logic gate, you just make some bindings conditional on other bindings. To detect that the gate is closed, you make the final binding…

I remember seeing a video by Steve Mould about exactly this (playing tic tac toe against DNA): https://www.youtube.com/watch?v=GgPdRKqcRTE
Post reply on HN