<blockquote>
  <p>So, first of all, is my high level observation correct? Does the genome, at least for bacteria, have a global LISP like structure? </p>
</blockquote>

<p>No. I'm afraid this is what it boils down to. I don't see any real similarity to LISP or other programming languages at all. Perhaps it would be clearer if you could explain <em>in detail</em> why you think they're similar, but as it stands, no, there is no such structure apart from a very simplistic similarity which is sort of the same as saying that the genome is like a car because it carries genes and could therefore be studied by a car mechanic.</p>

CC BY-SA 4.0
2019-07-03T16:25:05.257Z
You don't find the correspondence list in my question clear enough?  I'm asking about the structure, which seems to be the same as a LISP program, or perhaps more generally an abstract syntax tree.  And yes, the structure itself is pretty simple, but still there seems to be an exact correspondence, more so than referring to a car. I am somewhat bemused this question is so hard for people to understand and answer.
yters
CC BY-SA 4.0
2019-07-03T16:44:25.220Z
@yters no,  I don't find it clear at all. As far as I can tell, you seem to be comparing functions and their arguments to operons and their genes, but I don't see any similarity at all there. That's why I posted so many comments asking you to get more specific. I have no idea why you feel that operons are more like functions than they are like cars or bowls or anything else that can contain items. You might want to look into gene regulatory networks though, those are closer to what you're getting at.
terdon
CC BY-SA 4.0
2019-07-03T17:17:07.817Z
You could say there is a disanalogy in that the promoter/operator is not really a function, but controls whether the genes in the operon are "executed".  But there is still generally a notion of "execute this thing" and a nested tree structure.
yters
CC BY-SA 4.0
2019-07-03T19:01:14.770Z
@yters not really. That's not how the promoter works. Promoters tend to control how much it is executed, not whether. And they're just the tip of the iceberg in terms of regulation.
terdon
CC BY-SA 4.0
2019-07-03T19:07:16.580Z
but is it correct the promoter/operator preamble somehow controls the manner in which the subsequent genes are 'executed'?
yters
CC BY-SA 4.0
2019-07-03T19:23:25.277Z
@yters it is only one of many things that affect gene expression, some of which are before the gene, some in it, some after it, some can even be quite distant from it and others aren't even part of the genome at all. As I said before, you are vastly underestimating the complexity of the genome.
terdon
CC BY-SA 4.0
2019-07-03T20:42:45.380Z
I don't deny the extreme complexity of the greater context.  But, just as I can understand the C code of some UNIX utility without having to understand UNIX, perhaps we can analyze a genome by itself, to at least some degree.
yters
CC BY-SA 4.0
2019-07-03T13:18:50.773Z
2019-07-03T13:18:50.773Z
terdon
<p>You mention this as the base similarity you find:</p>

<blockquote>
  <p>operator = function<br>
       structural genes = variables<br>
       structural genes can be nested like cons cells</p>
</blockquote>

<p>As other has pointed, this just considers the genome as a sequence of where only the linear order is important. It doesn't take into account other things that happen on the genome that are know to affect the cells like the chromatin structure, the duplication of certain regions, the transversion, the effect of moving elements, methylation, or simply that a single gene can have multiple functions (pleiotropism, moonlighting) while a programming function does not. </p>

<p>Even if we considered it as code, certainly by using tools like HMM we could also learn more about the structure of the genes we have. While certainly, we need more tools than just the sequence to discover what does each gene do. </p>

<p>There are a lot more differences than similarities on this comparison, it can be helpful for certain aspects but it fails for other aspects of cells (without even going into the virus discussion or the mitochondrial). </p>

CC BY-SA 4.0
2019-07-03T20:54:17.240Z
2019-07-04T08:54:26.067Z
2019-07-04T08:54:26.067Z
llrs
<p>The only possible parallel was the "processor 'core' wars" in <a href="https://en.wikipedia.org/wiki/Avida" rel="nofollow noreferrer">Avida</a> and <a href="https://en.wikipedia.org/wiki/Tierra_(computer_simulation)" rel="nofollow noreferrer">Tierra</a>. Tierra was initiated by Tom Ray, around 1990. Here they had a 'population' of compiled binaries were randomly mutated (yep the binary code was mutated) and reproduction was dependent on how much of the processor could be consumed. The simulation worked and an in silico ecosystem evolved, but was heavily dependent on the preconditions of the simulation and proved no more reliabe at understanding evolution than differential equestions. So it was a nice idea, and very cool it worked, but it came to zero.</p>

<p>That aside the best example was the concept of the "selfish gene", but has very little to do with programming languages IMO and everything to do with understanding kinselection.</p>

CC BY-SA 4.0
2019-07-03T16:22:01.003Z
Not sure what question you are answering here.  I am not asking about evolution simulations.
yters
CC BY-SA 4.0
2019-07-03T20:19:58.497Z
To say I want "genome understanding" without evolution, is like saying I want a watch without hands. Can't have one without the other.
M__
CC BY-SA 4.0
2019-07-03T20:43:27.780Z
I would say it is more like I can understand the C source code of a UNIX utility without having to know the history of UNIX or C's development.
yters
CC BY-SA 4.0
2019-07-03T15:59:47.297Z
2019-07-03T20:21:39.227Z
2019-07-03T20:21:39.227Z
M__
<p>Believe it or not, there are people who know more than you do about programming, and who also know a hell of a lot more than you do about the genome.  This is not an avenue those people think is worth pursuing.</p>

