aiagents4pharma 1.33.0__tar.gz → 1.34.1__tar.gz

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 (241) hide show
  1. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/PKG-INFO +2 -2
  2. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/config.yaml +2 -0
  3. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ols.py +62 -0
  4. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_pubchem.py +10 -3
  5. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_reactome.py +44 -0
  6. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py +38 -0
  7. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py +2 -0
  8. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ols_terms.py +76 -0
  9. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/pubchem_strings.py +11 -6
  10. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/reactome_pathways.py +65 -0
  11. aiagents4pharma-1.34.1/aiagents4pharma/talk2knowledgegraphs/utils/pubchem_utils.py +72 -0
  12. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma.egg-info/PKG-INFO +2 -2
  13. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma.egg-info/SOURCES.txt +4 -0
  14. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma.egg-info/requires.txt +1 -1
  15. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/pyproject.toml +1 -1
  16. aiagents4pharma-1.34.1/release_version.txt +1 -0
  17. aiagents4pharma-1.33.0/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py +0 -16
  18. aiagents4pharma-1.33.0/aiagents4pharma/talk2knowledgegraphs/utils/pubchem_utils.py +0 -42
  19. aiagents4pharma-1.33.0/release_version.txt +0 -1
  20. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/LICENSE +0 -0
  21. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/README.md +0 -0
  22. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/__init__.py +0 -0
  23. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/__init__.py +0 -0
  24. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/agents/__init__.py +0 -0
  25. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py +0 -0
  26. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/configs/__init__.py +0 -0
  27. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/configs/agents/__init__.py +0 -0
  28. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml +0 -0
  29. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/configs/config.yaml +0 -0
  30. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/states/__init__.py +0 -0
  31. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py +0 -0
  32. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/tests/__init__.py +0 -0
  33. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2aiagents4pharma/tests/test_main_agent.py +0 -0
  34. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/__init__.py +0 -0
  35. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/agents/__init__.py +0 -0
  36. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/agents/t2b_agent.py +0 -0
  37. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/api/__init__.py +0 -0
  38. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/api/kegg.py +0 -0
  39. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/api/ols.py +0 -0
  40. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/api/uniprot.py +0 -0
  41. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/__init__.py +0 -0
  42. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/agents/__init__.py +0 -0
  43. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/__init__.py +0 -0
  44. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/default.yaml +0 -0
  45. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/config.yaml +0 -0
  46. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/__init__.py +0 -0
  47. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/ask_question/__init__.py +0 -0
  48. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/ask_question/default.yaml +0 -0
  49. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/__init__.py +0 -0
  50. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/default.yaml +0 -0
  51. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/get_annotation/__init__.py +0 -0
  52. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/configs/tools/get_annotation/default.yaml +0 -0
  53. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/models/__init__.py +0 -0
  54. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/models/basico_model.py +0 -0
  55. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/models/sys_bio_model.py +0 -0
  56. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/states/__init__.py +0 -0
  57. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py +0 -0
  58. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/__init__.py +0 -0
  59. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_api.py +0 -0
  60. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_ask_question.py +0 -0
  61. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_basico_model.py +0 -0
  62. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_get_annotation.py +0 -0
  63. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py +0 -0
  64. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_integration.py +0 -0
  65. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_load_biomodel.py +0 -0
  66. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_param_scan.py +0 -0
  67. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_query_article.py +0 -0
  68. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_search_models.py +0 -0
  69. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_simulate_model.py +0 -0
  70. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_steady_state.py +0 -0
  71. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tests/test_sys_bio_model.py +0 -0
  72. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/__init__.py +0 -0
  73. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/ask_question.py +0 -0
  74. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/custom_plotter.py +0 -0
  75. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/get_annotation.py +0 -0
  76. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/get_modelinfo.py +0 -0
  77. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/load_arguments.py +0 -0
  78. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/load_biomodel.py +0 -0
  79. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/parameter_scan.py +0 -0
  80. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/query_article.py +0 -0
  81. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/search_models.py +0 -0
  82. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/simulate_model.py +0 -0
  83. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/steady_state.py +0 -0
  84. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2biomodels/tools/utils.py +0 -0
  85. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/__init__.py +0 -0
  86. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/agents/__init__.py +0 -0
  87. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/agents/scp_agent.py +0 -0
  88. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/states/__init__.py +0 -0
  89. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/states/state_talk2cells.py +0 -0
  90. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/tests/scp_agent/test_scp_agent.py +0 -0
  91. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/tools/__init__.py +0 -0
  92. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/tools/scp_agent/__init__.py +0 -0
  93. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py +0 -0
  94. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py +0 -0
  95. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/__init__.py +0 -0
  96. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/agents/__init__.py +0 -0
  97. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/agents/t2kg_agent.py +0 -0
  98. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/__init__.py +0 -0
  99. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/__init__.py +0 -0
  100. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/default.yaml +0 -0
  101. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/__init__.py +0 -0
  102. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/__init__.py +0 -0
  103. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/default.yaml +0 -0
  104. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/__init__.py +0 -0
  105. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/__init__.py +0 -0
  106. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/default.yaml +0 -0
  107. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/__init__.py +0 -0
  108. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/default.yaml +0 -0
  109. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/__init__.py +0 -0
  110. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/default.yaml +0 -0
  111. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +0 -0
  112. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +0 -0
  113. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +0 -0
  114. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +0 -0
  115. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +0 -0
  116. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/states/__init__.py +0 -0
  117. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/states/state_talk2knowledgegraphs.py +0 -0
  118. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/__init__.py +0 -0
  119. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_agents_t2kg_agent.py +0 -0
  120. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_biobridge_primekg.py +0 -0
  121. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_dataset.py +0 -0
  122. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_primekg.py +0 -0
  123. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_starkqa_primekg.py +0 -0
  124. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_graphrag_reasoning.py +0 -0
  125. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_extraction.py +0 -0
  126. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_summarization.py +0 -0
  127. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_embeddings.py +0 -0
  128. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_huggingface.py +0 -0
  129. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_nim_molmim.py +0 -0
  130. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_ollama.py +0 -0
  131. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_sentencetransformer.py +0 -0
  132. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py +0 -0
  133. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py +0 -0
  134. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_uniprot.py +0 -0
  135. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_kg_utils.py +0 -0
  136. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tools/__init__.py +0 -0
  137. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tools/graphrag_reasoning.py +0 -0
  138. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tools/load_arguments.py +0 -0
  139. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tools/subgraph_extraction.py +0 -0
  140. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/tools/subgraph_summarization.py +0 -0
  141. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +0 -0
  142. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +0 -0
  143. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +0 -0
  144. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +0 -0
  145. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/nim_molmim.py +0 -0
  146. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/ollama.py +0 -0
  147. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +0 -0
  148. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py +0 -0
  149. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py +0 -0
  150. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/uniprot_proteins.py +0 -0
  151. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/extractions/__init__.py +0 -0
  152. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/extractions/pcst.py +0 -0
  153. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +0 -0
  154. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/__init__.py +0 -0
  155. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/__init__.py +0 -0
  156. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/main_agent.py +0 -0
  157. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/paper_download_agent.py +0 -0
  158. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/pdf_agent.py +0 -0
  159. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/s2_agent.py +0 -0
  160. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/agents/zotero_agent.py +0 -0
  161. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/__init__.py +0 -0
  162. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/__init__.py +0 -0
  163. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/__init__.py +0 -0
  164. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/__init__.py +0 -0
  165. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/default.yaml +0 -0
  166. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/paper_download_agent/__init__.py +0 -0
  167. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/pdf_agent/__init__.py +0 -0
  168. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/__init__.py +0 -0
  169. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/default.yaml +0 -0
  170. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/__init__.py +0 -0
  171. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/default.yaml +0 -0
  172. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/app/__init__.py +0 -0
  173. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/app/frontend/__init__.py +0 -0
  174. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/app/frontend/default.yaml +0 -0
  175. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/config.yaml +0 -0
  176. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/__init__.py +0 -0
  177. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/download_arxiv_paper/__init__.py +0 -0
  178. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/__init__.py +0 -0
  179. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/default.yaml +0 -0
  180. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/question_and_answer/__init__.py +0 -0
  181. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/__init__.py +0 -0
  182. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/default.yaml +0 -0
  183. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/search/__init__.py +0 -0
  184. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/search/default.yaml +0 -0
  185. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/__init__.py +0 -0
  186. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/default.yaml +0 -0
  187. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_read/__init__.py +0 -0
  188. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_read/default.yaml +0 -0
  189. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_write/__inti__.py +0 -0
  190. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_write/default.yaml +0 -0
  191. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/state/__init__.py +0 -0
  192. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/state/state_talk2scholars.py +0 -0
  193. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/__init__.py +0 -0
  194. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_llm_main_integration.py +0 -0
  195. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_main_agent.py +0 -0
  196. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_paper_download_agent.py +0 -0
  197. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_paper_download_tools.py +0 -0
  198. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_pdf_agent.py +0 -0
  199. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_question_and_answer_tool.py +0 -0
  200. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_routing_logic.py +0 -0
  201. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_agent.py +0 -0
  202. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_display.py +0 -0
  203. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_multi.py +0 -0
  204. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_query.py +0 -0
  205. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_retrieve.py +0 -0
  206. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_search.py +0 -0
  207. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_s2_single.py +0 -0
  208. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_state.py +0 -0
  209. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_zotero_agent.py +0 -0
  210. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_zotero_human_in_the_loop.py +0 -0
  211. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_zotero_path.py +0 -0
  212. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_zotero_read.py +0 -0
  213. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tests/test_zotero_write.py +0 -0
  214. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/__init__.py +0 -0
  215. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/paper_download/__init__.py +0 -0
  216. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/paper_download/download_arxiv_input.py +0 -0
  217. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/pdf/__init__.py +0 -0
  218. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/pdf/question_and_answer.py +0 -0
  219. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/__init__.py +0 -0
  220. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/display_dataframe.py +0 -0
  221. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/multi_paper_rec.py +0 -0
  222. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/query_dataframe.py +0 -0
  223. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/retrieve_semantic_scholar_paper_id.py +0 -0
  224. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/search.py +0 -0
  225. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py +0 -0
  226. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/utils/__init__.py +0 -0
  227. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/utils/multi_helper.py +0 -0
  228. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/utils/search_helper.py +0 -0
  229. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/s2/utils/single_helper.py +0 -0
  230. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/__init__.py +0 -0
  231. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/utils/__init__.py +0 -0
  232. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/utils/read_helper.py +0 -0
  233. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/utils/review_helper.py +0 -0
  234. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/utils/write_helper.py +0 -0
  235. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_path.py +0 -0
  236. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/zotero_read.py +0 -0
  237. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/zotero_review.py +0 -0
  238. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma/talk2scholars/tools/zotero/zotero_write.py +0 -0
  239. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma.egg-info/dependency_links.txt +0 -0
  240. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/aiagents4pharma.egg-info/top_level.txt +0 -0
  241. {aiagents4pharma-1.33.0 → aiagents4pharma-1.34.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiagents4pharma
3
- Version: 1.33.0
3
+ Version: 1.34.1
4
4
  Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -8,7 +8,7 @@ Classifier: Operating System :: OS Independent
8
8
  Requires-Python: >=3.12
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: copasi_basico==0.78
11
+ Requires-Dist: copasi_basico==0.84
12
12
  Requires-Dist: coverage==7.6.4
13
13
  Requires-Dist: einops==0.8.0
14
14
  Requires-Dist: gdown==5.2.0
@@ -6,4 +6,6 @@ defaults:
6
6
  - tools/graphrag_reasoning: default
7
7
  - utils/pubchem_utils: default
8
8
  - utils/enrichments/uniprot_proteins: default
9
+ - utils/enrichments/ols_terms: default
10
+ - utils/enrichments/reactome_pathways: default
9
11
  - app/frontend: default
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Test cases for utils/enrichments/ols_terms.py
5
+ """
6
+
7
+ import pytest
8
+ from ..utils.enrichments.ols_terms import EnrichmentWithOLS
9
+
10
+ # In this test, we will consider 5 examples:
11
+ # 1. CL_0000899: T-helper 17 cell (Cell Ontology)
12
+ # 2. GO_0046427: positive regulation of receptor signaling pathway via JAK-STAT (GO)
13
+ # 3. UBERON_0000004: nose (Uberon)
14
+ # 4. HP_0009739: Hypoplasia of the antihelix (Human Phenotype Ontology)
15
+ # 5. MONDO_0005011: Crohn disease (MONDO)
16
+ # 6. XYZ_0000000: Non-existing term (for testing error handling)
17
+
18
+ # The expected description for each term starts with:
19
+ CL_DESC = "CD4-positive, alpha-beta T cell"
20
+ GO_DESC = "Any process that activates or increases the frequency, rate or extent"
21
+ UBERON_DESC = "The olfactory organ of vertebrates, consisting of nares"
22
+ HP_DESC = "Hypoplasia of the antihelix"
23
+ MONDO_DESC = "A gastrointestinal disorder characterized by chronic inflammation"
24
+
25
+ # The expected description for the non-existing term is None
26
+
27
+ @pytest.fixture(name="enrich_obj")
28
+ def fixture_uniprot_config():
29
+ """Return a dictionary with the configuration for OLS enrichment."""
30
+ return EnrichmentWithOLS()
31
+
32
+ def test_enrich_documents(enrich_obj):
33
+ """Test the enrich_documents method."""
34
+ ols_terms = ["CL_0000899",
35
+ "GO_0046427",
36
+ "UBERON_0000004",
37
+ "HP_0009739",
38
+ "MONDO_0005011",
39
+ "XYZ_0000000"]
40
+ descriptions = enrich_obj.enrich_documents(ols_terms)
41
+ assert descriptions[0].startswith(CL_DESC)
42
+ assert descriptions[1].startswith(GO_DESC)
43
+ assert descriptions[2].startswith(UBERON_DESC)
44
+ assert descriptions[3].startswith(HP_DESC)
45
+ assert descriptions[4].startswith(MONDO_DESC)
46
+ assert descriptions[5] is None
47
+
48
+ def test_enrich_documents_with_rag(enrich_obj):
49
+ """Test the enrich_documents_with_rag method."""
50
+ ols_terms = ["CL_0000899",
51
+ "GO_0046427",
52
+ "UBERON_0000004",
53
+ "HP_0009739",
54
+ "MONDO_0005011",
55
+ "XYZ_0000000"]
56
+ descriptions = enrich_obj.enrich_documents_with_rag(ols_terms, None)
57
+ assert descriptions[0].startswith(CL_DESC)
58
+ assert descriptions[1].startswith(GO_DESC)
59
+ assert descriptions[2].startswith(UBERON_DESC)
60
+ assert descriptions[3].startswith(HP_DESC)
61
+ assert descriptions[4].startswith(MONDO_DESC)
62
+ assert descriptions[5] is None
@@ -13,7 +13,9 @@ from ..utils.enrichments.pubchem_strings import EnrichmentWithPubChem
13
13
  # The expected SMILES representation for the first PubChem ID is:
14
14
  SMILES_FIRST = 'C[C@@H]1C[C@H]2[C@@H]3[C@@H](CC4=CC(=O)C=C[C@@]'
15
15
  SMILES_FIRST += '4([C@H]3[C@H](C[C@@]2([C@]1(C(=O)CO)O)C)O)C)Cl'
16
- # The expected SMILES representation for the second PubChem ID is None.
16
+ # The expected description for the first PubChem ID starts with:
17
+ DESCRIPTION_FIRST = "Alclometasone is a prednisolone compound having an alpha-chloro substituent"
18
+ # The expected SMILES representation and description for the second PubChem ID is None.
17
19
 
18
20
  @pytest.fixture(name="enrich_obj")
19
21
  def fixture_pubchem_config():
@@ -23,11 +25,16 @@ def fixture_pubchem_config():
23
25
  def test_enrich_documents(enrich_obj):
24
26
  """Test the enrich_documents method."""
25
27
  pubchem_ids = ["5311000", "1X"]
26
- enriched_strings = enrich_obj.enrich_documents(pubchem_ids)
28
+ enriched_descriptions, enriched_strings = enrich_obj.enrich_documents(pubchem_ids)
27
29
  assert enriched_strings == [SMILES_FIRST, None]
30
+ assert enriched_descriptions[0].startswith(DESCRIPTION_FIRST)
31
+ assert enriched_descriptions[1] is None
28
32
 
29
33
  def test_enrich_documents_with_rag(enrich_obj):
30
34
  """Test the enrich_documents_with_rag method."""
31
35
  pubchem_ids = ["5311000", "1X"]
32
- enriched_strings = enrich_obj.enrich_documents_with_rag(pubchem_ids, None)
36
+ enriched_descriptions, enriched_strings = enrich_obj.enrich_documents_with_rag(pubchem_ids,
37
+ None)
33
38
  assert enriched_strings == [SMILES_FIRST, None]
39
+ assert enriched_descriptions[0].startswith(DESCRIPTION_FIRST)
40
+ assert enriched_descriptions[1] is None
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Test cases for utils/enrichments/reactome_pathways.py
5
+ """
6
+
7
+ import pytest
8
+ from ..utils.enrichments.reactome_pathways import EnrichmentWithReactome
9
+
10
+ # In this test, we will consider 2 examples:
11
+ # 1. R-HSA-3244647: cGAS binds cytosolic DNA
12
+ # 2. R-HSA-9905952: ATP binds P2RX7 in P2RX7 trimer:PANX1 heptamer
13
+ # 3. R-HSA-1234567: Fake pathway
14
+
15
+ # The expected description of pathway R-HSA-3244647 startswith:
16
+ FIRST_PATHWAY = "Cyclic GMP-AMP (cGAMP) synthase (cGAS) was identified as a cytosolic DNA"
17
+ # The expected description of pathway R-HSA-9905952 startswith:
18
+ SECOND_PATHWAY = "The P2RX7 (P2X7, P2Z) trimer binds ATP,"
19
+ # The expected description of pathway R-HSA-1234567 is None.
20
+
21
+ @pytest.fixture(name="enrich_obj")
22
+ def fixture_uniprot_config():
23
+ """Return a dictionary with the configuration for Reactome enrichment."""
24
+ return EnrichmentWithReactome()
25
+
26
+ def test_enrich_documents(enrich_obj):
27
+ """Test the enrich_documents method."""
28
+ reactome_pathways = ["R-HSA-3244647",
29
+ "R-HSA-9905952",
30
+ "R-HSA-1234567"]
31
+ descriptions = enrich_obj.enrich_documents(reactome_pathways)
32
+ assert descriptions[0].startswith(FIRST_PATHWAY)
33
+ assert descriptions[1].startswith(SECOND_PATHWAY)
34
+ assert descriptions[2] is None
35
+
36
+ def test_enrich_documents_with_rag(enrich_obj):
37
+ """Test the enrich_documents_with_rag method."""
38
+ reactome_pathways = ["R-HSA-3244647",
39
+ "R-HSA-9905952",
40
+ "R-HSA-1234567"]
41
+ descriptions = enrich_obj.enrich_documents_with_rag(reactome_pathways, None)
42
+ assert descriptions[0].startswith(FIRST_PATHWAY)
43
+ assert descriptions[1].startswith(SECOND_PATHWAY)
44
+ assert descriptions[2] is None
@@ -0,0 +1,38 @@
1
+ """
2
+ Test cases for utils/pubchem_utils.py
3
+ """
4
+
5
+ from ..utils import pubchem_utils
6
+
7
+ def test_external_id2pubchem_cid():
8
+ """
9
+ Test the external_id2pubchem_cid function.
10
+
11
+ The DrugBank ID for Alclometasone is DB00240.
12
+ The PubChem CID for Alclometasone is 5311000.
13
+
14
+ The CTD ID for Butylated Hydroxyanisole is D002083
15
+ The PubChem CID for Butylated Hydroxyanisole is 24667.
16
+ """
17
+ drugbank_id = "DB00240"
18
+ pubchem_cid = pubchem_utils.external_id2pubchem_cid('drugbank', drugbank_id)
19
+ assert pubchem_cid == 5311000
20
+
21
+ ctd_id = "D002083"
22
+ pubchem_cid = pubchem_utils.external_id2pubchem_cid(
23
+ 'comparative toxicogenomics database',
24
+ ctd_id)
25
+ assert pubchem_cid == 24667
26
+
27
+ def test_pubchem_cid_description():
28
+ """
29
+ Test the pubchem_cid_description function.
30
+
31
+ The PubChem CID for Alclometasone is 5311000.
32
+ The description for Alclometasone starts with
33
+ "Alclometasone is a prednisolone compound having an alpha-chloro substituent".
34
+ """
35
+ pubchem_cid = 5311000
36
+ description = pubchem_utils.pubchem_cid_description(pubchem_cid)
37
+ assert description.startswith(
38
+ "Alclometasone is a prednisolone compound having an alpha-chloro substituent")
@@ -5,3 +5,5 @@ from . import enrichments
5
5
  from . import ollama
6
6
  from . import pubchem_strings
7
7
  from . import uniprot_proteins
8
+ from . import reactome_pathways
9
+ from . import ols_terms
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Enrichment class for enriching OLS terms with textual descriptions
5
+ """
6
+
7
+ from typing import List
8
+ import logging
9
+ import json
10
+ import hydra
11
+ import requests
12
+ from .enrichments import Enrichments
13
+
14
+ # Initialize logger
15
+ logging.basicConfig(level=logging.INFO)
16
+ logger = logging.getLogger(__name__)
17
+
18
+ class EnrichmentWithOLS(Enrichments):
19
+ """
20
+ Enrichment class using OLS terms
21
+ """
22
+ def enrich_documents(self, texts: List[str]) -> List[str]:
23
+ """
24
+ Enrich a list of input OLS terms
25
+
26
+ Args:
27
+ texts: The list of OLS terms to be enriched.
28
+
29
+ Returns:
30
+ The list of enriched descriptions
31
+ """
32
+
33
+ ols_ids = texts
34
+
35
+ logger.log(logging.INFO,
36
+ "Load Hydra configuration for OLS enrichments.")
37
+ with hydra.initialize(version_base=None, config_path="../../configs"):
38
+ cfg = hydra.compose(config_name='config',
39
+ overrides=['utils/enrichments/ols_terms=default'])
40
+ cfg = cfg.utils.enrichments.ols_terms
41
+
42
+ descriptions = []
43
+ for ols_id in ols_ids:
44
+ params = {
45
+ 'short_form': ols_id
46
+ }
47
+ r = requests.get(cfg.base_url,
48
+ headers={ "Accept" : "application/json"},
49
+ params=params,
50
+ timeout=cfg.timeout)
51
+ response_body = json.loads(r.text)
52
+ # if the response body is empty
53
+ if '_embedded' not in response_body:
54
+ descriptions.append(None)
55
+ continue
56
+ # Add the description to the list
57
+ description = response_body['_embedded']['terms'][0]['description']
58
+ # Add synonyms to the description
59
+ description += response_body['_embedded']['terms'][0]['synonyms']
60
+ # Add the label to the description
61
+ # Label is not provided as list, so we need to convert it to a list
62
+ description += [response_body['_embedded']['terms'][0]['label']]
63
+ descriptions.append('\n'.join(description))
64
+ return descriptions
65
+
66
+ def enrich_documents_with_rag(self, texts, docs):
67
+ """
68
+ Enrich a list of input OLS terms
69
+
70
+ Args:
71
+ texts: The list of OLS to be enriched.
72
+
73
+ Returns:
74
+ The list of enriched descriptions
75
+ """
76
+ return self.enrich_documents(texts)
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
3
  """
4
- Enrichment class for enriching PubChem IDs with their STRINGS representation.
4
+ Enrichment class for enriching PubChem IDs with their STRINGS representation and descriptions.
5
5
  """
6
6
 
7
7
  from typing import List
8
8
  import pubchempy as pcp
9
9
  from .enrichments import Enrichments
10
+ from ..pubchem_utils import pubchem_cid_description
10
11
 
11
12
  class EnrichmentWithPubChem(Enrichments):
12
13
  """
@@ -20,20 +21,24 @@ class EnrichmentWithPubChem(Enrichments):
20
21
  texts: The list of pubchem IDs to be enriched.
21
22
 
22
23
  Returns:
23
- The list of enriched STRINGS
24
+ The list of enriched STRINGS and their descriptions.
24
25
  """
25
26
 
26
- enriched_pubchem_ids = []
27
+ enriched_pubchem_ids_smiles = []
28
+ enriched_pubchem_ids_descriptions = []
29
+
27
30
  pubchem_cids = texts
28
31
  for pubchem_cid in pubchem_cids:
29
32
  try:
30
33
  c = pcp.Compound.from_cid(pubchem_cid)
31
34
  except pcp.BadRequestError:
32
- enriched_pubchem_ids.append(None)
35
+ enriched_pubchem_ids_smiles.append(None)
36
+ enriched_pubchem_ids_descriptions.append(None)
33
37
  continue
34
- enriched_pubchem_ids.append(c.isomeric_smiles)
38
+ enriched_pubchem_ids_smiles.append(c.isomeric_smiles)
39
+ enriched_pubchem_ids_descriptions.append(pubchem_cid_description(pubchem_cid))
35
40
 
36
- return enriched_pubchem_ids
41
+ return enriched_pubchem_ids_descriptions, enriched_pubchem_ids_smiles
37
42
 
38
43
  def enrich_documents_with_rag(self, texts, docs):
39
44
  """
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Enrichment class for enriching Reactome pathways with textual descriptions
5
+ """
6
+
7
+ from typing import List
8
+ import logging
9
+ import hydra
10
+ import requests
11
+ from .enrichments import Enrichments
12
+
13
+ # Initialize logger
14
+ logging.basicConfig(level=logging.INFO)
15
+ logger = logging.getLogger(__name__)
16
+
17
+ class EnrichmentWithReactome(Enrichments):
18
+ """
19
+ Enrichment class using Reactome pathways
20
+ """
21
+ def enrich_documents(self, texts: List[str]) -> List[str]:
22
+ """
23
+ Enrich a list of input Reactome pathways
24
+
25
+ Args:
26
+ texts: The list of Reactome pathways to be enriched.
27
+
28
+ Returns:
29
+ The list of enriched descriptions
30
+ """
31
+
32
+ reactome_pathways_ids = texts
33
+
34
+ logger.log(logging.INFO,
35
+ "Load Hydra configuration for reactome enrichment")
36
+ with hydra.initialize(version_base=None, config_path="../../configs"):
37
+ cfg = hydra.compose(config_name='config',
38
+ overrides=['utils/enrichments/reactome_pathways=default'])
39
+ cfg = cfg.utils.enrichments.reactome_pathways
40
+
41
+ descriptions = []
42
+ for reactome_pathway_id in reactome_pathways_ids:
43
+ r = requests.get(cfg.base_url + reactome_pathway_id + '/summation',
44
+ headers={ "Accept" : "text/plain"},
45
+ timeout=cfg.timeout)
46
+ # if the response is not ok
47
+ if not r.ok:
48
+ descriptions.append(None)
49
+ continue
50
+ response_body = r.text
51
+ # if the response is ok
52
+ descriptions.append(response_body.split('\t')[1])
53
+ return descriptions
54
+
55
+ def enrich_documents_with_rag(self, texts, docs):
56
+ """
57
+ Enrich a list of input Reactome pathways
58
+
59
+ Args:
60
+ texts: The list of Reactome pathways to be enriched.
61
+
62
+ Returns:
63
+ The list of enriched descriptions
64
+ """
65
+ return self.enrich_documents(texts)
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Enrichment class for enriching PubChem IDs with their STRINGS representation.
5
+ """
6
+
7
+ import logging
8
+ import requests
9
+ import hydra
10
+
11
+ # Initialize logger
12
+ logging.basicConfig(level=logging.INFO)
13
+ logger = logging.getLogger(__name__)
14
+
15
+ def external_id2pubchem_cid(db, db_id):
16
+ """
17
+ Convert external DB ID to PubChem CID.
18
+ Please refer to the following URL for more information
19
+ on data sources:
20
+ https://pubchem.ncbi.nlm.nih.gov/sources/
21
+
22
+ Args:
23
+ db: The database name.
24
+ db_id: The database ID of the drug.
25
+
26
+ Returns:
27
+ The PubChem CID of the drug.
28
+ """
29
+ logger.log(logging.INFO, "Load Hydra configuration for PubChem ID conversion.")
30
+ with hydra.initialize(version_base=None, config_path="../configs"):
31
+ cfg = hydra.compose(config_name='config',
32
+ overrides=['utils/pubchem_utils=default'])
33
+ cfg = cfg.utils.pubchem_utils
34
+ # Prepare the URL
35
+ pubchem_url_for_drug = f"{cfg.pubchem_cid_base_url}/{db}/{db_id}/JSON"
36
+ # Get the data
37
+ response = requests.get(pubchem_url_for_drug, timeout=60)
38
+ data = response.json()
39
+ # Extract the PubChem CID
40
+ cid = None
41
+ for substance in data.get("PC_Substances", []):
42
+ for compound in substance.get("compound", []):
43
+ if "id" in compound and "type" in compound["id"] and compound["id"]["type"] == 1:
44
+ cid = compound["id"].get("id", {}).get("cid")
45
+ break
46
+ return cid
47
+
48
+ def pubchem_cid_description(cid):
49
+ """
50
+ Get the description of a PubChem CID.
51
+
52
+ Args:
53
+ cid: The PubChem CID of the drug.
54
+
55
+ Returns:
56
+ The description of the PubChem CID.
57
+ """
58
+ logger.log(logging.INFO, "Load Hydra configuration for PubChem CID description.")
59
+ with hydra.initialize(version_base=None, config_path="../configs"):
60
+ cfg = hydra.compose(config_name='config',
61
+ overrides=['utils/pubchem_utils=default'])
62
+ cfg = cfg.utils.pubchem_utils
63
+ # Prepare the URL
64
+ pubchem_url_for_descpription = f"{cfg.pubchem_cid_description_url}/{cid}/description/JSON"
65
+ # Get the data
66
+ response = requests.get(pubchem_url_for_descpription, timeout=60)
67
+ data = response.json()
68
+ # Extract the PubChem CID description
69
+ description = ''
70
+ for information in data["InformationList"]['Information']:
71
+ description += information.get("Description", '')
72
+ return description
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiagents4pharma
3
- Version: 1.33.0
3
+ Version: 1.34.1
4
4
  Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -8,7 +8,7 @@ Classifier: Operating System :: OS Independent
8
8
  Requires-Python: >=3.12
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: copasi_basico==0.78
11
+ Requires-Dist: copasi_basico==0.84
12
12
  Requires-Dist: coverage==7.6.4
13
13
  Requires-Dist: einops==0.8.0
14
14
  Requires-Dist: gdown==5.2.0
@@ -120,7 +120,9 @@ aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_ollama.py
120
120
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_sentencetransformer.py
121
121
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py
122
122
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py
123
+ aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ols.py
123
124
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_pubchem.py
125
+ aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_reactome.py
124
126
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_uniprot.py
125
127
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_kg_utils.py
126
128
  aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py
@@ -141,7 +143,9 @@ aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py
141
143
  aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py
142
144
  aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py
143
145
  aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py
146
+ aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ols_terms.py
144
147
  aiagents4pharma/talk2knowledgegraphs/utils/enrichments/pubchem_strings.py
148
+ aiagents4pharma/talk2knowledgegraphs/utils/enrichments/reactome_pathways.py
145
149
  aiagents4pharma/talk2knowledgegraphs/utils/enrichments/uniprot_proteins.py
146
150
  aiagents4pharma/talk2knowledgegraphs/utils/extractions/__init__.py
147
151
  aiagents4pharma/talk2knowledgegraphs/utils/extractions/pcst.py
@@ -1,4 +1,4 @@
1
- copasi_basico==0.78
1
+ copasi_basico==0.84
2
2
  coverage==7.6.4
3
3
  einops==0.8.0
4
4
  gdown==5.2.0
@@ -13,7 +13,7 @@ classifiers = [
13
13
  "Operating System :: OS Independent",
14
14
  ]
15
15
  dependencies = [
16
- "copasi_basico==0.78",
16
+ "copasi_basico==0.84",
17
17
  "coverage==7.6.4",
18
18
  "einops==0.8.0",
19
19
  "gdown==5.2.0",
@@ -0,0 +1 @@
1
+ v1.34.1
@@ -1,16 +0,0 @@
1
- """
2
- Test cases for utils/pubchem_utils.py
3
- """
4
-
5
- from ..utils import pubchem_utils
6
-
7
- def test_drugbank_id2pubchem_cid():
8
- """
9
- Test the drugbank_id2pubchem_cid method.
10
-
11
- The DrugBank ID for Alclometasone is DB00240.
12
- The PubChem CID for Alclometasone is 5311000.
13
- """
14
- drugbank_id = "DB00240"
15
- pubchem_cid = pubchem_utils.drugbank_id2pubchem_cid(drugbank_id)
16
- assert pubchem_cid == 5311000
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env python3
2
-
3
- """
4
- Enrichment class for enriching PubChem IDs with their STRINGS representation.
5
- """
6
-
7
- import logging
8
- import requests
9
- import hydra
10
-
11
- # Initialize logger
12
- logging.basicConfig(level=logging.INFO)
13
- logger = logging.getLogger(__name__)
14
-
15
- def drugbank_id2pubchem_cid(drugbank_id):
16
- """
17
- Convert DrugBank ID to PubChem CID.
18
-
19
- Args:
20
- drugbank_id: The DrugBank ID of the drug.
21
-
22
- Returns:
23
- The PubChem CID of the drug.
24
- """
25
- logger.log(logging.INFO, "Load Hydra configuration for PubChem ID conversion.")
26
- with hydra.initialize(version_base=None, config_path="../configs"):
27
- cfg = hydra.compose(config_name='config',
28
- overrides=['utils/pubchem_utils=default'])
29
- cfg = cfg.utils.pubchem_utils
30
- # Prepare the URL
31
- pubchem_url_for_drug = cfg.drugbank_id_to_pubchem_cid_url + drugbank_id + '/JSON'
32
- # Get the data
33
- response = requests.get(pubchem_url_for_drug, timeout=60)
34
- data = response.json()
35
- # Extract the PubChem CID
36
- cid = None
37
- for substance in data.get("PC_Substances", []):
38
- for compound in substance.get("compound", []):
39
- if "id" in compound and "type" in compound["id"] and compound["id"]["type"] == 1:
40
- cid = compound["id"].get("id", {}).get("cid")
41
- break
42
- return cid
@@ -1 +0,0 @@
1
- v1.33.0