aiagents4pharma 1.22.1__py3-none-any.whl → 1.22.3__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.
- aiagents4pharma/talk2biomodels/models/basico_model.py +7 -2
- aiagents4pharma/talk2biomodels/tests/test_basico_model.py +7 -0
- aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/default.yaml +12 -0
- {aiagents4pharma-1.22.1.dist-info → aiagents4pharma-1.22.3.dist-info}/METADATA +1 -1
- {aiagents4pharma-1.22.1.dist-info → aiagents4pharma-1.22.3.dist-info}/RECORD +8 -7
- {aiagents4pharma-1.22.1.dist-info → aiagents4pharma-1.22.3.dist-info}/WHEEL +1 -1
- {aiagents4pharma-1.22.1.dist-info → aiagents4pharma-1.22.3.dist-info}/LICENSE +0 -0
- {aiagents4pharma-1.22.1.dist-info → aiagents4pharma-1.22.3.dist-info}/top_level.txt +0 -0
@@ -58,19 +58,24 @@ class BasicoModel(SysBioModel):
|
|
58
58
|
# check if the param_name is not None
|
59
59
|
if param_name is None:
|
60
60
|
continue
|
61
|
-
#
|
61
|
+
# Extract all parameters and species from the model
|
62
62
|
df_all_params = basico.model_info.get_parameters(model=self.copasi_model)
|
63
|
+
df_all_species = basico.model_info.get_species(model=self.copasi_model)
|
64
|
+
# if param is a kinetic parameter
|
63
65
|
if param_name in df_all_params.index.tolist():
|
64
66
|
basico.model_info.set_parameters(name=param_name,
|
65
67
|
exact=True,
|
66
68
|
initial_value=param_value,
|
67
69
|
model=self.copasi_model)
|
68
70
|
# if param is a species
|
69
|
-
|
71
|
+
elif param_name in df_all_species.index.tolist():
|
70
72
|
basico.model_info.set_species(name=param_name,
|
71
73
|
exact=True,
|
72
74
|
initial_concentration=param_value,
|
73
75
|
model=self.copasi_model)
|
76
|
+
else:
|
77
|
+
logger.error("Parameter/Species %s not found in the model.", param_name)
|
78
|
+
raise ValueError(f"Parameter/Species {param_name} not found in the model.")
|
74
79
|
|
75
80
|
def simulate(self, duration: Union[int, float] = 10, interval: int = 10) -> pd.DataFrame:
|
76
81
|
"""
|
@@ -26,8 +26,15 @@ def test_with_biomodel_id(model):
|
|
26
26
|
assert df_parameters.loc['KmPFKF6P', 'initial_value'] == 1.5
|
27
27
|
# check if the simulation results are a pandas DataFrame object
|
28
28
|
assert isinstance(model.simulate(duration=2, interval=2), pd.DataFrame)
|
29
|
+
# Pass a None value to the update_parameters method
|
30
|
+
# and it should not raise an error
|
29
31
|
model.update_parameters(parameters={None: None})
|
32
|
+
# check if the model description is updated
|
30
33
|
assert model.description == basico.biomodels.get_model_info(model.biomodel_id)["description"]
|
34
|
+
# check if an error is raised if an invalid species/parameter (`Pyruv`)
|
35
|
+
# is passed and it should raise a ValueError
|
36
|
+
with pytest.raises(ValueError):
|
37
|
+
model.update_parameters(parameters={'Pyruv': 0.5})
|
31
38
|
|
32
39
|
def test_with_sbml_file():
|
33
40
|
"""
|
@@ -0,0 +1,12 @@
|
|
1
|
+
api_endpoint: "https://api.semanticscholar.org/graph/v1/paper/search"
|
2
|
+
request_timeout: 10
|
3
|
+
api_fields:
|
4
|
+
- "paperId"
|
5
|
+
- "title"
|
6
|
+
- "abstract"
|
7
|
+
- "year"
|
8
|
+
- "authors"
|
9
|
+
- "citationCount"
|
10
|
+
- "url"
|
11
|
+
# Commented fields that could be added later if needed
|
12
|
+
# - "externalIds"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: aiagents4pharma
|
3
|
-
Version: 1.22.
|
3
|
+
Version: 1.22.3
|
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
|
@@ -19,14 +19,14 @@ aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/default.yaml,sha256=
|
|
19
19
|
aiagents4pharma/talk2biomodels/configs/tools/get_annotation/__init__.py,sha256=-fAORvyFmG2iSvFOFDixmt9OTQRR58y89uhhu2EgbA8,46
|
20
20
|
aiagents4pharma/talk2biomodels/configs/tools/get_annotation/default.yaml,sha256=o5kqLJ5QGJsLMUhAqotudIMhxxNfPUVcDVH1tdRIutU,304
|
21
21
|
aiagents4pharma/talk2biomodels/models/__init__.py,sha256=5fTHHm3PVloYPNKXbgNlcPgv3-u28ZquxGydFYDfhJA,122
|
22
|
-
aiagents4pharma/talk2biomodels/models/basico_model.py,sha256=
|
22
|
+
aiagents4pharma/talk2biomodels/models/basico_model.py,sha256=4LjeHKGcXsdm1gFxs9SGVNDerajZ7REvCeNch0s2pDg,5242
|
23
23
|
aiagents4pharma/talk2biomodels/models/sys_bio_model.py,sha256=JeoiGQAvQABHnG0wKR2XBmmxqQdtgO6kxaLDUTUmr1s,2001
|
24
24
|
aiagents4pharma/talk2biomodels/states/__init__.py,sha256=YLg1-N0D9qyRRLRqwqfLCLAqZYDtMVZTfI8Y0b_4tbA,139
|
25
25
|
aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py,sha256=S1UtXvocWR8Y9OVUp6pIDFnmaCcjbwmUbW8u79TuGcg,1508
|
26
26
|
aiagents4pharma/talk2biomodels/tests/__init__.py,sha256=Jbw5tJxSrjGoaK5IX3pJWDCNzhrVQ10lkYq2oQ_KQD8,45
|
27
27
|
aiagents4pharma/talk2biomodels/tests/test_api.py,sha256=7Kz2r5F5tjmn3F0LoM33oP-21W633936YHiyf5toGg0,1716
|
28
28
|
aiagents4pharma/talk2biomodels/tests/test_ask_question.py,sha256=rdForKfj2zj2IXl6ntK9_I0AbgsCv8MXOZ2khBnaPms,1620
|
29
|
-
aiagents4pharma/talk2biomodels/tests/test_basico_model.py,sha256
|
29
|
+
aiagents4pharma/talk2biomodels/tests/test_basico_model.py,sha256=-2g7HGHXsJeaE06FUI380Br3uh1Wb-JV51mgqcb3GJw,2423
|
30
30
|
aiagents4pharma/talk2biomodels/tests/test_get_annotation.py,sha256=GbobfjtCAOV0HddM4pb2o3c49Q05fKIM0Ubnf8BRxHM,8273
|
31
31
|
aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py,sha256=CIKeIm5FGTCyW-FR2nIo3Tr5AyAdxBelNngkdUd5-kk,3206
|
32
32
|
aiagents4pharma/talk2biomodels/tests/test_integration.py,sha256=9nYRqpJ_OtmUypuHm4URzoHhcpKEldCEwKxLzh8jcZU,5193
|
@@ -142,6 +142,7 @@ aiagents4pharma/talk2scholars/configs/tools/__init__.py,sha256=w0BJK0MR6Et8Pw1ht
|
|
142
142
|
aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/__init__.py,sha256=fqQQ-GlRcbzru2KmEk3oMma0R6_SzGM8dOXzYeU4oVA,46
|
143
143
|
aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/default.yaml,sha256=iEsEW89MlQwKsAW4ZAxLt4pDBwA1qxImYQ2dfONIf6c,442
|
144
144
|
aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/__init__.py,sha256=fqQQ-GlRcbzru2KmEk3oMma0R6_SzGM8dOXzYeU4oVA,46
|
145
|
+
aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/default.yaml,sha256=HG-N8yRjlX9zFwbIBvaDI9ndKjfL-gqPTCCPMLgdUpw,271
|
145
146
|
aiagents4pharma/talk2scholars/configs/tools/search/__init__.py,sha256=fqQQ-GlRcbzru2KmEk3oMma0R6_SzGM8dOXzYeU4oVA,46
|
146
147
|
aiagents4pharma/talk2scholars/configs/tools/search/default.yaml,sha256=tw8N1Mms0qHQbIY3KGDNK1NuT19dQGPiagxzWDdOAJk,504
|
147
148
|
aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/__init__.py,sha256=fqQQ-GlRcbzru2KmEk3oMma0R6_SzGM8dOXzYeU4oVA,46
|
@@ -162,8 +163,8 @@ aiagents4pharma/talk2scholars/tools/s2/query_results.py,sha256=EUfzRh5Qc_tMl5fDI
|
|
162
163
|
aiagents4pharma/talk2scholars/tools/s2/retrieve_semantic_scholar_paper_id.py,sha256=Lg1L4HQCN2LaQEyWtLD73O67PMoXkPHi-Y8rCzHS0A4,2499
|
163
164
|
aiagents4pharma/talk2scholars/tools/s2/search.py,sha256=mnBQWDuQ50UVw6B-bRuL8Ek1av-pEtdgzVMxpEA2BpI,4296
|
164
165
|
aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py,sha256=xgnUj9W9JkeTvB2VJBJUAnia789GGNGqdqgJ_G16v2s,5120
|
165
|
-
aiagents4pharma-1.22.
|
166
|
-
aiagents4pharma-1.22.
|
167
|
-
aiagents4pharma-1.22.
|
168
|
-
aiagents4pharma-1.22.
|
169
|
-
aiagents4pharma-1.22.
|
166
|
+
aiagents4pharma-1.22.3.dist-info/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
|
167
|
+
aiagents4pharma-1.22.3.dist-info/METADATA,sha256=9fmZl1ElsdaB8ir92kNTAIwE5v6vANsVwoTYOY50ayI,7789
|
168
|
+
aiagents4pharma-1.22.3.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
169
|
+
aiagents4pharma-1.22.3.dist-info/top_level.txt,sha256=-AH8rMmrSnJtq7HaAObS78UU-cTCwvX660dSxeM7a0A,16
|
170
|
+
aiagents4pharma-1.22.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|