<p>DNA is a chemical, and interacts with other chemicals based on its shape.  There is no equivalent to that in a human designed programming language.</p>

CC BY-SA 4.0
2019-07-03T16:20:10.700Z
This seems unnecessarily combative. The OP never claimed to be an expert!
terdon
CC BY-SA 4.0
2019-07-03T16:34:31.123Z
Which is why OPs first step should have been to read what experts in both subjects have been doing in the field he's interested in, instead of trying to impress a bunch of volunteers with programming jargon.
swbarnes2
CC BY-SA 4.0
2019-07-03T16:40:54.387Z
Wow. Please take a step back and stop assuming malice. The OP did do some research and did try and see if any work had been done. Nobody's out to impress anybody here, so please stop being so aggressive!
terdon
CC BY-SA 4.0
2019-07-03T16:01:41.007Z
2019-07-03T16:01:41.007Z
swbarnes2
<p>I see what the metaphor has been inspired by, where I think it got turned around, and might have a better one.</p>

<p>I'd like to back up a bit and establish some common ground.  It isn't wrong to expect that some aspects of genetic code and software code are similar, and while biology is usually very specific, some aspects can be seen productively from the light of computer science ideas.  For example, mass-action molecular dynamics, which are often a good model for protein interactions, are Turing-complete.  Here's a fun example where people have written a programming language out of molecular dynamics:  <a href="https://arxiv.org/abs/1809.07430" rel="noreferrer">https://arxiv.org/abs/1809.07430</a></p>

<p>It's also true that proteins have particular substructures leading to certain functions, such as using alpha-helices to react less with the outside world.  Learning about larger substructures, called protein domains, help identify the functions of families of proteins.  </p>

<p>The problem is that the parts of the genome which appear nested like LISP cells actually aren't included in the protein.  The regulatory regions, promoters, inhibitors, introns, and so forth never become part of the key "computational" machinery.  This nesting isn't actively part of the computational activity proteins do perform.  The main quality of LISP is that the structure and function are perfectly self-similar throughout an expression, but the structure of the regulatory regions are neither replicated down into the protein nor are necessarily recapitulated on a larger scale.</p>

<p>Unfortunately, we don't expect the computational structure of proteins to be the same from one protein to another.  This is because "binds only with X" and "binds only with Y" must be implemented differently to successfully be distinct operations, and it is these binding constraints by which molecular dynamics implement "computational" operations, such as "not X" and "not Y", and so those are distinct as well.  </p>

<p>I think a better way to think about the regular structures of the regulatory apparatus is more like a network protocol.  Along an otherwise undifferentiated binary channel, one has to identify when and where the data is delivered to an application.  Similarly, along a strand of bases, the machinery of translation has to have an indication of where the "application" of the protein starts and ends, and when that protein should be delivered to the cell.  We might compare some of the images of genetic structure that provided in the original question with layouts of network headers: <a href="http://slideplayer.com/slide/4798836/15/images/16/TCP/IP+Packet+Structures.jpg" rel="noreferrer">http://slideplayer.com/slide/4798836/15/images/16/TCP/IP+Packet+Structures.jpg</a>  We might compare bacterial versus multi-cellular regulation as having different delivery mechanisms and data structures for delivering the application information, for different functional consequences, in the same way TCP and UDP have different structures for different trade-offs.</p>

<p>This is all complicated somewhat by the fact that proteins do then interact with the regulation of genes, leading to interesting "computational" dynamics such as feed-forward regulation.  However, I'm not aware of any particular structure of the regulatory apparatus that necessarily correlates with these larger functional patterns.  The opposite is frequently biologically useful: the same structure of a protein helping to activate one gene might simultaneously inhibit another.</p>

<p>One book I've found very accessible and useful in understanding where computation is useful biologically is Dennis Bray's "Wetware: a computer in every living cell".  It gave me a clearer picture of how computation occurs in cells.  That should open up some introductions to systems biology which explains the biological-role of larger molecular "computational" patterns.</p>

