4 ms·
Prolog. I think that genetic logic can largely be expressed in Prolog to enable doing some crazy stuff that hasn’t been explored yet. It’s crazy to me that synt
by koeng 7y ago
Prolog. I think that genetic logic can largely be expressed in Prolog to enable doing some crazy stuff that hasn’t been explored yet. It’s crazy to me that synthetic biology hasn’t really used logical programming yet for gene design.
- biot 7y agoI’m fascinated by what this might look like. Have you written anything on this concept?
- koeng 7y agoNot yet, I was in the middle of building a script to convert metacyc (https://metacyc.org/ https://metacyc.org/) to a Prolog database when COVID-19 hit - now I'm distracted figuring out the logistics of doing local production of diagnostic enzymes. I've written something for the biotech crowd (to get DNA synthesis from FreeGenes), so it uses some odd vernacular and definitely isn't perfect for tech crowd - no actual code implementing it yet, but has some useful historical context of how this lands in with everything else. https://docs.google.com/document/d/1odf8q7ir9NsS0zPvArEg0j0WepEAOGAATOkvQpZgW7s/edit?usp=sharing https://docs.google.com/document/d/1odf8q7ir9NsS0zPvArEg0j0W...
- Twisol 7y agoLogic programming is badly underapplied in general, I think. Most of the amazing work in this area never seems to have gotten far out of academia (if at all) -- Prolog being the almost singular exception. Would be awesome to see some motivating examples for this application. It sounds really cool!
- koeng 7y agoIn synthetic biology, the application is super clear. Let's say we want to make cocaine (or related compounds) in yeast (https://www.nature.com/articles/s41467-019-11588-w https://www.nature.com/articles/s41467-019-11588-w). Well, we know the biosynthetic pathway to get to that molecule (https://biocyc.org/META/new-image?type=PATHWAY&object=PWY-5843 https://biocyc.org/META/new-image?type=PATHWAY&object=PWY-58...), and we know the biosynthetic pathways in yeast that intersect with that pathway. In the tropane paper, they express 15 new genes and did 7 disruptions. There should be a way to declare "I want this end product" and a system knowledgeable about the proteins associated with the reactions necessary to get there should be able to fit the puzzle of "ok, if you express these proteins you get that end product, and if you knock down these genes in the organism it should increase your production". This generalized system should be applicable to nearly any biosynthetic pathway, and I think there is definitely a profitable niche at being good at that.
- deleted 7y ago[deleted]
- vfinn 7y agoCould you shed some more light on this amazing work you're talking about?
- Twisol 7y agoSure. First, I'd recommend checking out the website of HN user 'triska at https://www.metalevel.at/prolog https://www.metalevel.at/prolog -- there's more to Prolog itself than most people are ever made aware of. Frank Pfenning at CMU does some really cool research on concurrency using logical semantics and sequent calculi (https://www.cs.cmu.edu/~fp/ https://www.cs.cmu.edu/~fp/). Session types might be the coolest thing out of this particular corner of the field, but there's so much more to explore here. Going back some decades, concurrent constraint programming (CCP) takes the position that concurrent processes communicate by posting constraints upon a shared store. Vijay Saraswat's ask/tell CCP model has been a real inspiration to me. As best as I can tell, his work is based on forward reasoning, as opposed to Prof. Pfenning's work, which appears to use backwards reasoning (as does Prolog). (There's an interesting duality between the two kinds of reasoning, which I am not at all positioned to opine on.) Some of the functional work I've seen on concurrency ends up going in a logical direction without realizing it; the more recent LVars papers (Lindsey Kuper and Ryan Newton) build up a lovely abstraction in Haskell that's conceptually the same as Saraswat's ask/tell logical framework, but they don't seem to realize it until several papers in. (It's all fantastic work! It's just a shame the communities have so little overlap.) Logic programming allows you to model mutable state, and it gives you high-powered tools to reason about how that state changes over time. As a concrete example, you only need term unification and logical variables to get undirected communication channels in a logic program. Unifying a variable with a term in one part of the program allows other users of the variable to match on it and obtain information about that term. In this sense, it goes in the complete opposite direction from functional programming, which eschews state and treats it as something to be derived from a stateless foundation.
- codekilla 7y agoYeah, checkout Maude--really woefully underutilized. Some fascinating things around pathway logic that are applied to biology: http://pl.csl.sri.com http://pl.csl.sri.com
- koeng 7y agoThat's amazing! I've never found that site before but I'm going to read some of their papers. Thank you for linking
- codekilla 7y agoMaude fascinates me to no end. Currently I'm actually re-learning kdb+/q as I want to implement some things related to bioinformatics using it, but at some point I'd really like to do some things with logic/dependent types in biology. Happy to chat further grant <at> eonias dot org
- koeng 7y agoIs there any reason why Maude is cooler than Prolog? Concurrency? Also - will email you!
- tobmlt 7y agoHave you any thoughts on medikanren? I think they are generally _thinking_ as you do but in the short term that project is more about searching medical knowledge bases as opposed to logical programming of/with genes.
- koeng 7y agoI can't find that much information about it online, but it looks great from a outside perspective! Wish they had a paper or something.
- emmanueloga_ 7y agoCool. This subject is on my list and will probably approach it through Clojure's Core.Logic (a logic library inspired by both prolog and miniKanren) [1] 1: https://github.com/clojure/core.logic https://github.com/clojure/core.logic
- gotts 7y agoHave you checked pldb/db-rel from core.logic?
- emmanueloga_ 7y agoI haven't started checking the library yet... But I have it on my radar, since I'm already doing clojure I feel like it is an easy way to "add some prolog" to my programs :-)
- koeng 7y agoI've heard Datomic was made by Clojure people and is really good software too, though unfortunately proprietary.
- jdminhbg 7y agoAll of those things are true. If you want to check out Datalog-using DBs in Clojure that are open source, here are two alternatives: * Datahike (similar to Datomic but similar): https://github.com/replikativ/datahike https://github.com/replikativ/datahike * Crux (a bitemporal graph database): https://opencrux.com https://opencrux.com
- thijsvandien 7y agoAs a great opportunity to learn, volunteers behind SWI-Prolog will very soon organize another round of the online class they did back in 2018: https://twitter.com/SWI_Prolog/status/1246440776470536192 https://twitter.com/SWI_Prolog/status/1246440776470536192
- koeng 7y agoThanks! Signed up.