aurelian 0.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. aurelian/__init__.py +9 -0
  2. aurelian/agents/__init__.py +0 -0
  3. aurelian/agents/amigo/__init__.py +3 -0
  4. aurelian/agents/amigo/amigo_agent.py +77 -0
  5. aurelian/agents/amigo/amigo_config.py +85 -0
  6. aurelian/agents/amigo/amigo_evals.py +73 -0
  7. aurelian/agents/amigo/amigo_gradio.py +52 -0
  8. aurelian/agents/amigo/amigo_mcp.py +152 -0
  9. aurelian/agents/amigo/amigo_tools.py +152 -0
  10. aurelian/agents/biblio/__init__.py +42 -0
  11. aurelian/agents/biblio/biblio_agent.py +94 -0
  12. aurelian/agents/biblio/biblio_config.py +40 -0
  13. aurelian/agents/biblio/biblio_gradio.py +67 -0
  14. aurelian/agents/biblio/biblio_mcp.py +115 -0
  15. aurelian/agents/biblio/biblio_tools.py +164 -0
  16. aurelian/agents/biblio_agent.py +46 -0
  17. aurelian/agents/checklist/__init__.py +44 -0
  18. aurelian/agents/checklist/checklist_agent.py +85 -0
  19. aurelian/agents/checklist/checklist_config.py +28 -0
  20. aurelian/agents/checklist/checklist_gradio.py +70 -0
  21. aurelian/agents/checklist/checklist_mcp.py +86 -0
  22. aurelian/agents/checklist/checklist_tools.py +141 -0
  23. aurelian/agents/checklist/content/checklists.yaml +7 -0
  24. aurelian/agents/checklist/content/streams.csv +136 -0
  25. aurelian/agents/checklist_agent.py +40 -0
  26. aurelian/agents/chemistry/__init__.py +3 -0
  27. aurelian/agents/chemistry/chemistry_agent.py +46 -0
  28. aurelian/agents/chemistry/chemistry_config.py +71 -0
  29. aurelian/agents/chemistry/chemistry_evals.py +79 -0
  30. aurelian/agents/chemistry/chemistry_gradio.py +50 -0
  31. aurelian/agents/chemistry/chemistry_mcp.py +120 -0
  32. aurelian/agents/chemistry/chemistry_tools.py +121 -0
  33. aurelian/agents/chemistry/image_agent.py +15 -0
  34. aurelian/agents/d4d/__init__.py +30 -0
  35. aurelian/agents/d4d/d4d_agent.py +72 -0
  36. aurelian/agents/d4d/d4d_config.py +46 -0
  37. aurelian/agents/d4d/d4d_gradio.py +58 -0
  38. aurelian/agents/d4d/d4d_mcp.py +71 -0
  39. aurelian/agents/d4d/d4d_tools.py +157 -0
  40. aurelian/agents/d4d_agent.py +64 -0
  41. aurelian/agents/diagnosis/__init__.py +33 -0
  42. aurelian/agents/diagnosis/diagnosis_agent.py +53 -0
  43. aurelian/agents/diagnosis/diagnosis_config.py +48 -0
  44. aurelian/agents/diagnosis/diagnosis_evals.py +76 -0
  45. aurelian/agents/diagnosis/diagnosis_gradio.py +52 -0
  46. aurelian/agents/diagnosis/diagnosis_mcp.py +141 -0
  47. aurelian/agents/diagnosis/diagnosis_tools.py +204 -0
  48. aurelian/agents/diagnosis_agent.py +28 -0
  49. aurelian/agents/draw/__init__.py +3 -0
  50. aurelian/agents/draw/draw_agent.py +39 -0
  51. aurelian/agents/draw/draw_config.py +26 -0
  52. aurelian/agents/draw/draw_gradio.py +50 -0
  53. aurelian/agents/draw/draw_mcp.py +94 -0
  54. aurelian/agents/draw/draw_tools.py +100 -0
  55. aurelian/agents/draw/judge_agent.py +18 -0
  56. aurelian/agents/filesystem/__init__.py +0 -0
  57. aurelian/agents/filesystem/filesystem_config.py +27 -0
  58. aurelian/agents/filesystem/filesystem_gradio.py +49 -0
  59. aurelian/agents/filesystem/filesystem_mcp.py +89 -0
  60. aurelian/agents/filesystem/filesystem_tools.py +95 -0
  61. aurelian/agents/filesystem/py.typed +0 -0
  62. aurelian/agents/github/__init__.py +0 -0
  63. aurelian/agents/github/github_agent.py +83 -0
  64. aurelian/agents/github/github_cli.py +248 -0
  65. aurelian/agents/github/github_config.py +22 -0
  66. aurelian/agents/github/github_gradio.py +152 -0
  67. aurelian/agents/github/github_mcp.py +252 -0
  68. aurelian/agents/github/github_tools.py +408 -0
  69. aurelian/agents/github/github_tools.py.tmp +413 -0
  70. aurelian/agents/goann/__init__.py +13 -0
  71. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines.md +1000 -0
  72. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines.pdf +0 -0
  73. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines_Paper.md +693 -0
  74. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines_Paper.pdf +0 -0
  75. aurelian/agents/goann/goann_agent.py +90 -0
  76. aurelian/agents/goann/goann_config.py +90 -0
  77. aurelian/agents/goann/goann_evals.py +104 -0
  78. aurelian/agents/goann/goann_gradio.py +62 -0
  79. aurelian/agents/goann/goann_mcp.py +0 -0
  80. aurelian/agents/goann/goann_tools.py +65 -0
  81. aurelian/agents/gocam/__init__.py +43 -0
  82. aurelian/agents/gocam/documents/DNA-binding transcription factor activity annotation guidelines.docx +0 -0
  83. aurelian/agents/gocam/documents/DNA-binding transcription factor activity annotation guidelines.pdf +0 -0
  84. aurelian/agents/gocam/documents/DNA-binding_transcription_factor_activity_annotation_guidelines.md +100 -0
  85. aurelian/agents/gocam/documents/E3 ubiquitin ligases.docx +0 -0
  86. aurelian/agents/gocam/documents/E3 ubiquitin ligases.pdf +0 -0
  87. aurelian/agents/gocam/documents/E3_ubiquitin_ligases.md +134 -0
  88. aurelian/agents/gocam/documents/GO-CAM annotation guidelines README.docx +0 -0
  89. aurelian/agents/gocam/documents/GO-CAM annotation guidelines README.pdf +0 -0
  90. aurelian/agents/gocam/documents/GO-CAM modelling guidelines TO DO.docx +0 -0
  91. aurelian/agents/gocam/documents/GO-CAM modelling guidelines TO DO.pdf +0 -0
  92. aurelian/agents/gocam/documents/GO-CAM_annotation_guidelines_README.md +1 -0
  93. aurelian/agents/gocam/documents/GO-CAM_modelling_guidelines_TO_DO.md +3 -0
  94. aurelian/agents/gocam/documents/How to annotate complexes in GO-CAM.docx +0 -0
  95. aurelian/agents/gocam/documents/How to annotate complexes in GO-CAM.pdf +0 -0
  96. aurelian/agents/gocam/documents/How to annotate molecular adaptors.docx +0 -0
  97. aurelian/agents/gocam/documents/How to annotate molecular adaptors.pdf +0 -0
  98. aurelian/agents/gocam/documents/How to annotate sequestering proteins.docx +0 -0
  99. aurelian/agents/gocam/documents/How to annotate sequestering proteins.pdf +0 -0
  100. aurelian/agents/gocam/documents/How_to_annotate_complexes_in_GO-CAM.md +29 -0
  101. aurelian/agents/gocam/documents/How_to_annotate_molecular_adaptors.md +31 -0
  102. aurelian/agents/gocam/documents/How_to_annotate_sequestering_proteins.md +42 -0
  103. aurelian/agents/gocam/documents/Molecular adaptor activity.docx +0 -0
  104. aurelian/agents/gocam/documents/Molecular adaptor activity.pdf +0 -0
  105. aurelian/agents/gocam/documents/Molecular carrier activity.docx +0 -0
  106. aurelian/agents/gocam/documents/Molecular carrier activity.pdf +0 -0
  107. aurelian/agents/gocam/documents/Molecular_adaptor_activity.md +51 -0
  108. aurelian/agents/gocam/documents/Molecular_carrier_activity.md +41 -0
  109. aurelian/agents/gocam/documents/Protein sequestering activity.docx +0 -0
  110. aurelian/agents/gocam/documents/Protein sequestering activity.pdf +0 -0
  111. aurelian/agents/gocam/documents/Protein_sequestering_activity.md +50 -0
  112. aurelian/agents/gocam/documents/Signaling receptor activity annotation guidelines.docx +0 -0
  113. aurelian/agents/gocam/documents/Signaling receptor activity annotation guidelines.pdf +0 -0
  114. aurelian/agents/gocam/documents/Signaling_receptor_activity_annotation_guidelines.md +187 -0
  115. aurelian/agents/gocam/documents/Transcription coregulator activity.docx +0 -0
  116. aurelian/agents/gocam/documents/Transcription coregulator activity.pdf +0 -0
  117. aurelian/agents/gocam/documents/Transcription_coregulator_activity.md +36 -0
  118. aurelian/agents/gocam/documents/Transporter activity annotation annotation guidelines.docx +0 -0
  119. aurelian/agents/gocam/documents/Transporter activity annotation annotation guidelines.pdf +0 -0
  120. aurelian/agents/gocam/documents/Transporter_activity_annotation_annotation_guidelines.md +43 -0
  121. Regulatory Processes in GO-CAM.docx +0 -0
  122. Regulatory Processes in GO-CAM.pdf +0 -0
  123. aurelian/agents/gocam/documents/WIP_-_Regulation_and_Regulatory_Processes_in_GO-CAM.md +31 -0
  124. aurelian/agents/gocam/documents/md/DNA-binding_transcription_factor_activity_annotation_guidelines.md +131 -0
  125. aurelian/agents/gocam/documents/md/E3_ubiquitin_ligases.md +166 -0
  126. aurelian/agents/gocam/documents/md/GO-CAM_annotation_guidelines_README.md +1 -0
  127. aurelian/agents/gocam/documents/md/GO-CAM_modelling_guidelines_TO_DO.md +5 -0
  128. aurelian/agents/gocam/documents/md/How_to_annotate_complexes_in_GO-CAM.md +28 -0
  129. aurelian/agents/gocam/documents/md/How_to_annotate_molecular_adaptors.md +19 -0
  130. aurelian/agents/gocam/documents/md/How_to_annotate_sequestering_proteins.md +38 -0
  131. aurelian/agents/gocam/documents/md/Molecular_adaptor_activity.md +52 -0
  132. aurelian/agents/gocam/documents/md/Molecular_carrier_activity.md +59 -0
  133. aurelian/agents/gocam/documents/md/Protein_sequestering_activity.md +52 -0
  134. aurelian/agents/gocam/documents/md/Signaling_receptor_activity_annotation_guidelines.md +271 -0
  135. aurelian/agents/gocam/documents/md/Transcription_coregulator_activity.md +54 -0
  136. aurelian/agents/gocam/documents/md/Transporter_activity_annotation_annotation_guidelines.md +38 -0
  137. aurelian/agents/gocam/documents/md/WIP_-_Regulation_and_Regulatory_Processes_in_GO-CAM.md +39 -0
  138. aurelian/agents/gocam/documents/pandoc_md/Signaling_receptor_activity_annotation_guidelines.md +334 -0
  139. aurelian/agents/gocam/gocam_agent.py +240 -0
  140. aurelian/agents/gocam/gocam_config.py +85 -0
  141. aurelian/agents/gocam/gocam_curator_agent.py +46 -0
  142. aurelian/agents/gocam/gocam_evals.py +67 -0
  143. aurelian/agents/gocam/gocam_gradio.py +89 -0
  144. aurelian/agents/gocam/gocam_mcp.py +224 -0
  145. aurelian/agents/gocam/gocam_tools.py +294 -0
  146. aurelian/agents/linkml/__init__.py +0 -0
  147. aurelian/agents/linkml/linkml_agent.py +62 -0
  148. aurelian/agents/linkml/linkml_config.py +48 -0
  149. aurelian/agents/linkml/linkml_evals.py +66 -0
  150. aurelian/agents/linkml/linkml_gradio.py +45 -0
  151. aurelian/agents/linkml/linkml_mcp.py +186 -0
  152. aurelian/agents/linkml/linkml_tools.py +102 -0
  153. aurelian/agents/literature/__init__.py +3 -0
  154. aurelian/agents/literature/literature_agent.py +55 -0
  155. aurelian/agents/literature/literature_config.py +35 -0
  156. aurelian/agents/literature/literature_gradio.py +52 -0
  157. aurelian/agents/literature/literature_mcp.py +174 -0
  158. aurelian/agents/literature/literature_tools.py +182 -0
  159. aurelian/agents/monarch/__init__.py +25 -0
  160. aurelian/agents/monarch/monarch_agent.py +44 -0
  161. aurelian/agents/monarch/monarch_config.py +45 -0
  162. aurelian/agents/monarch/monarch_gradio.py +51 -0
  163. aurelian/agents/monarch/monarch_mcp.py +65 -0
  164. aurelian/agents/monarch/monarch_tools.py +113 -0
  165. aurelian/agents/oak/__init__.py +0 -0
  166. aurelian/agents/oak/oak_config.py +27 -0
  167. aurelian/agents/oak/oak_gradio.py +57 -0
  168. aurelian/agents/ontology_mapper/__init__.py +31 -0
  169. aurelian/agents/ontology_mapper/ontology_mapper_agent.py +56 -0
  170. aurelian/agents/ontology_mapper/ontology_mapper_config.py +50 -0
  171. aurelian/agents/ontology_mapper/ontology_mapper_evals.py +108 -0
  172. aurelian/agents/ontology_mapper/ontology_mapper_gradio.py +58 -0
  173. aurelian/agents/ontology_mapper/ontology_mapper_mcp.py +81 -0
  174. aurelian/agents/ontology_mapper/ontology_mapper_tools.py +147 -0
  175. aurelian/agents/phenopackets/__init__.py +3 -0
  176. aurelian/agents/phenopackets/phenopackets_agent.py +58 -0
  177. aurelian/agents/phenopackets/phenopackets_config.py +72 -0
  178. aurelian/agents/phenopackets/phenopackets_evals.py +99 -0
  179. aurelian/agents/phenopackets/phenopackets_gradio.py +55 -0
  180. aurelian/agents/phenopackets/phenopackets_mcp.py +178 -0
  181. aurelian/agents/phenopackets/phenopackets_tools.py +127 -0
  182. aurelian/agents/rag/__init__.py +40 -0
  183. aurelian/agents/rag/rag_agent.py +83 -0
  184. aurelian/agents/rag/rag_config.py +80 -0
  185. aurelian/agents/rag/rag_gradio.py +67 -0
  186. aurelian/agents/rag/rag_mcp.py +107 -0
  187. aurelian/agents/rag/rag_tools.py +189 -0
  188. aurelian/agents/rag_agent.py +54 -0
  189. aurelian/agents/robot/__init__.py +0 -0
  190. aurelian/agents/robot/assets/__init__.py +3 -0
  191. aurelian/agents/robot/assets/template.md +384 -0
  192. aurelian/agents/robot/robot_config.py +25 -0
  193. aurelian/agents/robot/robot_gradio.py +46 -0
  194. aurelian/agents/robot/robot_mcp.py +100 -0
  195. aurelian/agents/robot/robot_ontology_agent.py +139 -0
  196. aurelian/agents/robot/robot_tools.py +50 -0
  197. aurelian/agents/talisman/__init__.py +3 -0
  198. aurelian/agents/talisman/talisman_agent.py +126 -0
  199. aurelian/agents/talisman/talisman_config.py +66 -0
  200. aurelian/agents/talisman/talisman_gradio.py +50 -0
  201. aurelian/agents/talisman/talisman_mcp.py +168 -0
  202. aurelian/agents/talisman/talisman_tools.py +720 -0
  203. aurelian/agents/ubergraph/__init__.py +40 -0
  204. aurelian/agents/ubergraph/ubergraph_agent.py +71 -0
  205. aurelian/agents/ubergraph/ubergraph_config.py +79 -0
  206. aurelian/agents/ubergraph/ubergraph_gradio.py +48 -0
  207. aurelian/agents/ubergraph/ubergraph_mcp.py +69 -0
  208. aurelian/agents/ubergraph/ubergraph_tools.py +118 -0
  209. aurelian/agents/uniprot/__init__.py +37 -0
  210. aurelian/agents/uniprot/uniprot_agent.py +43 -0
  211. aurelian/agents/uniprot/uniprot_config.py +43 -0
  212. aurelian/agents/uniprot/uniprot_evals.py +99 -0
  213. aurelian/agents/uniprot/uniprot_gradio.py +48 -0
  214. aurelian/agents/uniprot/uniprot_mcp.py +168 -0
  215. aurelian/agents/uniprot/uniprot_tools.py +136 -0
  216. aurelian/agents/web/__init__.py +0 -0
  217. aurelian/agents/web/web_config.py +27 -0
  218. aurelian/agents/web/web_gradio.py +48 -0
  219. aurelian/agents/web/web_mcp.py +50 -0
  220. aurelian/agents/web/web_tools.py +108 -0
  221. aurelian/chat.py +23 -0
  222. aurelian/cli.py +800 -0
  223. aurelian/dependencies/__init__.py +0 -0
  224. aurelian/dependencies/workdir.py +78 -0
  225. aurelian/mcp/__init__.py +0 -0
  226. aurelian/mcp/amigo_mcp_test.py +86 -0
  227. aurelian/mcp/config_generator.py +123 -0
  228. aurelian/mcp/example_config.json +43 -0
  229. aurelian/mcp/generate_sample_config.py +37 -0
  230. aurelian/mcp/gocam_mcp_test.py +126 -0
  231. aurelian/mcp/linkml_mcp_tools.py +190 -0
  232. aurelian/mcp/mcp_discovery.py +87 -0
  233. aurelian/mcp/mcp_test.py +31 -0
  234. aurelian/mcp/phenopackets_mcp_test.py +103 -0
  235. aurelian/tools/__init__.py +0 -0
  236. aurelian/tools/web/__init__.py +0 -0
  237. aurelian/tools/web/url_download.py +51 -0
  238. aurelian/utils/__init__.py +0 -0
  239. aurelian/utils/async_utils.py +15 -0
  240. aurelian/utils/data_utils.py +32 -0
  241. aurelian/utils/documentation_manager.py +59 -0
  242. aurelian/utils/doi_fetcher.py +238 -0
  243. aurelian/utils/ontology_utils.py +68 -0
  244. aurelian/utils/pdf_fetcher.py +23 -0
  245. aurelian/utils/process_logs.py +100 -0
  246. aurelian/utils/pubmed_utils.py +238 -0
  247. aurelian/utils/pytest_report_to_markdown.py +67 -0
  248. aurelian/utils/robot_ontology_utils.py +112 -0
  249. aurelian/utils/search_utils.py +95 -0
  250. aurelian-0.3.2.dist-info/LICENSE +22 -0
  251. aurelian-0.3.2.dist-info/METADATA +105 -0
  252. aurelian-0.3.2.dist-info/RECORD +254 -0
  253. aurelian-0.3.2.dist-info/WHEEL +4 -0
  254. aurelian-0.3.2.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,334 @@