CC BY-SA 4.0
2019-07-05T18:54:00.677Z
Great answer!  First answer of substance on either site!  I'll have to think it over, and if I find your reasoning persuasive, I'll accept this answer.
yters
CC BY-SA 4.0
2019-07-06T16:44:27.107Z
Thanks!  I'm glad you found the answer constructive.  After I found a useful perspective, I enjoyed thinking about the the question.
John with waffle
CC BY-SA 4.0
2019-07-06T17:58:47.063Z
You say one problem with the idea is that the LISP like structure doesn't actually become part of the computational machinery.  I'm not sure this invalidates the connection I see.  When a LISP program is compiled down to the machine code format, the high level structure disappears.  This sounds like what you are saying with regard to proteins.  All the structural patterns disappear once the genome is compiled into a protein.  So, to my ears it seems you are saying LISP and the genome are the same in this regard, instead of different.  Perhaps you can clarify?  BTW, good point about protocols.
yters
CC BY-SA 4.0
2019-07-06T18:01:26.353Z
A high level comment, I think your network protocol idea and this LISP idea are consistent with a broader idea that the genome may have a number of different protocols that are followed, just like a modern distributed computing system.  And while they are understood holistically in reference to each other, each protocol can also be analyzed by itself.  Perhaps the same mode of thinking applies to the genetic code and regulation networks.  While they can be understood holistically, they perhaps can also be understood individually.
yters
CC BY-SA 4.0
2019-07-06T21:14:04.537Z
Right, so it is true that a kind of compilation does happen, where sequences of bases undergo a translation into the amino acids that make the protein.  The observation that I'm making is that the part of the gene in which you observed the LISP structure, is not included in that translation process.  Instead, those structures have been stripped away at that point.  This is similar to how when data is provided by a network protocol to the application, those headers are not delivered to the application.
John with waffle
CC BY-SA 4.0
2019-07-06T21:20:32.777Z
The question is then whether or not we expect to see regular structures corresponding to computational structures in the part of the gene that is then translated, such as how we would see machine instructions for branching, adding, and these sorts of things.  Unfortunately, the answer is generally not, as the computations implied have to be specific for each different input.  If the answer were yes, the challenges of bioinformatics would be much easier!
John with waffle
CC BY-SA 4.0
2019-07-07T00:19:15.047Z
It occurs to me that it might be helpful to know that promoters, inhibitors, introns, and so forth are occasionally called "non-coding regions" given that they aren't included in translation.  The following diagram might be helpful:  https://en.wikipedia.org/wiki/File:Gene_structure_prokaryote_2_annotated.svg
John with waffle
CC BY-SA 4.0
2019-07-07T19:39:02.347Z
I see, just the genes inside the segment remain when translation takes place.  So, in that sense it is dissimilar to LISP, since the function in a LISP s-exp would be a part of the compilation process.  On the other hand, the non-coding section does seem to play a role in whether and how the genes are translated, if I'm understanding the answers so far.  And, thus this prokaryote genome structure still looks a lot like a LISP s-exp, since it can presumably also be nested: https://en.wikipedia.org/wiki/S-expression
yters
CC BY-SA 4.0
2019-07-08T02:21:45.823Z
As you've inferred, it is entirely right that these non-coding sections do play a role in regulation.  The way that regulation generally works, crudely speaking, is that whether transcription can go ahead or not depends upon how proteins bind to these regulatory sections, either guiding or blocking the transcription machinery.  The content of these regulatory sections must then be specific to the proteins that do work, so that once again the computational work that is done unfortunately must be specific to each family of proteins and not part of a more general computational mechanism.
John with waffle
CC BY-SA 4.0
2019-07-08T02:23:02.107Z
I agree that there is a kind of nesting that can be represented as an S-expression.  Instead, it's my contention that the S-expression could be a misleading choice for representing that structure, as I propose that the nesting that you've observed is better explained as the nesting of protocols rather than the recursive nesting of context-free grammars.  By protocol nesting, I mean that after the data has been delivered from one protocol, and the metadata of that protocol is removed, the resulting data has the data and metadata of the next protocol.
John with waffle
CC BY-SA 4.0
2019-07-08T03:16:26.193Z
Thanks again, this is a truly excellent series of answers, and you've clarified the issue greatly in my mind and given me a reference to further my understanding.  Great work!
yters
CC BY-SA 4.0
2019-07-08T23:04:20.717Z
Great, I'm glad to read that this has been helpful.  I have to hand it to you for not being dissuaded from pursuing a potential hypothesis for the structure you observed, while yet entertaining suggestions counter to your hypothesis, until you found an explanation that attempted to address all the issues.
John with waffle
CC BY-SA 4.0
2019-07-04T12:19:06.633Z
2019-07-05T12:48:47.750Z
2019-07-05T12:48:47.750Z
John with waffle
<p>Question moved here from the <a href="https://biology.stackexchange.com/questions/85289/is-the-genome-a-programming-language-e-g-like-lisp-can-we-analyze-it-as-soft/">biology stack exchange</a>.</p>

<p>It looks like the genome is a kind of LISP language.</p>

<p>Operon structure of genome:
- <a href="https://github.com/philschatz/microbiology-book/blob/master/resources/OSC_Microbio_11_07_Operon.jpg" rel="nofollow noreferrer">https://github.com/philschatz/microbiology-book/blob/master/resources/OSC_Microbio_11_07_Operon.jpg</a></p>

<p>LISP function structure:
- <a href="http://support.ircam.fr/docs/om/om6-manual/res/listprefix.png" rel="nofollow noreferrer">http://support.ircam.fr/docs/om/om6-manual/res/listprefix.png</a></p>

<p>Nested genes:
- <a href="https://player.slideplayer.com/31/9782148/data/images/img11.jpg" rel="nofollow noreferrer">https://player.slideplayer.com/31/9782148/data/images/img11.jpg</a></p>

<p>Nested LISP cons cells:
- <a href="https://www.tutorialspoint.com/lisp/images/treestructure.jpg" rel="nofollow noreferrer">https://www.tutorialspoint.com/lisp/images/treestructure.jpg</a></p>

<p>The basic similarity I am seeing is of general structure: (func var0 var1 ... varn) and nested cons cells.</p>

<p>The correspondence with genome structure is the operon portion, which has:</p>

<ul>
<li><p>operator = function</p></li>
<li><p>structural genes = variables</p></li>
<li><p>structural genes can be nested like cons cells</p></li>
</ul>

<p>Is this a global structure for the genome, then a specific prediction is we can do something simple like counting open and close markers in the nested genes and they will be equal.</p>

<p>So, why would such a correspondence matter, if true?  The basic idea is that if the LISP structure is consistent, then we could maybe look for other programming constructs built on the structure, such as recursion/looping, maybe templating or even object oriented programming. Or just identify simple properties like balanced opening closing markers. The mere fact it has a LISP structure would be fascinating if true.  And since LISP is essentially an abstract syntax tree (AST), which all programming languages have, perhaps this structure I see in the genome is actually an AST, which implies an even more fundamental correspondence between the genome and programming languages.</p>

