import%20marimo%0A%0A__generated_with%20%3D%20%220.25.0%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20from%20ired_88_research_copilot%20import%20data%2C%20theme%0A%0A%20%20%20%20theme.apply()%0A%20%20%20%20return%20data%2C%20mo%2C%20theme%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo%2C%20theme)%3A%0A%20%20%20%20mo.md(f%22%22%22%0A%20%20%20%20%3Cdiv%20style%3D%22background%3Alinear-gradient(135deg%2C%20%7Btheme.PRIMARY%7D%200%25%2C%20%23134e4a%20100%25)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20border-radius%3A16px%3B%20padding%3A28px%2032px%3B%20color%3Awhite%3B%22%3E%0A%20%20%20%20%3Cdiv%20style%3D%22font-size%3A13px%3B%20letter-spacing%3A2px%3B%20opacity%3A0.85%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20text-transform%3Auppercase%3B%22%3EAI%20as%20a%20Research%20Co-Pilot%20%C2%B7%20Live%20demo%3C%2Fdiv%3E%0A%20%20%20%20%3Ch1%20style%3D%22margin%3A10px%200%206px%200%3B%20font-size%3A34px%3B%20line-height%3A1.15%3B%22%3E%0A%20%20%20%20The%20IRED-88%20Research%20Copilot%3C%2Fh1%3E%0A%20%20%20%20%3Cdiv%20style%3D%22font-size%3A15px%3B%20opacity%3A0.92%3B%22%3E%0A%20%20%20%20One%20enzyme%2C%20four%20data%20modalities%2C%20one%20question%20ladder%20--%20in%20a%20single%20repo.%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20An%20enzyme-engineering%20campaign%20produced%20a%20deep%20mutational%20scan%2C%20an%0A%20%20%20%20enantioselectivity%20table%2C%20a%201.9%20A%20crystal%20structure%2C%20and%20a%20set%20of%0A%20%20%20%20engineered%20variants.%20Around%20it%20sits%20a%20small%20**knowledge%20base**%20of%20six%0A%20%20%20%20papers.%20This%20demo%20runs%20the%20round-trip%20between%20all%20four%20modalities%20--%0A%20%20%20%20and%20asks%20one%20question%20on%20the%20way%3A%0A%0A%20%20%20%20%3E%20%23%23%23%23%20Where%20do%20activity-improving%20mutations%20of%20the%20enzyme%20IRED-88%20come%20from%20--%20and%20could%20we%20have%20seen%20them%20coming%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(data%2C%20mo)%3A%0A%20%20%20%20singles%20%3D%20data.extract_single_mutants(data.load_si002())%0A%20%20%20%20cover_stats%20%3D%20mo.hstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.stat(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%3Df%22%7Blen(singles)%3A%2C%7D%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20label%3D%22single%20mutants%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20caption%3D%22of%205%2C776%20possible%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.stat(value%3D%2281%25%22%2C%20label%3D%22library%20coverage%22%2C%20caption%3D%22cloned%20%26%20measured%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.stat(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%3D%22310%22%2C%20label%3D%22engineered%20variants%22%2C%20caption%3D%22doubles%20%26%20triples%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.stat(value%3D%226%22%2C%20label%3D%22KB%20papers%22%2C%20caption%3D%22kb%2Fpapers%2F%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.stat(value%3D%22290%22%2C%20label%3D%22crystal%20residues%22%2C%20caption%3D%22of%20304%20(PDB%207OG3)%22)%2C%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20justify%3D%22space-between%22%2C%0A%20%20%20%20%20%20%20%20widths%3D%22equal%22%2C%0A%20%20%20%20)%0A%20%20%20%20cover_stats%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20The%20question%20ladder%0A%0A%20%20%20%20Each%20notebook%20answers%20one%20question%3B%20together%20they%20answer%20the%20big%20one.%0A%20%20%20%20Everything%20runs%20top-to-bottom%20with%20no%20hidden%20state%20--%20every%20claim%0A%20%20%20%20traces%20to%20a%20cell%2C%20a%20file%2C%20or%20a%20KB%20note.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%7C%20%23%20%7C%20Notebook%20%7C%20Question%20%7C%20Leans%20on%20%7C%0A%20%20%20%20%7C---%7C----------%7C----------%7C----------%7C%0A%20%20%20%20%7C%20**Q1**%20%7C%20%6001_dms_activity_map.py%60%20%7C%20Which%20mutations%20improve%20activity%2C%20and%20where%20do%20they%20sit%3F%20%7C%20DMS%20table%20(SI-002)%20%7C%0A%20%20%20%20%7C%20**Q2**%20%7C%20%6002_structure_context.py%60%20%7C%20Are%20the%20hits%20where%20the%20structure%20says%20they%20should%20be%3F%20%7C%20DMS%20%2B%20PDB%207OG3%20%7C%0A%20%20%20%20%7C%20**Q3**%20%7C%20%6003_knowledge_base.py%60%20%7C%20What%20does%20prior%20work%20already%20know%3F%20%7C%20%60kb%2Fpapers%2F*.md%60%20%7C%0A%20%20%20%20%7C%20**Q4**%20%7C%20%6004_structure_prediction.py%60%20%7C%20What%20does%20prediction%20see%20that%20the%20crystal%20cannot%3F%20%7C%20ESMFold%20%2B%207OG3%20%7C%0A%20%20%20%20%7C%20**Q5**%20%7C%20%6005_additivity.py%60%20%7C%20Doubles%20%26%20triples%3A%20additive%20or%20epistatic%3F%20%7C%20SI-003%20%2B%20site%20classes%20%7C%0A%20%20%20%20%7C%20**Q6**%20%7C%20%6006_masked_recovery.py%60%20%7C%20If%20the%20DMS%20had%20a%20hole%20where%20the%20literature%20matters%3F%20%7C%20everything%20%7C%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20The%20four%20modalities%0A%0A%20%20%20%20%7C%20Modality%20%7C%20Where%20%7C%20What%20it%20is%20good%20at%20%7C%0A%20%20%20%20%7C----------%7C-------%7C--------------------%7C%0A%20%20%20%20%7C%20**DMS%20%2B%20ee%20data**%20%7C%20%60data%2Fraw%2F%60%20%7C%20*Discovery*%20--%20finding%20hits%20nobody%20guessed%20%7C%0A%20%20%20%20%7C%20**Crystal%20structure**%20%7C%20%60data%2Fexternal%2F7OG3.pdb%60%20%7C%20*Mechanism%20filtering*%20--%20killing%20bad%20priors%20%7C%0A%20%20%20%20%7C%20**Knowledge%20base**%20%7C%20%60kb%2F%60%20%7C%20*Explanation%20%26%20recovery*%20--%20naming%20what%20worked%20and%20why%20%7C%0A%20%20%20%20%7C%20**Structure%20prediction**%20%7C%20%60data%2Fexternal%2Fired88_esmfold.pdb%60%20%7C%20*Blind-spot%20extension*%20--%20with%20a%20confidence%20score%20attached%20%7C%0A%0A%20%20%20%20Helper%20code%20lives%20in%20%60ired_88_research_copilot%2F%60%20(%60data.py%60%2C%0A%20%20%20%20%60structure.py%60%2C%20%60kb.py%60%2C%20%60theme.py%60)%2C%20with%20tests%20in%20%60tests%2F%60.%0A%20%20%20%20Presenting%20live%3F%20%60notebooks%2Flive%2F%60%20holds%20empty%20skeleton%20twins%20of%0A%20%20%20%20every%20notebook.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Run%20it%0A%0A%20%20%20%20%60%60%60bash%0A%20%20%20%20pixi%20install%0A%20%20%20%20pixi%20run%20fetch-data%0A%20%20%20%20pixi%20run%20marimo%20edit%20notebooks%2F%0A%20%20%20%20%60%60%60%0A%0A%20%20%20%20Data%20source%3A%20supporting%20information%20of%20Ma%20et%20al.%2C%0A%20%20%20%20*ACS%20Catal.*%20**2021**%2C%2011%20(20)%2C%2012433-12445%0A%20%20%20%20(%5B10.1021%2Facscatal.1c02786%5D(https%3A%2F%2Fpubs.acs.org%2Fdoi%2Fabs%2F10.1021%2Facscatal.1c02786))%2C%0A%20%20%20%20from%20Eric%20Ma's%20enzyme-engineering%20work%20at%20Novartis.%20Crystal%20structure%3A%0A%20%20%20%20%5BPDB%207OG3%5D(https%3A%2F%2Fwww.rcsb.org%2Fstructure%2F7OG3).%20Use%20the%20bundled%20data%0A%20%20%20%20for%20demos%20and%20teaching%3B%20cite%20the%20paper%20for%20anything%20beyond%20that.%0A%0A%20%20%20%20Start%20with%20%6001_dms_activity_map.py%60.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
988bc135e6e8e97ec3f78d458ec25906