1
+ Receptor activation by a ligand is represented differently in GO-CAM
2
+ depending on whether the ligand is (i) a protein (i. e., encoded by a
3
+ gene) or (ii) a small molecule. 
4
+
5
+ Pathway Editor
6
+ ==============
7
+
8
+ Protein ligand-activated signaling receptor
9
+ -------------------------------------------
10
+
11
+ ### Ligand
12
+
13
+ The activity unit for a [ligand of a signaling receptor]{.underline} is:
14
+
15
+ - **MF**: a ligand \'[enables]{.underline}\' receptor ligand activity
16
+ > ([[GO:0048018]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0048018))
17
+ > or a child
18
+
19
+ - **Context:**
20
+
21
+ - The relation between a ligand and its target receptor is
22
+ > *\'*[has input\']{.underline}
23
+
24
+ - **BP** \'[part of\']{.underline} the process in which the ligand
25
+ > participates, usually a child of signal transduction
26
+ > ([[GO:0007165]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0007165))
27
+
28
+ - **CC:**
29
+
30
+ - extracellular ligands: \'[occurs in]{.underline}\'
31
+ > extracellular space
32
+ > ([[GO:0005615]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
33
+
34
+ - membrane-bound ligands: \'[occurs in]{.underline}\' plasma
35
+ > membrane
36
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
37
+
38
+ - The causal relation between the **ligand activity** and the
39
+ > **receptor activity** is\
40
+ > \'[directly positively regulates]{.underline}\'.
41
+
42
+ ### Signaling receptor
43
+
44
+ The activity unit for a [signaling receptor]{.underline} is:
45
+
46
+ - **MF:** \'[enables]{.underline}\' signaling receptor activity
47
+ > ([[GO:0038023]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0038023)*)*
48
+ > or a child*.* 
49
+
50
+ - **Context:**
51
+
52
+ - The input (target) of the receptor is the **effector protein it
53
+ > regulates**, for example a molecular adaptor, captured with
54
+ > the *\'*[has input\']{.underline} relation.
55
+
56
+ - **Note that the input (target) of the receptor is NOT its
57
+ > ligand**
58
+
59
+ - **BP** \'[part of\']{.underline} the same BP/signal transduction
60
+ > pathway as the ligand
61
+
62
+ - **CC:** transmembrane receptors: \'[occurs in]{.underline}\' plasma
63
+ > membrane
64
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
65
+
66
+ - The causal relation between the MF of the **receptor** and the
67
+ > MF of its **target** is \'[directly positively
68
+ > regulates\']{.underline}*.*
69
+
70
+ **Example: [[Insulin signaling
71
+ model]{.underline}](http://noctua.geneontology.org/workbench/noctua-visual-pathway-editor/?model_id=gomodel%3A6482692800000931)**
72
+
73
+ ![](media/image5.png){width="6.267716535433071in"
74
+ height="1.3888888888888888in"}
75
+
76
+
77
+
78
+ Small molecule-activated signaling receptor activity
79
+ ----------------------------------------------------
80
+
81
+ - Since small molecules are not annotated in GO, a small molecule
82
+ > ligand does not have a molecular function. Instead, the **ligand**
83
+ > and the **receptor activity** are linked by the causal relation
84
+ > \'[is small molecule activator\']{.underline}*.*
85
+
86
+ - The receptor\'s function, input, and contextual relations are the
87
+ > same as for protein ligand-activated receptors. 
88
+
89
+ - Note that it is also possible to annotate an inhibitory ligand using
90
+ > the relation \'[is small molecule inhibitor\']{.underline}*.*
91
+
92
+ - BP and CC annotations are the same as for protein ligand-activated
93
+ > receptor activity.
94
+
95
+ **Example: [[Activation of a GPCR by
96
+ succinate]{.underline}](http://noctua.geneontology.org/workbench/noctua-visual-pathway-editor/?model_id=gomodel%3A648d0dc100000022)**
97
+
98
+ ![](media/image1.png){width="5.526042213473316in"
99
+ height="2.5371741032370956in"}
100
+
101
+
102
+
103
+ Special cases
104
+ -------------
105
+
106
+ ###
107
+
108
+ ### Receptor with coreceptor
109
+
110
+ This is common in immune receptors. The typical sequence of events is
111
+ that the ligand binds the signaling receptor, which signals to the
112
+ co-receptor to activate its downstream effector (such as a protein
113
+ kinase).
114
+
115
+ **Example: [[IL2 signaling pathway
116
+ (Human)]{.underline}](http://noctua.geneontology.org/workbench/noctua-visual-pathway-editor/?model_id=gomodel:6205c24300001663)**
117
+
118
+ In this case, the receptor is activated by an information
119
+ biomacromolecule (i.e. a protein). Interleukin-2
120
+ ([[IL2]{.underline}](https://www.uniprot.org/uniprot/P60568)), a
121
+ cytokine, activates its receptor, interleukin-2 receptor A
122
+ ([[IL2RA]{.underline}](https://www.uniprot.org/uniprot/P01589)). 
123
+
124
+ IL2RA directly positively regulates (activates)
125
+ [[IL2RB]{.underline}](https://www.uniprot.org/uniprot/P14784), which
126
+ phosphorylates and positively regulates
127
+ [[JAK1]{.underline}](https://www.uniprot.org/uniprotkb/P23458).
128
+
129
+ The activity unit for a [signaling coreceptor]{.underline} is:
130
+
131
+ - **MF:** coreceptor activity
132
+ > ([[GO:0015026]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0015026)*)*
133
+
134
+ - **Context:**
135
+
136
+ - The relation between the receptor and its input (target) is the
137
+ > **signaling coreceptor** it regulates, captured with the
138
+ > *\'*[has input]{.underline}\' relation
139
+
140
+ - **Note that the input (target) of the coreceptor is NOT the
141
+ > ligand**
142
+
143
+ - **BP** \'[part of]{.underline}\' the BP in which the signaling
144
+ > receptor is involved, usually a child of signal transduction
145
+ > ([[GO:0007165]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0007165))
146
+
147
+ - **CC:** transmembrane receptors: \'[occurs in]{.underline}\' plasma
148
+ > membrane
149
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
150
+
151
+ - The causal relation between the MF of the **receptor** and the
152
+ > MF of its **coreceptor** is \'[directly positively
153
+ > regulates]{.underline}\'*.*
154
+
155
+ ![Diagram Description automatically generated with medium
156
+ confidence](media/image2.png){width="3.3854166666666665in"
157
+ height="1.1354166666666667in"}
158
+
159
+ Note: 
160
+
161
+ - cytokine activity is\_a receptor ligand activity
162
+
163
+ - interleukin-2 receptor activity is\_a signaling receptor activity
164
+
165
+ ###
166
+
167
+ ###
168
+
169
+
170
+
171
+ Form Editor
172
+ ===========
173
+
174
+ Protein ligand-activated signaling receptor
175
+ -------------------------------------------
176
+
177
+ ### Ligand activity
178
+
179
+ The activity unit for a [ligand of a signaling receptor]{.underline} is:
180
+
181
+ - **MF**: a ligand \'[enables]{.underline}\' receptor ligand activity
182
+ > ([[GO:0048018]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0048018))
183
+ > or a child
184
+
185
+ - **Context:**
186
+
187
+ - The relation between a ligand and its target receptor is
188
+ > *\'*[has input\']{.underline}
189
+
190
+ - **BP** \'[part of]{.underline}\' the BP in which this ligand is
191
+ > involved (usually a child of signal transduction
192
+ > ([[GO:0007165]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0007165)))
193
+
194
+ - **CC:**
195
+
196
+ - extracellular ligands: \'[occurs in]{.underline}\'
197
+ > extracellular space
198
+ > ([[GO:0005615]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
199
+
200
+ - membrane-bound ligands: \'[occurs in]{.underline}\' plasma
201
+ > membrane
202
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
203
+
204
+ - The causal relation between the ***ligand* *activity*** and the
205
+ > ***receptor activity*** is\
206
+ > \'[directly positively regulates]{.underline}\'.
207
+
208
+ **Example: [[Insulin signaling
209
+ model]{.underline}](http://noctua.geneontology.org/workbench/noctua-form/?model_id=gomodel%3A6482692800000931)**
210
+
211
+ ![](media/image3.png){width="6.267716535433071in"
212
+ height="2.736111111111111in"}
213
+
214
+ ### Signaling receptor activity
215
+
216
+ The activity unit for a [signaling receptor]{.underline} is:
217
+
218
+ - **MF:** The receptor \'[enables]{.underline}\' signaling receptor
219
+ > activity
220
+ > ([[GO:0038023]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0038023)*)*
221
+ > or a child*.* 
222
+
223
+ - **Context:**
224
+
225
+ - The input (target) of the receptor is the **effector protein it
226
+ > regulates**, for example a molecular adaptor, captured with
227
+ > the *\'*[has input\']{.underline} relation
228
+
229
+ - **Note that the input (target) of the receptor is NOT its
230
+ > ligand**
231
+
232
+ - **BP** in which the signaling receptor is involved, usually a child
233
+ > of signal transduction
234
+ > ([[GO:0007165]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0007165))
235
+
236
+ - **CC:** \'[occurs in]{.underline}\' a child of cellular anatomical
237
+ > entity (GO:0110165). For transmembrane receptors, annotate to
238
+ > plasma membrane
239
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
240
+
241
+ **Example: [[Insulin signaling
242
+ model]{.underline}](http://noctua.geneontology.org/workbench/noctua-form/?model_id=gomodel%3A6482692800000931)**
243
+
244
+ ![](media/image7.png){width="6.267716535433071in" height="3.125in"}
245
+
246
+ - The causal relation between the MF of the **receptor** and the MF of
247
+ > its **target** is \'[directly positively
248
+ > regulates\']{.underline}*.*
249
+
250
+
251
+
252
+ Small molecule-activated signaling receptor activity
253
+ ----------------------------------------------------
254
+
255
+ - In the Form, small molecules are not captured, so the MF for the
256
+ > receptor. Therefore, the MF is \'[enables]{.underline}\' signaling
257
+ > receptor activity
258
+ > ([[GO:0038023]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0038023)*)*
259
+ > or a child*.* 
260
+
261
+ - BP and CC annotations are the same as for protein ligand-activated
262
+ > receptor activity.
263
+
264
+ ![](media/image4.png){width="6.267716535433071in"
265
+ height="2.7916666666666665in"}
266
+
267
+ Receptor with coreceptor
268
+ -------------------------
269
+
270
+ ###
271
+
272
+ **Example: [[IL2 signaling pathway
273
+ (Human)]{.underline}](http://noctua.geneontology.org/workbench/noctua-form/?model_id=gomodel%3A6205c24300001663)**
274
+
275
+ In this case, the receptor, interleukin-2 receptor A
276
+ ([[IL2RA]{.underline}](https://www.uniprot.org/uniprot/P01589)), is
277
+ activated by a protein ligand, interleukin-2
278
+ ([[IL2]{.underline}](https://www.uniprot.org/uniprot/P60568)). IL2RA
279
+ directly positively regulates (activates) the coreceptor
280
+ [[IL2RB]{.underline}](https://www.uniprot.org/uniprot/P14784), which
281
+ phosphorylates and positively regulates
282
+ [[JAK1]{.underline}](https://www.uniprot.org/uniprotkb/P23458).
283
+
284
+ The activity unit for a [signaling coreceptor]{.underline} is:
285
+
286
+ - **MF:** The coreceptor \'[enables]{.underline}\' coreceptor activity
287
+ > ([[GO:0015026]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0015026)*)*
288
+ > or a child*.* 
289
+
290
+ - **Context:**
291
+
292
+ - The input (target) of the coreceptor is the **signaling
293
+ > receptor** it regulates, captured with the *\'*[has
294
+ > input]{.underline}\' relation
295
+
296
+ - **Note that the input (target) of the coreceptor is NOT the
297
+ > ligand**
298
+
299
+ - **BP** \'[part of]{.underline}\' the BP in which the signaling
300
+ > receptor is involved, usually a child of signal transduction
301
+ > ([[GO:0007165]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0007165))
302
+
303
+ - **CC:** transmembrane receptors: \'[occurs in]{.underline}\' plasma
304
+ > membrane
305
+ > ([[GO:0005886]{.underline}](https://www.ebi.ac.uk/QuickGO/term/GO:0005886))
306
+
307
+ ![](media/image6.png){width="6.267716535433071in"
308
+ height="2.3194444444444446in"}
309
+
310
+ Note: 
311
+
312
+ - cytokine activity is\_a receptor ligand activity
313
+
314
+ - interleukin-2 receptor activity is\_a signaling receptor activity
315
+
316
+
317
+
318
+ Differences between GO-CAM and standard annotation of a signaling receptor and its ligand
319
+ -----------------------------------------------------------------------------------------
320
+
321
+ In standard annotation (captured with the Noctua Form or Protein2GO),
322
+ relations between molecular functions are not captured, so there is no
323
+ relation between the ligand activity and the signaling receptor
324
+ activity, nor is there a relation between the signaling receptor
325
+ activity and the activity of its target. Likewise for receptor activity
326
+ and coreceptor activity, there is no relation between these activities
327
+ captured in standard annotations.
328
+
329
+ Review information
330
+ ==================
331
+
332
+ Review date: 2023-07-20
333
+
334
+ Reviewed by: Cristina Casals, Pascale Gaudet, Patrick Masson
@@ -0,0 +1,240 @@
1
+ """
2
+ Agent for working with GO-CAMs (Gene Ontology Causal Activity Models).
3
+ """
4
+ from enum import Enum
5
+ from typing import List, Optional, Dict
6
+
7
+ from pydantic import BaseModel, Field
8
+
9
+ from aurelian.agents.gocam.gocam_config import GOCAMDependencies
10
+ from aurelian.agents.gocam.gocam_tools import (
11
+ search_gocams,
12
+ lookup_gocam,
13
+ lookup_uniprot_entry,
14
+ all_documents,
15
+ fetch_document,
16
+ lookup_gocam_local,
17
+ )
18
+ from aurelian.agents.literature.literature_tools import (
19
+ lookup_pmid as literature_lookup_pmid,
20
+ search_literature_web,
21
+ retrieve_literature_page
22
+ )
23
+ from aurelian.agents.filesystem.filesystem_tools import inspect_file, list_files
24
+ from pydantic_ai import Agent, Tool, RunContext
25
+
26
+ class RecommendationStrength(str, Enum):
27
+ """
28
+ Enum for recommendation strength.
29
+ """
30
+ MAJOR = "major"
31
+ MODERATE = "moderate"
32
+ MINOR = "minor"
33
+
34
+ class Recommendation(BaseModel):
35
+ """
36
+ Recommendation for improving a GO-CAM model.
37
+ """
38
+ text: str
39
+ strength: RecommendationStrength
40
+
41
+ class Config:
42
+ schema_extra = {
43
+ "example": {
44
+ "text": "Improve the clarity of the model diagram.",
45
+ "strength": RecommendationStrength.MAJOR
46
+ }
47
+ }
48
+
49
+ class GOCamReviewSummary(BaseModel):
50
+ """
51
+ Summary of the review of a GO-CAM model with rubric scores.
52
+ """
53
+ model_id: str
54
+ model_title: str
55
+ taxa: Optional[List[str]] = Field(description="List of taxa (formal scientific names)")
56
+ genes: Optional[List[str]] = Field(description="List of genes in the model")
57
+ model_description: str = Field(description="Description of the model")
58
+ review_summary: str = Field(description="Brief summary of the review")
59
+ best_practice_score: Optional[int] = Field(None, description="Score 1-5 for adherence to GO-CAM best practices", ge=1, le=5)
60
+ specific_best_practice_scores: Optional[Dict[str, int]] = Field(None, description="Key-value set of scores for each relevant best practice. Each key is the name of a specific best practice (use the document name), and the value is the score 1-5. Only for relevant best practices")
61
+ biological_content_score: Optional[int] = Field(None, description="Score 1-5 for accuracy of biological content against literature", ge=1, le=5)
62
+ publication_consistency_score: Optional[int] = Field(None, description="Score 1-5 for consistency with publications", ge=1, le=5)
63
+ uniprot_consistency_score: Optional[int] = Field(None, description="Score 1-5 for consistency with uniprot information", ge=1, le=5)
64
+ causal_connections_score: Optional[int] = Field(None, description="Score 1-5 for logical connection of activities in pathway flow", ge=1, le=5)
65
+ simplicity_score: Optional[int] = Field(None, description="Score 1-5 for model parsimony and human understandability", ge=1, le=5)
66
+ completeness_score: Optional[int] = Field(None, description="Score 1-5 for model completeness", ge=1, le=5)
67
+ overall_score: Optional[int] = Field(None, description="Overall score 1-5 for the model", ge=1, le=5)
68
+ recommendations: Optional[List[Recommendation]] = Field(None, description="Key recommendations for improvement, highest priority first")
69
+
70
+
71
+ SYSTEM_CURIES = """
72
+ When providing results in markdown, you should generally include CURIEs/IDs, and you can
73
+ hyperlink these as https://bioregistry.io/{curie}. Note that GO-CAM IDs should be hyperlinked
74
+ as https://bioregistry.io/go.model:{uuid}."""
75
+
76
+ PREDICATES_INFO = """
77
+ The following predicates are used for causal associations:
78
+
79
+ - RO:0002413 *provides input for*
80
+ - RO:0002629 *directly positively regulates*
81
+ - RO:0002630 *directly negatively regulates*
82
+ - RO:0002304 *causally upstream of, positive effect*
83
+ - RO:0002305 *causally upstream of, negative effect*
84
+ - RO:0002307 *indirectly positively regulates*
85
+ - RO:0002308 *indirectly negatively regulates*
86
+
87
+ """
88
+
89
+ SYSTEM = f"""
90
+ You are an expert molecular biologist with access to the GO-CAM database.
91
+
92
+ GO-CAMs (Gene Ontology Causal Activity Models) are standardized models that represent
93
+ biological processes and pathways, including gene functions and interactions.
94
+
95
+ You can help with:
96
+ - Searching for GO-CAM models by pathway, gene, or complex queries
97
+ - Looking up specific GO-CAM models by ID
98
+ - Finding information about proteins via UniProt
99
+ - Analyzing and comparing biological pathways
100
+ - Retrieving literature related to GO-CAMs via PubMed
101
+ - Retrieving GO-CAM annotation best practice documents
102
+ - Validating GO-CAM model structure against the schema
103
+
104
+ You can provide information on gene functions, pathways, and models. When giving your response,
105
+ stick to communicating the information provided in the response. You may extemporize and fill
106
+ in gaps with your own knowledge, but always be clear about what information came from the call
107
+ vs your own knowledge.
108
+
109
+ {PREDICATES_INFO}
110
+
111
+ {SYSTEM_CURIES}
112
+ """
113
+
114
+ core_tools = [
115
+ Tool(search_gocams),
116
+ Tool(lookup_gocam),
117
+ Tool(lookup_uniprot_entry),
118
+ Tool(literature_lookup_pmid,
119
+ description="""Lookup the text of a PubMed article by its PMID.
120
+
121
+ Note that assertions in GO-CAMs may reference PMIDs, so this tool
122
+ is useful for validating assertions. A common task is to align
123
+ the text of a PMID with the text of an assertion, or extracting text
124
+ snippets from the publication that support the assertion."""),
125
+ Tool(search_literature_web),
126
+ Tool(retrieve_literature_page),
127
+ Tool(fetch_document),
128
+ Tool(inspect_file),
129
+ Tool(list_files),
130
+ ]
131
+
132
+
133
+ gocam_agent = Agent(
134
+ model="openai:gpt-4o",
135
+ deps_type=GOCAMDependencies,
136
+ system_prompt=SYSTEM,
137
+ tools=core_tools,
138
+ )
139
+
140
+ def get_documents_for_prompt() -> str:
141
+ """
142
+ Get the documents for the system prompt.
143
+
144
+ Returns:
145
+ A string containing the list of available GO-CAM documents
146
+ """
147
+ meta = all_documents()
148
+ if not meta["documents"]:
149
+ return "\nNo GO-CAM best practice documents are available."
150
+
151
+ docs_text = "\n\nThe following GO-CAM best practice documents are available:\n"
152
+ docs_text += "\n".join([f"- {d['title']}" for d in meta["documents"]])
153
+ docs_text += "\n\nYou can use the `fetch_document` tool to retrieve the content of any of these documents."
154
+ docs_text += "\nWhen asked any question about GO-CAM curation practice, be sure to ALWAYS"
155
+ docs_text += " check the relevant document for the most up-to-date information.\n"
156
+ docs_text += "Some of these docs refer to particular exemplar models. these can be retrieved with the `lookup_gocam` tool."
157
+ return docs_text
158
+
159
+ @gocam_agent.system_prompt
160
+ def add_documents(ctx: RunContext[GOCAMDependencies]) -> str:
161
+ """
162
+ Add available GO-CAM documents to the system prompt.
163
+
164
+ Args:
165
+ ctx: The run context
166
+
167
+ Returns:
168
+ A string containing the list of available GO-CAM documents
169
+ """
170
+ return get_documents_for_prompt()
171
+
172
+
173
+ REVIEWER_SYSTEM = f"""
174
+ You are a GO-CAM curator in charge of reviewing proposed GO-CAMs.
175
+
176
+ GO-CAMs (Gene Ontology Causal Activity Models) are standardized models that represent
177
+ biological processes and pathways, including gene functions and interactions.
178
+
179
+ Your job is to examine proposed models, and to perform review and QC, including:
180
+
181
+ - checking that the model is consistent with all relevant GO-CAM best practices (see `fetch_document`)
182
+ - ensuring the biological content of the model is consistent with the literature and textbook knowledge (see `literature_lookup_pmid`)
183
+ - everything is consistent with what is known about that protein (see `lookup_uniprot_entry`)
184
+ - activities in the model are connected in a way that is consistent with the activity flow in the pathway
185
+ - the model is parsimonious and easy for a human to understand
186
+
187
+ For each review, you should score the model on a scale of 1-5 (5 being best) for each of these criteria:
188
+ 1. Best Practices: adherence to GO-CAM best practices
189
+ 2. Biological Content: accuracy of biological content against literature
190
+ 3. Protein Consistency: consistency with known protein functions and interactions
191
+ 4. Causal Connections: logical connection of activities in pathway flow
192
+ 5. Parsimony: model simplicity and human understandability
193
+
194
+ Provide an overall score (1-5) and key recommendations for improvement at the end of your review.
195
+ If any criteria are not applicable, mark them as N/A.
196
+
197
+ {PREDICATES_INFO}
198
+
199
+ {SYSTEM_CURIES}
200
+ """
201
+
202
+ gocam_reviewer_agent = Agent(
203
+ model="anthropic:claude-3-7-sonnet-latest",
204
+ deps_type=GOCAMDependencies,
205
+ system_prompt=REVIEWER_SYSTEM,
206
+ tools=[
207
+ *core_tools,
208
+ Tool(lookup_gocam_local),
209
+ #Tool(validate_gocam_model),
210
+ ],
211
+ )
212
+
213
+
214
+ @gocam_reviewer_agent.system_prompt
215
+ def add_documents(ctx: RunContext[GOCAMDependencies]) -> str:
216
+ """
217
+ Add available GO-CAM documents to the system prompt.
218
+
219
+ Args:
220
+ ctx: The run context
221
+
222
+ Returns:
223
+ A string containing the list of available GO-CAM documents
224
+ """
225
+ return get_documents_for_prompt()
226
+
227
+
228
+ REVIEW_SUMMARIZER_SYSTEM = """Your job is to summarize the existing review of a GO-CAM model, completing
229
+ the rubric for all of the criteria.
230
+ """
231
+
232
+ gocam_review_summarizer_agent = Agent(
233
+ model="anthropic:claude-3-7-sonnet-latest",
234
+ deps_type=GOCAMDependencies,
235
+ system_prompt=REVIEW_SUMMARIZER_SYSTEM,
236
+ tools=[
237
+ #Tool(lookup_gocam_local),
238
+ ],
239
+ result_type=GOCamReviewSummary,
240
+ )
@@ -0,0 +1,85 @@
1
+ """
2
+ Configuration classes for the GOCAM agent.
3
+ """
4
+ from dataclasses import dataclass, field
5
+ import os
6
+ from typing import Optional
7
+
8
+ from bioservices import UniProt
9
+ from linkml_store import Client
10
+ from linkml_store.api import Collection
11
+
12
+ from aurelian.dependencies.workdir import HasWorkdir, WorkDir
13
+
14
+ # Default database connection settings
15
+ HANDLE = "mongodb://localhost:27017/gocams"
16
+ DB_NAME = "gocams"
17
+ COLLECTION_NAME = "main"
18
+
19
+ # Initialize UniProt service
20
+ uniprot_service = UniProt(verbose=False)
21
+
22
+
23
+ @dataclass
24
+ class GOCAMDependencies(HasWorkdir):
25
+ """
26
+ Configuration for the GOCAM agent.
27
+ """
28
+ max_results: int = field(default=10)
29
+ db_path: str = field(default=HANDLE)
30
+ db_name: str = field(default=DB_NAME)
31
+ collection_name: str = field(default=COLLECTION_NAME)
32
+ _collection: Optional[Collection] = None
33
+
34
+ def __post_init__(self):
35
+ """Initialize the config with default values."""
36
+ # Initialize workdir if not provided
37
+ if self.workdir is None:
38
+ self.workdir = WorkDir()
39
+
40
+ @property
41
+ def collection(self) -> Collection:
42
+ """
43
+ Get the GOCAM collection, initializing the connection if needed.
44
+
45
+ Returns:
46
+ Collection: The GOCAM collection
47
+ """
48
+ if self._collection is None:
49
+ client = Client()
50
+ client.attach_database(self.db_path, alias=self.db_name)
51
+ db = client.databases[self.db_name]
52
+ self._collection = db.get_collection(self.collection_name)
53
+ return self._collection
54
+
55
+ def get_uniprot_service(self) -> UniProt:
56
+ """
57
+ Get the UniProt service for protein lookups.
58
+
59
+ Returns:
60
+ UniProt: The UniProt service
61
+ """
62
+ return uniprot_service
63
+
64
+
65
+ def get_config() -> GOCAMDependencies:
66
+ """
67
+ Get the GOCAM agent configuration from environment variables or defaults.
68
+
69
+ Returns:
70
+ GOCAMDependencies: The GOCAM dependencies
71
+ """
72
+ workdir_path = os.environ.get("AURELIAN_WORKDIR", None)
73
+ workdir = WorkDir(location=workdir_path) if workdir_path else None
74
+
75
+ # Get any environment-specific settings
76
+ db_path = os.environ.get("GOCAM_DB_PATH", HANDLE)
77
+ db_name = os.environ.get("GOCAM_DB_NAME", DB_NAME)
78
+ collection_name = os.environ.get("GOCAM_COLLECTION", COLLECTION_NAME)
79
+
80
+ return GOCAMDependencies(
81
+ workdir=workdir,
82
+ db_path=db_path,
83
+ db_name=db_name,
84
+ collection_name=collection_name
85
+ )