<p>More generally, we have a wealth of knowledge reverse engineering human programming languages.  If the genome is also a programming language similar in some respects to human programming languages, such as being a LISP variant, then we could apply this same reverse engineering knowledge base to better understand the genome.</p>

<p>So, first of all, is my high level observation correct?  Does the genome, at least for bacteria, have a global LISP like structure?  If yes, then if the genome is a kind of programming language, i.e. LISP, can we analyze it like software to understand its functionality?  Has anyone done this before?  Simple searching on Google Scholar turns up lots of software for analyzing genomes, but nothing about analyzing the genome as software.  It would be interesting to know whether anyone has seriously examined the question before, and either made some useful discoveries, or found out there is only a very loose analogy with programming languages, and thus knowledge regarding programming languages is not of use regarding the genome.</p>

<p>Hopefully this question is clear enough now, if not please ask me for further clarification.  I would like to get some sort of decent answer.</p>

<p>UPDATE: <a href="https://ds9a.nl/amazing-dna/" rel="nofollow noreferrer">Someone</a> who has put thought into "DNA is code" idea.  At a more general level than whether specific genome structures match specific programming structures.</p>

<p>UPDATE #2: The late Scott Federhen of NCBI wrote an article <a href="https://www.biorxiv.org/content/biorxiv/early/2015/05/01/018804.full.pdf" rel="nofollow noreferrer">comparing genomic replication with the lambda operator</a>.</p>

<p>UPDATE #3: It might be the case that <a href="https://groups.csail.mit.edu/mac/users/gjs/6.945/readings/robust-systems.pdf" rel="nofollow noreferrer">LISP was inspired by the genome</a>.</p>

CC BY-SA 4.0
2019-07-01T22:16:47.743Z
I'm afraid you're going to get much the same reception here as you did in Biology. Please [edit] and point to _specific_ features of the genome that, to you, are similar to _specific_ features of LISP. What would the "func" be in the genome? What are the vars? The genome is usually thought of in terms of natural languages with words (codons) making sentences (genes) and punctuation (start and stop codons). And I fear you are vastly underestimating the complexity of the cellular machinery that reads the genome. Also, your first link is broken.
terdon
CC BY-SA 4.0
2019-07-02T08:25:53.570Z
AKA Richard Dawkins without the proofs. You need to draw down a specific testable hypothesis, the days when rhetoric ruled evolutionary theory ended with sequencing. LISP has a lot of fans (Perl people like it), biological systems are far less tractable and much more diverse.
M__
CC BY-SA 4.0
2019-07-02T09:18:32.070Z
https://xkcd.com/793/
Chris_Rands
CC BY-SA 4.0
2019-07-02T15:55:05.150Z
@terdon I explained exactly what the correspondence is and a simple prediction that results.
yters
CC BY-SA 4.0
2019-07-02T16:03:05.787Z
Well, operons are only relevant to bacterial genomes. What do you mean by "structural" genes? And yes, genes can be nested, but they can also overlap on opposite strands, are spliced, up and down regulated, all sorts of things. And then there are exceptions, edge cases, outliers... I still don't see what you're getting at here to be honest.
terdon
CC BY-SA 4.0
2019-07-02T16:09:21.993Z
@terdon it looks like the genome uses a general structure that is the same as the basic LISP structure, so any theory regarding LISP type languages, and programming languages in general, is applicable to understanding the genome.  I'm asking if my understanding is correct, and if anyone has undertaken this sort of analysis before, i.e. analyzing the genome as if it is a programming language.  Let me know if this is still unclear and what more I can do to clarify my question.
yters
CC BY-SA 4.0
2019-07-02T16:13:50.777Z
I guess it may come down to my own ignorance (I am a biologist, not a computer scientist) but I have no idea what kind of theory you would be able to apply or how. My only contact with LISP is my `.emacsrc` file. But many of us here aren't engineers, so your question would benefit from a more specific explanation of what sort of tools/approaches you are thinking of. More to the point, I still feel you are not grasping just how complex and, most importantly, stochastic and chaotic system a genome is. I just don't see what benefit your approach would bring or how it would even be possible.
terdon
CC BY-SA 4.0
2019-07-02T16:20:15.420Z
@terdon my basic idea is that if the LISP structure is consistent, then we could maybe look for other programming constructs built on the structure, such as recursion/looping, maybe templating or even object oriented programming.  Or just identify simple properties like balanced opening closing markers.  The mere fact it has a LISP structure would be fascinating if true.
yters
CC BY-SA 4.0
2019-07-02T16:33:00.147Z
@terdon also, more generally, I'm asking if anyone has taken this approach before, and demonstrated its effectiveness or found out there is some major problem so analyzing the genome as a programming language does not yield anything useful for a particular reason.  Do you happen to know either way what research has been done in this area?  Intuitively it seems a useful idea, because there is a wealth of knowledge regarding reverse engineering of programming languages, so we might be able to apply this knowledge to reverse engineer the genome.
yters
CC BY-SA 4.0
2019-07-02T17:57:54.920Z
Please [edit] your question and explain all this. Ideally, explain why you think programming languages are a good paradigm and better than natural languages. I still haven't seen any good evidence presented here and fear it might be a case of "when all you have is a hammer, everything looks like a nail". Granted, perhaps I'm the one with the hammer and not you, but that's why it would be really helpful if you could express your idea in terms of _specific_ features of programming languages and how those would help you understand the genome better than we do already.
terdon
CC BY-SA 4.0
2019-07-03T12:55:11.407Z
@terdon I have added the explanation from the comments to the question.  Hopefully it is clear enough now.
yters
CC BY-SA 4.0
2019-07-03T13:08:36.393Z
I think the name we use for "reverse engineering knowledge base to better understand the genome" is genome annotation.
But more seriously. I don't think there is any person who would possess sufficient knowledge of both to find *practical* analogies. Because we have plenty of ways how to analyze genome from different perspectives (e.g. genomes as subjects of mutations and selection over millions of years)m hence trying to fit some cs theories might be... difficult.
Kamil S Jaron
CC BY-SA 4.0
2019-07-03T16:26:34.200Z
@KamilSJaron surely one more option might be helpful?  Why do you think this question is encountering so much resistance?  I've tried clarifying it a number of times, and in my opinion it is pretty clear what I am asking.
yters
CC BY-SA 4.0
2019-07-03T20:24:00.843Z
I'm voting to close this question as off-topic because it has nothing to do with bioinformatics
M__
CC BY-SA 4.0
2019-07-03T20:38:23.933Z
@MichaelG. seems like interpreting the genome as code is precisely bioinformatics.  Per the Wikipedia definition: As an interdisciplinary field of science, bioinformatics combines biology, computer science, information engineering, mathematics and statistics to analyze and interpret biological data.
yters
CC BY-SA 4.0
2019-07-05T15:33:19.987Z
@yters: bioinformatics is interpreting biological data with computers. The opposite is sometimes called "computational biology" which is using biological systems AS computers. Or analysing biological systems as if they were a computer. So DNA computing, for example.
gilleain
CC BY-SA 4.0
2019-07-05T18:51:23.870Z
@gilleain this is a bit different than using the systems as computers.  It is interpreting the systems as IT constructs, in this case a programming language.  Reading the Wikipedia articles on both topics, it still seems to me that bioinformatics is the best match, since the idea I propose relies on using computer science concepts to analyze the genome.  There is at least a surface visual similarity that seems quite strong, so I'm curious whether people have looked into this idea and what they have discovered.
yters
<genome>
Is the genome a programming language (i.e. LISP)? Can we analyze it with computer science theory?
# Is the genome a programming language (i.e. LISP)? Can we analyze it with computer science theory?

(Asked by: username_0 on 2019-07-01)

Question moved here from the [biology stack exchange](https://biology.stackexchange.com/questions/85289/is-the-genome-a-programming-language-e-g-like-lisp-can-we-analyze-it-as-soft/).

It looks like the genome is a kind of LISP language.

Operon structure of genome:
- <https://github.com/philschatz/microbiology-book/blob/master/resources/OSC_Microbio_11_07_Operon.jpg>

LISP function structure:
- <http://support.ircam.fr/docs/om/om6-manual/res/listprefix.png>

Nested genes:
- <https://player.slideplayer.com/31/9782148/data/images/img11.jpg>

Nested LISP cons cells:
- <https://www.tutorialspoint.com/lisp/images/treestructure.jpg>

The basic similarity I am seeing is of general structure: (func var0 var1 ... varn) and nested cons cells.

The correspondence with genome structure is the operon portion, which has:

* operator = function
* structural genes = variables
* structural genes can be nested like cons cells

Is this a global structure for the genome, then a specific prediction is we can do something simple like counting open and close markers in the nested genes and they will be equal.

So, why would such a correspondence matter, if true? The basic idea is that if the LISP structure is consistent, then we could maybe look for other programming constructs built on the structure, such as recursion/looping, maybe templating or even object oriented programming. Or just identify simple properties like balanced opening closing markers. The mere fact it has a LISP structure would be fascinating if true. And since LISP is essentially an abstract syntax tree (AST), which all programming languages have, perhaps this structure I see in the genome is actually an AST, which implies an even more fundamental correspondence between the genome and programming languages.

More generally, we have a wealth of knowledge reverse engineering human programming languages. If the genome is also a programming language similar in some respects to human programming languages, such as being a LISP variant, then we could apply this same reverse engineering knowledge base to better understand the genome.

So, first of all, is my high level observation correct? Does the genome, at least for bacteria, have a global LISP like structure? If yes, then if the genome is a kind of programming language, i.e. LISP, can we analyze it like software to understand its functionality? Has anyone done this before? Simple searching on Google Scholar turns up lots of software for analyzing genomes, but nothing about analyzing the genome as software. It would be interesting to know whether anyone has seriously examined the question before, and either made some useful discoveries, or found out there is only a very loose analogy with programming languages, and thus knowledge regarding programming languages is not of use regarding the genome.

Hopefully this question is clear enough now, if not please ask me for further clarification. I would like to get some sort of decent answer.

UPDATE: [Someone](https://ds9a.nl/amazing-dna/) who has put thought into "DNA is code" idea. At a more general level than whether specific genome structures match specific programming structures.

UPDATE #2: The late Scott Federhen of NCBI wrote an article [comparing genomic replication with the lambda operator](https://www.biorxiv.org/content/biorxiv/early/2015/05/01/018804.full.pdf).

UPDATE #3: It might be the case that [LISP was inspired by the genome](https://groups.csail.mit.edu/mac/users/gjs/6.945/readings/robust-systems.pdf).

**Tags:** genome
> **Comments:**
> **username_1**: I'm afraid you're going to get much the same reception here as you did in Biology. Please [edit] and point to _specific_ features of the genome that, to you, are similar to _specific_ features of LISP. What would the "func" be in the genome? What are the vars? The genome is usually thought of in terms of natural languages with words (codons) making sentences (genes) and punctuation (start and stop codons). And I fear you are vastly underestimating the complexity of the cellular machinery that reads the genome. Also, your first link is broken.  
> **username_2**: AKA Richard Dawkins without the proofs. You need to draw down a specific testable hypothesis, the days when rhetoric ruled evolutionary theory ended with sequencing. LISP has a lot of fans (Perl people like it), biological systems are far less tractable and much more diverse.  
> **username_3**: https://xkcd.com/793/  
> **username_0**: @terdon I explained exactly what the correspondence is and a simple prediction that results.  
> **username_1**: Well, operons are only relevant to bacterial genomes. What do you mean by "structural" genes? And yes, genes can be nested, but they can also overlap on opposite strands, are spliced, up and down regulated, all sorts of things. And then there are exceptions, edge cases, outliers... I still don't see what you're getting at here to be honest.  
> **username_0**: @terdon it looks like the genome uses a general structure that is the same as the basic LISP structure, so any theory regarding LISP type languages, and programming languages in general, is applicable to understanding the genome.  I'm asking if my understanding is correct, and if anyone has undertaken this sort of analysis before, i.e. analyzing the genome as if it is a programming language.  Let me know if this is still unclear and what more I can do to clarify my question.  
> **username_1**: I guess it may come down to my own ignorance (I am a biologist, not a computer scientist) but I have no idea what kind of theory you would be able to apply or how. My only contact with LISP is my `.emacsrc` file. But many of us here aren't engineers, so your question would benefit from a more specific explanation of what sort of tools/approaches you are thinking of. More to the point, I still feel you are not grasping just how complex and, most importantly, stochastic and chaotic system a genome is. I just don't see what benefit your approach would bring or how it would even be possible.  
> **username_0**: @terdon my basic idea is that if the LISP structure is consistent, then we could maybe look for other programming constructs built on the structure, such as recursion/looping, maybe templating or even object oriented programming.  Or just identify simple properties like balanced opening closing markers.  The mere fact it has a LISP structure would be fascinating if true.  
> **username_0**: @terdon also, more generally, I'm asking if anyone has taken this approach before, and demonstrated its effectiveness or found out there is some major problem so analyzing the genome as a programming language does not yield anything useful for a particular reason.  Do you happen to know either way what research has been done in this area?  Intuitively it seems a useful idea, because there is a wealth of knowledge regarding reverse engineering of programming languages, so we might be able to apply this knowledge to reverse engineer the genome.  
> **username_1**: Please [edit] your question and explain all this. Ideally, explain why you think programming languages are a good paradigm and better than natural languages. I still haven't seen any good evidence presented here and fear it might be a case of "when all you have is a hammer, everything looks like a nail". Granted, perhaps I'm the one with the hammer and not you, but that's why it would be really helpful if you could express your idea in terms of _specific_ features of programming languages and how those would help you understand the genome better than we do already.  
> **username_0**: @terdon I have added the explanation from the comments to the question.  Hopefully it is clear enough now.  
> **username_4**: I think the name we use for "reverse engineering knowledge base to better understand the genome" is genome annotation. But more seriously. I don't think there is any person who would possess sufficient knowledge of both to find *practical* analogies. Because we have plenty of ways how to analyze genome from different perspectives (e.g. genomes as subjects of mutations and selection over millions of years)m hence trying to fit some cs theories might be... difficult.  
> **username_0**: @KamilSJaron surely one more option might be helpful?  Why do you think this question is encountering so much resistance?  I've tried clarifying it a number of times, and in my opinion it is pretty clear what I am asking.  
> **username_2**: I'm voting to close this question as off-topic because it has nothing to do with bioinformatics  
> **username_0**: @MichaelG. seems like interpreting the genome as code is precisely bioinformatics.  Per the Wikipedia definition: As an interdisciplinary field of science, bioinformatics combines biology, computer science, information engineering, mathematics and statistics to analyze and interpret biological data.  
> **username_5**: @yters: bioinformatics is interpreting biological data with computers. The opposite is sometimes called "computational biology" which is using biological systems AS computers. Or analysing biological systems as if they were a computer. So DNA computing, for example.  
> **username_0**: @gilleain this is a bit different than using the systems as computers.  It is interpreting the systems as IT constructs, in this case a programming language.  Reading the Wikipedia articles on both topics, it still seems to me that bioinformatics is the best match, since the idea I propose relies on using computer science concepts to analyze the genome.  There is at least a surface visual similarity that seems quite strong, so I'm curious whether people have looked into this idea and what they have discovered.  

---

## 5 answers

### Answer by username_8 on 2019-07-04. Score: 6 | Accepted answer

I see what the metaphor has been inspired by, where I think it got turned around, and might have a better one.

I'd like to back up a bit and establish some common ground. It isn't wrong to expect that some aspects of genetic code and software code are similar, and while biology is usually very specific, some aspects can be seen productively from the light of computer science ideas. For example, mass-action molecular dynamics, which are often a good model for protein interactions, are Turing-complete. Here's a fun example where people have written a programming language out of molecular dynamics: <https://arxiv.org/abs/1809.07430>

It's also true that proteins have particular substructures leading to certain functions, such as using alpha-helices to react less with the outside world. Learning about larger substructures, called protein domains, help identify the functions of families of proteins.

The problem is that the parts of the genome which appear nested like LISP cells actually aren't included in the protein. The regulatory regions, promoters, inhibitors, introns, and so forth never become part of the key "computational" machinery. This nesting isn't actively part of the computational activity proteins do perform. The main quality of LISP is that the structure and function are perfectly self-similar throughout an expression, but the structure of the regulatory regions are neither replicated down into the protein nor are necessarily recapitulated on a larger scale.

Unfortunately, we don't expect the computational structure of proteins to be the same from one protein to another. This is because "binds only with X" and "binds only with Y" must be implemented differently to successfully be distinct operations, and it is these binding constraints by which molecular dynamics implement "computational" operations, such as "not X" and "not Y", and so those are distinct as well.

I think a better way to think about the regular structures of the regulatory apparatus is more like a network protocol. Along an otherwise undifferentiated binary channel, one has to identify when and where the data is delivered to an application. Similarly, along a strand of bases, the machinery of translation has to have an indication of where the "application" of the protein starts and ends, and when that protein should be delivered to the cell. We might compare some of the images of genetic structure that provided in the original question with layouts of network headers: <http://slideplayer.com/slide/4798836/15/images/16/TCP/IP+Packet+Structures.jpg> We might compare bacterial versus multi-cellular regulation as having different delivery mechanisms and data structures for delivering the application information, for different functional consequences, in the same way TCP and UDP have different structures for different trade-offs.

This is all complicated somewhat by the fact that proteins do then interact with the regulation of genes, leading to interesting "computational" dynamics such as feed-forward regulation. However, I'm not aware of any particular structure of the regulatory apparatus that necessarily correlates with these larger functional patterns. The opposite is frequently biologically useful: the same structure of a protein helping to activate one gene might simultaneously inhibit another.

One book I've found very accessible and useful in understanding where computation is useful biologically is Dennis Bray's "Wetware: a computer in every living cell". It gave me a clearer picture of how computation occurs in cells. That should open up some introductions to systems biology which explains the biological-role of larger molecular "computational" patterns.

> **Comments:**
> **username_0**: Great answer!  First answer of substance on either site!  I'll have to think it over, and if I find your reasoning persuasive, I'll accept this answer.  
> **username_8**: Thanks!  I'm glad you found the answer constructive.  After I found a useful perspective, I enjoyed thinking about the the question.  
> **username_0**: You say one problem with the idea is that the LISP like structure doesn't actually become part of the computational machinery.  I'm not sure this invalidates the connection I see.  When a LISP program is compiled down to the machine code format, the high level structure disappears.  This sounds like what you are saying with regard to proteins.  All the structural patterns disappear once the genome is compiled into a protein.  So, to my ears it seems you are saying LISP and the genome are the same in this regard, instead of different.  Perhaps you can clarify?  BTW, good point about protocols.  
> **username_0**: A high level comment, I think your network protocol idea and this LISP idea are consistent with a broader idea that the genome may have a number of different protocols that are followed, just like a modern distributed computing system.  And while they are understood holistically in reference to each other, each protocol can also be analyzed by itself.  Perhaps the same mode of thinking applies to the genetic code and regulation networks.  While they can be understood holistically, they perhaps can also be understood individually.  
> **username_8**: Right, so it is true that a kind of compilation does happen, where sequences of bases undergo a translation into the amino acids that make the protein.  The observation that I'm making is that the part of the gene in which you observed the LISP structure, is not included in that translation process.  Instead, those structures have been stripped away at that point.  This is similar to how when data is provided by a network protocol to the application, those headers are not delivered to the application.  
> **username_8**: The question is then whether or not we expect to see regular structures corresponding to computational structures in the part of the gene that is then translated, such as how we would see machine instructions for branching, adding, and these sorts of things.  Unfortunately, the answer is generally not, as the computations implied have to be specific for each different input.  If the answer were yes, the challenges of bioinformatics would be much easier!  
> **username_8**: It occurs to me that it might be helpful to know that promoters, inhibitors, introns, and so forth are occasionally called "non-coding regions" given that they aren't included in translation.  The following diagram might be helpful:  https://en.wikipedia.org/wiki/File:Gene_structure_prokaryote_2_annotated.svg  
> **username_0**: I see, just the genes inside the segment remain when translation takes place.  So, in that sense it is dissimilar to LISP, since the function in a LISP s-exp would be a part of the compilation process.  On the other hand, the non-coding section does seem to play a role in whether and how the genes are translated, if I'm understanding the answers so far.  And, thus this prokaryote genome structure still looks a lot like a LISP s-exp, since it can presumably also be nested: https://en.wikipedia.org/wiki/S-expression  
> **username_8**: As you've inferred, it is entirely right that these non-coding sections do play a role in regulation.  The way that regulation generally works, crudely speaking, is that whether transcription can go ahead or not depends upon how proteins bind to these regulatory sections, either guiding or blocking the transcription machinery.  The content of these regulatory sections must then be specific to the proteins that do work, so that once again the computational work that is done unfortunately must be specific to each family of proteins and not part of a more general computational mechanism.  
> **username_8**: I agree that there is a kind of nesting that can be represented as an S-expression.  Instead, it's my contention that the S-expression could be a misleading choice for representing that structure, as I propose that the nesting that you've observed is better explained as the nesting of protocols rather than the recursive nesting of context-free grammars.  By protocol nesting, I mean that after the data has been delivered from one protocol, and the metadata of that protocol is removed, the resulting data has the data and metadata of the next protocol.  
> **username_0**: Thanks again, this is a truly excellent series of answers, and you've clarified the issue greatly in my mind and given me a reference to further my understanding.  Great work!  
> **username_8**: Great, I'm glad to read that this has been helpful.  I have to hand it to you for not being dissuaded from pursuing a potential hypothesis for the structure you observed, while yet entertaining suggestions counter to your hypothesis, until you found an explanation that attempted to address all the issues.  

---

### Answer by username_1 on 2019-07-03. Score: 5

> So, first of all, is my high level observation correct? Does the genome, at least for bacteria, have a global LISP like structure?

No. I'm afraid this is what it boils down to. I don't see any real similarity to LISP or other programming languages at all. Perhaps it would be clearer if you could explain *in detail* why you think they're similar, but as it stands, no, there is no such structure apart from a very simplistic similarity which is sort of the same as saying that the genome is like a car because it carries genes and could therefore be studied by a car mechanic.

> **Comments:**
> **username_0**: You don't find the correspondence list in my question clear enough?  I'm asking about the structure, which seems to be the same as a LISP program, or perhaps more generally an abstract syntax tree.  And yes, the structure itself is pretty simple, but still there seems to be an exact correspondence, more so than referring to a car. I am somewhat bemused this question is so hard for people to understand and answer.  
> **username_1**: @yters no,  I don't find it clear at all. As far as I can tell, you seem to be comparing functions and their arguments to operons and their genes, but I don't see any similarity at all there. That's why I posted so many comments asking you to get more specific. I have no idea why you feel that operons are more like functions than they are like cars or bowls or anything else that can contain items. You might want to look into gene regulatory networks though, those are closer to what you're getting at.  
> **username_0**: You could say there is a disanalogy in that the promoter/operator is not really a function, but controls whether the genes in the operon are "executed".  But there is still generally a notion of "execute this thing" and a nested tree structure.  
> **username_1**: @yters not really. That's not how the promoter works. Promoters tend to control how much it is executed, not whether. And they're just the tip of the iceberg in terms of regulation.  
> **username_0**: but is it correct the promoter/operator preamble somehow controls the manner in which the subsequent genes are 'executed'?  
> **username_1**: @yters it is only one of many things that affect gene expression, some of which are before the gene, some in it, some after it, some can even be quite distant from it and others aren't even part of the genome at all. As I said before, you are vastly underestimating the complexity of the genome.  
> **username_0**: I don't deny the extreme complexity of the greater context.  But, just as I can understand the C code of some UNIX utility without having to understand UNIX, perhaps we can analyze a genome by itself, to at least some degree.  

---

### Answer by username_6 on 2019-07-03. Score: 2

You mention this as the base similarity you find:

> operator = function  
> structural genes = variables  
> structural genes can be nested like cons cells

As other has pointed, this just considers the genome as a sequence of where only the linear order is important. It doesn't take into account other things that happen on the genome that are know to affect the cells like the chromatin structure, the duplication of certain regions, the transversion, the effect of moving elements, methylation, or simply that a single gene can have multiple functions (pleiotropism, moonlighting) while a programming function does not.

Even if we considered it as code, certainly by using tools like HMM we could also learn more about the structure of the genes we have. While certainly, we need more tools than just the sequence to discover what does each gene do.

There are a lot more differences than similarities on this comparison, it can be helpful for certain aspects but it fails for other aspects of cells (without even going into the virus discussion or the mitochondrial).


---

### Answer by username_2 on 2019-07-03. Score: 0

The only possible parallel was the "processor 'core' wars" in [Avida](https://en.wikipedia.org/wiki/Avida) and [Tierra](https://en.wikipedia.org/wiki/Tierra_(computer_simulation)). Tierra was initiated by Tom Ray, around 1990. Here they had a 'population' of compiled binaries were randomly mutated (yep the binary code was mutated) and reproduction was dependent on how much of the processor could be consumed. The simulation worked and an in silico ecosystem evolved, but was heavily dependent on the preconditions of the simulation and proved no more reliabe at understanding evolution than differential equestions. So it was a nice idea, and very cool it worked, but it came to zero.

That aside the best example was the concept of the "selfish gene", but has very little to do with programming languages IMO and everything to do with understanding kinselection.

> **Comments:**
> **username_0**: Not sure what question you are answering here.  I am not asking about evolution simulations.  
> **username_2**: To say I want "genome understanding" without evolution, is like saying I want a watch without hands. Can't have one without the other.  
> **username_0**: I would say it is more like I can understand the C source code of a UNIX utility without having to know the history of UNIX or C's development.  

---

### Answer by username_7 on 2019-07-03. Score: -5

Believe it or not, there are people who know more than you do about programming, and who also know a hell of a lot more than you do about the genome. This is not an avenue those people think is worth pursuing.

DNA is a chemical, and interacts with other chemicals based on its shape. There is no equivalent to that in a human designed programming language.

> **Comments:**
> **username_1**: This seems unnecessarily combative. The OP never claimed to be an expert!  
> **username_7**: Which is why OPs first step should have been to read what experts in both subjects have been doing in the field he's interested in, instead of trying to impress a bunch of volunteers with programming jargon.  
> **username_1**: Wow. Please take a step back and stop assuming malice. The OP did do some research and did try and see if any work had been done. Nobody's out to impress anybody here, so please stop being so aggressive!  

---

