aiagents4pharma 1.43.0__py3-none-any.whl → 1.45.0__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/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/.dockerignore +13 -0
- aiagents4pharma/talk2aiagents4pharma/Dockerfile +105 -0
- aiagents4pharma/talk2aiagents4pharma/README.md +1 -0
- aiagents4pharma/talk2aiagents4pharma/__init__.py +4 -5
- aiagents4pharma/talk2aiagents4pharma/agents/__init__.py +3 -2
- aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py +24 -23
- aiagents4pharma/talk2aiagents4pharma/configs/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/agents/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/config.yaml +1 -1
- aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/.env.example +23 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/docker-compose.yml +93 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/.env.example +23 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/docker-compose.yml +108 -0
- aiagents4pharma/talk2aiagents4pharma/install.md +127 -0
- aiagents4pharma/talk2aiagents4pharma/states/__init__.py +3 -2
- aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py +5 -3
- aiagents4pharma/talk2aiagents4pharma/tests/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/tests/test_main_agent.py +72 -50
- aiagents4pharma/talk2biomodels/.dockerignore +13 -0
- aiagents4pharma/talk2biomodels/Dockerfile +104 -0
- aiagents4pharma/talk2biomodels/README.md +1 -0
- aiagents4pharma/talk2biomodels/__init__.py +4 -8
- aiagents4pharma/talk2biomodels/agents/__init__.py +3 -2
- aiagents4pharma/talk2biomodels/agents/t2b_agent.py +47 -42
- aiagents4pharma/talk2biomodels/api/__init__.py +4 -5
- aiagents4pharma/talk2biomodels/api/kegg.py +14 -10
- aiagents4pharma/talk2biomodels/api/ols.py +13 -10
- aiagents4pharma/talk2biomodels/api/uniprot.py +7 -6
- aiagents4pharma/talk2biomodels/configs/__init__.py +3 -4
- aiagents4pharma/talk2biomodels/configs/agents/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/config.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/tools/__init__.py +4 -5
- aiagents4pharma/talk2biomodels/configs/tools/ask_question/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/ask_question/default.yaml +1 -2
- aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/tools/get_annotation/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/get_annotation/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/install.md +63 -0
- aiagents4pharma/talk2biomodels/models/__init__.py +4 -4
- aiagents4pharma/talk2biomodels/models/basico_model.py +36 -28
- aiagents4pharma/talk2biomodels/models/sys_bio_model.py +13 -10
- aiagents4pharma/talk2biomodels/states/__init__.py +3 -2
- aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py +12 -8
- aiagents4pharma/talk2biomodels/tests/BIOMD0000000449_url.xml +1585 -0
- aiagents4pharma/talk2biomodels/tests/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/tests/article_on_model_537.pdf +0 -0
- aiagents4pharma/talk2biomodels/tests/test_api.py +18 -14
- aiagents4pharma/talk2biomodels/tests/test_ask_question.py +8 -9
- aiagents4pharma/talk2biomodels/tests/test_basico_model.py +15 -9
- aiagents4pharma/talk2biomodels/tests/test_get_annotation.py +54 -55
- aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py +28 -27
- aiagents4pharma/talk2biomodels/tests/test_integration.py +21 -33
- aiagents4pharma/talk2biomodels/tests/test_load_biomodel.py +14 -11
- aiagents4pharma/talk2biomodels/tests/test_param_scan.py +21 -20
- aiagents4pharma/talk2biomodels/tests/test_query_article.py +129 -29
- aiagents4pharma/talk2biomodels/tests/test_search_models.py +9 -13
- aiagents4pharma/talk2biomodels/tests/test_simulate_model.py +16 -15
- aiagents4pharma/talk2biomodels/tests/test_steady_state.py +12 -22
- aiagents4pharma/talk2biomodels/tests/test_sys_bio_model.py +33 -29
- aiagents4pharma/talk2biomodels/tools/__init__.py +15 -12
- aiagents4pharma/talk2biomodels/tools/ask_question.py +42 -32
- aiagents4pharma/talk2biomodels/tools/custom_plotter.py +51 -43
- aiagents4pharma/talk2biomodels/tools/get_annotation.py +99 -75
- aiagents4pharma/talk2biomodels/tools/get_modelinfo.py +57 -51
- aiagents4pharma/talk2biomodels/tools/load_arguments.py +52 -32
- aiagents4pharma/talk2biomodels/tools/load_biomodel.py +8 -2
- aiagents4pharma/talk2biomodels/tools/parameter_scan.py +107 -90
- aiagents4pharma/talk2biomodels/tools/query_article.py +14 -13
- aiagents4pharma/talk2biomodels/tools/search_models.py +37 -26
- aiagents4pharma/talk2biomodels/tools/simulate_model.py +47 -37
- aiagents4pharma/talk2biomodels/tools/steady_state.py +76 -58
- aiagents4pharma/talk2biomodels/tools/utils.py +4 -3
- aiagents4pharma/talk2cells/README.md +1 -0
- aiagents4pharma/talk2cells/__init__.py +4 -5
- aiagents4pharma/talk2cells/agents/__init__.py +3 -2
- aiagents4pharma/talk2cells/agents/scp_agent.py +21 -19
- aiagents4pharma/talk2cells/states/__init__.py +3 -2
- aiagents4pharma/talk2cells/states/state_talk2cells.py +4 -2
- aiagents4pharma/talk2cells/tests/scp_agent/test_scp_agent.py +8 -9
- aiagents4pharma/talk2cells/tools/__init__.py +3 -2
- aiagents4pharma/talk2cells/tools/scp_agent/__init__.py +4 -4
- aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py +5 -3
- aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py +21 -22
- aiagents4pharma/talk2knowledgegraphs/.dockerignore +13 -0
- aiagents4pharma/talk2knowledgegraphs/Dockerfile +103 -0
- aiagents4pharma/talk2knowledgegraphs/README.md +1 -0
- aiagents4pharma/talk2knowledgegraphs/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/agents/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/agents/t2kg_agent.py +40 -30
- aiagents4pharma/talk2knowledgegraphs/configs/__init__.py +3 -6
- aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/default.yaml +8 -8
- aiagents4pharma/talk2knowledgegraphs/configs/app/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/config.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/__init__.py +4 -5
- aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/multimodal_subgraph_extraction/default.yaml +17 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/ols_terms/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/reactome_pathways/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/uniprot_proteins/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/pubchem_utils/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +4 -6
- aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +115 -67
- aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +2 -0
- aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +35 -24
- aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +29 -21
- aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/.env.example +23 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/docker-compose.yml +93 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/.env.example +23 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/docker-compose.yml +108 -0
- aiagents4pharma/talk2knowledgegraphs/entrypoint.sh +190 -0
- aiagents4pharma/talk2knowledgegraphs/install.md +140 -0
- aiagents4pharma/talk2knowledgegraphs/milvus_data_dump.py +31 -65
- aiagents4pharma/talk2knowledgegraphs/states/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/states/state_talk2knowledgegraphs.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_agents_t2kg_agent.py +65 -40
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_biobridge_primekg.py +54 -48
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_dataset.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_primekg.py +17 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_starkqa_primekg.py +33 -24
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_graphrag_reasoning.py +116 -69
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_milvus_multimodal_subgraph_extraction.py +736 -413
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_multimodal_subgraph_extraction.py +22 -15
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_extraction.py +19 -12
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_summarization.py +95 -48
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_embeddings.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_huggingface.py +5 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_nim_molmim.py +13 -18
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_ollama.py +10 -3
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py +4 -3
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ols.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_pubchem.py +9 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_reactome.py +6 -6
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_uniprot.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_extractions_milvus_multimodal_pcst.py +442 -42
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_kg_utils.py +3 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py +10 -6
- aiagents4pharma/talk2knowledgegraphs/tools/__init__.py +10 -7
- aiagents4pharma/talk2knowledgegraphs/tools/graphrag_reasoning.py +15 -20
- aiagents4pharma/talk2knowledgegraphs/tools/milvus_multimodal_subgraph_extraction.py +245 -205
- aiagents4pharma/talk2knowledgegraphs/tools/multimodal_subgraph_extraction.py +92 -90
- aiagents4pharma/talk2knowledgegraphs/tools/subgraph_extraction.py +25 -37
- aiagents4pharma/talk2knowledgegraphs/tools/subgraph_summarization.py +10 -13
- aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +11 -14
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/nim_molmim.py +7 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/ollama.py +12 -6
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +8 -6
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py +9 -6
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py +15 -9
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ols_terms.py +23 -20
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/pubchem_strings.py +12 -10
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/reactome_pathways.py +16 -10
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/uniprot_proteins.py +26 -18
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/__init__.py +4 -5
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/milvus_multimodal_pcst.py +218 -81
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/multimodal_pcst.py +53 -47
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/pcst.py +18 -14
- aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +22 -23
- aiagents4pharma/talk2knowledgegraphs/utils/pubchem_utils.py +11 -10
- aiagents4pharma/talk2scholars/.dockerignore +13 -0
- aiagents4pharma/talk2scholars/Dockerfile +104 -0
- aiagents4pharma/talk2scholars/README.md +1 -0
- aiagents4pharma/talk2scholars/agents/__init__.py +1 -5
- aiagents4pharma/talk2scholars/agents/main_agent.py +6 -4
- aiagents4pharma/talk2scholars/agents/paper_download_agent.py +5 -4
- aiagents4pharma/talk2scholars/agents/pdf_agent.py +4 -2
- aiagents4pharma/talk2scholars/agents/s2_agent.py +2 -2
- aiagents4pharma/talk2scholars/agents/zotero_agent.py +10 -11
- aiagents4pharma/talk2scholars/configs/__init__.py +1 -3
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/__init__.py +1 -4
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/default.yaml +1 -1
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/pdf_agent/default.yaml +1 -1
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/default.yaml +8 -8
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/default.yaml +7 -7
- aiagents4pharma/talk2scholars/configs/tools/__init__.py +8 -6
- aiagents4pharma/talk2scholars/docker-compose/cpu/.env.example +21 -0
- aiagents4pharma/talk2scholars/docker-compose/cpu/docker-compose.yml +90 -0
- aiagents4pharma/talk2scholars/docker-compose/gpu/.env.example +21 -0
- aiagents4pharma/talk2scholars/docker-compose/gpu/docker-compose.yml +105 -0
- aiagents4pharma/talk2scholars/install.md +122 -0
- aiagents4pharma/talk2scholars/state/state_talk2scholars.py +8 -8
- aiagents4pharma/talk2scholars/tests/{test_main_agent.py → test_agents_main_agent.py} +41 -23
- aiagents4pharma/talk2scholars/tests/{test_paper_download_agent.py → test_agents_paper_agents_download_agent.py} +10 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_agent.py → test_agents_pdf_agent.py} +6 -10
- aiagents4pharma/talk2scholars/tests/{test_s2_agent.py → test_agents_s2_agent.py} +8 -16
- aiagents4pharma/talk2scholars/tests/{test_zotero_agent.py → test_agents_zotero_agent.py} +5 -7
- aiagents4pharma/talk2scholars/tests/{test_s2_display_dataframe.py → test_s2_tools_display_dataframe.py} +6 -7
- aiagents4pharma/talk2scholars/tests/{test_s2_query_dataframe.py → test_s2_tools_query_dataframe.py} +5 -15
- aiagents4pharma/talk2scholars/tests/{test_paper_downloader.py → test_tools_paper_downloader.py} +25 -63
- aiagents4pharma/talk2scholars/tests/{test_question_and_answer_tool.py → test_tools_question_and_answer_tool.py} +2 -6
- aiagents4pharma/talk2scholars/tests/{test_s2_multi.py → test_tools_s2_multi.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_s2_retrieve.py → test_tools_s2_retrieve.py} +2 -1
- aiagents4pharma/talk2scholars/tests/{test_s2_search.py → test_tools_s2_search.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_s2_single.py → test_tools_s2_single.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_arxiv_downloader.py → test_utils_arxiv_downloader.py} +16 -25
- aiagents4pharma/talk2scholars/tests/{test_base_paper_downloader.py → test_utils_base_paper_downloader.py} +25 -47
- aiagents4pharma/talk2scholars/tests/{test_biorxiv_downloader.py → test_utils_biorxiv_downloader.py} +14 -42
- aiagents4pharma/talk2scholars/tests/{test_medrxiv_downloader.py → test_utils_medrxiv_downloader.py} +15 -49
- aiagents4pharma/talk2scholars/tests/{test_nvidia_nim_reranker.py → test_utils_nvidia_nim_reranker.py} +6 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_answer_formatter.py → test_utils_pdf_answer_formatter.py} +1 -0
- aiagents4pharma/talk2scholars/tests/{test_pdf_batch_processor.py → test_utils_pdf_batch_processor.py} +6 -15
- aiagents4pharma/talk2scholars/tests/{test_pdf_collection_manager.py → test_utils_pdf_collection_manager.py} +34 -11
- aiagents4pharma/talk2scholars/tests/{test_pdf_document_processor.py → test_utils_pdf_document_processor.py} +2 -3
- aiagents4pharma/talk2scholars/tests/{test_pdf_generate_answer.py → test_utils_pdf_generate_answer.py} +3 -6
- aiagents4pharma/talk2scholars/tests/{test_pdf_gpu_detection.py → test_utils_pdf_gpu_detection.py} +5 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_rag_pipeline.py → test_utils_pdf_rag_pipeline.py} +7 -17
- aiagents4pharma/talk2scholars/tests/{test_pdf_retrieve_chunks.py → test_utils_pdf_retrieve_chunks.py} +4 -11
- aiagents4pharma/talk2scholars/tests/{test_pdf_singleton_manager.py → test_utils_pdf_singleton_manager.py} +26 -23
- aiagents4pharma/talk2scholars/tests/{test_pdf_vector_normalization.py → test_utils_pdf_vector_normalization.py} +1 -1
- aiagents4pharma/talk2scholars/tests/{test_pdf_vector_store.py → test_utils_pdf_vector_store.py} +27 -55
- aiagents4pharma/talk2scholars/tests/{test_pubmed_downloader.py → test_utils_pubmed_downloader.py} +31 -91
- aiagents4pharma/talk2scholars/tests/{test_read_helper_utils.py → test_utils_read_helper_utils.py} +2 -6
- aiagents4pharma/talk2scholars/tests/{test_s2_utils_ext_ids.py → test_utils_s2_utils_ext_ids.py} +5 -15
- aiagents4pharma/talk2scholars/tests/{test_zotero_human_in_the_loop.py → test_utils_zotero_human_in_the_loop.py} +6 -13
- aiagents4pharma/talk2scholars/tests/{test_zotero_path.py → test_utils_zotero_path.py} +53 -45
- aiagents4pharma/talk2scholars/tests/{test_zotero_read.py → test_utils_zotero_read.py} +30 -91
- aiagents4pharma/talk2scholars/tests/{test_zotero_write.py → test_utils_zotero_write.py} +6 -16
- aiagents4pharma/talk2scholars/tools/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/paper_download/paper_downloader.py +20 -35
- aiagents4pharma/talk2scholars/tools/paper_download/utils/__init__.py +7 -5
- aiagents4pharma/talk2scholars/tools/paper_download/utils/arxiv_downloader.py +9 -11
- aiagents4pharma/talk2scholars/tools/paper_download/utils/base_paper_downloader.py +14 -21
- aiagents4pharma/talk2scholars/tools/paper_download/utils/biorxiv_downloader.py +14 -22
- aiagents4pharma/talk2scholars/tools/paper_download/utils/medrxiv_downloader.py +11 -13
- aiagents4pharma/talk2scholars/tools/paper_download/utils/pubmed_downloader.py +14 -28
- aiagents4pharma/talk2scholars/tools/pdf/question_and_answer.py +4 -8
- aiagents4pharma/talk2scholars/tools/pdf/utils/__init__.py +16 -14
- aiagents4pharma/talk2scholars/tools/pdf/utils/answer_formatter.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/batch_processor.py +15 -17
- aiagents4pharma/talk2scholars/tools/pdf/utils/collection_manager.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/document_processor.py +5 -5
- aiagents4pharma/talk2scholars/tools/pdf/utils/generate_answer.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/get_vectorstore.py +2 -6
- aiagents4pharma/talk2scholars/tools/pdf/utils/gpu_detection.py +5 -9
- aiagents4pharma/talk2scholars/tools/pdf/utils/nvidia_nim_reranker.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/paper_loader.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/rag_pipeline.py +6 -15
- aiagents4pharma/talk2scholars/tools/pdf/utils/retrieve_chunks.py +7 -15
- aiagents4pharma/talk2scholars/tools/pdf/utils/singleton_manager.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/tool_helper.py +3 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/vector_normalization.py +8 -17
- aiagents4pharma/talk2scholars/tools/pdf/utils/vector_store.py +17 -33
- aiagents4pharma/talk2scholars/tools/s2/__init__.py +8 -6
- aiagents4pharma/talk2scholars/tools/s2/display_dataframe.py +3 -7
- aiagents4pharma/talk2scholars/tools/s2/multi_paper_rec.py +7 -6
- aiagents4pharma/talk2scholars/tools/s2/query_dataframe.py +5 -12
- aiagents4pharma/talk2scholars/tools/s2/retrieve_semantic_scholar_paper_id.py +2 -4
- aiagents4pharma/talk2scholars/tools/s2/search.py +6 -6
- aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py +5 -3
- aiagents4pharma/talk2scholars/tools/s2/utils/__init__.py +1 -3
- aiagents4pharma/talk2scholars/tools/s2/utils/multi_helper.py +12 -18
- aiagents4pharma/talk2scholars/tools/s2/utils/search_helper.py +11 -18
- aiagents4pharma/talk2scholars/tools/s2/utils/single_helper.py +11 -16
- aiagents4pharma/talk2scholars/tools/zotero/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/zotero/utils/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/zotero/utils/read_helper.py +21 -39
- aiagents4pharma/talk2scholars/tools/zotero/utils/review_helper.py +2 -6
- aiagents4pharma/talk2scholars/tools/zotero/utils/write_helper.py +8 -11
- aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_path.py +4 -12
- aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_pdf_downloader.py +13 -27
- aiagents4pharma/talk2scholars/tools/zotero/zotero_read.py +4 -7
- aiagents4pharma/talk2scholars/tools/zotero/zotero_review.py +8 -10
- aiagents4pharma/talk2scholars/tools/zotero/zotero_write.py +3 -2
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/METADATA +115 -50
- aiagents4pharma-1.45.0.dist-info/RECORD +324 -0
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/WHEEL +1 -2
- aiagents4pharma-1.43.0.dist-info/RECORD +0 -293
- aiagents4pharma-1.43.0.dist-info/top_level.txt +0 -1
- /aiagents4pharma/talk2scholars/tests/{test_state.py → test_states_state.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_pdf_paper_loader.py → test_utils_pdf_paper_loader.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_tool_helper_utils.py → test_utils_tool_helper_utils.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_zotero_pdf_downloader_utils.py → test_utils_zotero_pdf_downloader_utils.py} +0 -0
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/licenses/LICENSE +0 -0
@@ -4,16 +4,19 @@ Test cases for datasets/dataset.py
|
|
4
4
|
|
5
5
|
from ..datasets.dataset import Dataset
|
6
6
|
|
7
|
+
|
7
8
|
class MockDataset(Dataset):
|
8
9
|
"""
|
9
10
|
Mock dataset class for testing purposes.
|
10
11
|
"""
|
12
|
+
|
11
13
|
def setup(self):
|
12
14
|
pass
|
13
15
|
|
14
16
|
def load_data(self):
|
15
17
|
pass
|
16
18
|
|
19
|
+
|
17
20
|
def test_dataset_setup():
|
18
21
|
"""
|
19
22
|
Test the setup method of the Dataset class.
|
@@ -21,6 +24,7 @@ def test_dataset_setup():
|
|
21
24
|
dataset = MockDataset()
|
22
25
|
assert dataset.setup() is None
|
23
26
|
|
27
|
+
|
24
28
|
def test_dataset_load_data():
|
25
29
|
"""
|
26
30
|
Test the load_data method of the Dataset class.
|
@@ -4,13 +4,16 @@ Test cases for datasets/primekg_loader.py
|
|
4
4
|
|
5
5
|
import os
|
6
6
|
import shutil
|
7
|
+
|
7
8
|
import pytest
|
9
|
+
|
8
10
|
from ..datasets.primekg import PrimeKG
|
9
11
|
|
10
12
|
# Remove the data folder for testing if it exists
|
11
13
|
LOCAL_DIR = "../data/primekg_test/"
|
12
14
|
shutil.rmtree(LOCAL_DIR, ignore_errors=True)
|
13
15
|
|
16
|
+
|
14
17
|
@pytest.fixture(name="primekg")
|
15
18
|
def primekg_fixture():
|
16
19
|
"""
|
@@ -18,6 +21,7 @@ def primekg_fixture():
|
|
18
21
|
"""
|
19
22
|
return PrimeKG(local_dir=LOCAL_DIR)
|
20
23
|
|
24
|
+
|
21
25
|
def test_download_primekg(primekg):
|
22
26
|
"""
|
23
27
|
Test the loading method of the PrimeKG class by downloading PrimeKG from server.
|
@@ -30,8 +34,12 @@ def test_download_primekg(primekg):
|
|
30
34
|
# Check if the local directory exists
|
31
35
|
assert os.path.exists(primekg.local_dir)
|
32
36
|
# Check if downloaded and processed files exist
|
33
|
-
files = [
|
34
|
-
|
37
|
+
files = [
|
38
|
+
"nodes.tab",
|
39
|
+
f"{primekg.name}_nodes.tsv.gz",
|
40
|
+
"edges.csv",
|
41
|
+
f"{primekg.name}_edges.tsv.gz",
|
42
|
+
]
|
35
43
|
for file in files:
|
36
44
|
path = f"{primekg.local_dir}/{file}"
|
37
45
|
assert os.path.exists(path)
|
@@ -45,6 +53,7 @@ def test_download_primekg(primekg):
|
|
45
53
|
assert len(primekg_edges) > 0
|
46
54
|
assert primekg_edges.shape[0] == 8100498
|
47
55
|
|
56
|
+
|
48
57
|
def test_load_existing_primekg(primekg):
|
49
58
|
"""
|
50
59
|
Test the loading method of the PrimeKG class by loading existing PrimeKG in local.
|
@@ -57,8 +66,12 @@ def test_load_existing_primekg(primekg):
|
|
57
66
|
# Check if the local directory exists
|
58
67
|
assert os.path.exists(primekg.local_dir)
|
59
68
|
# Check if downloaded and processed files exist
|
60
|
-
files = [
|
61
|
-
|
69
|
+
files = [
|
70
|
+
"nodes.tab",
|
71
|
+
f"{primekg.name}_nodes.tsv.gz",
|
72
|
+
"edges.csv",
|
73
|
+
f"{primekg.name}_edges.tsv.gz",
|
74
|
+
]
|
62
75
|
for file in files:
|
63
76
|
path = f"{primekg.local_dir}/{file}"
|
64
77
|
assert os.path.exists(path)
|
@@ -4,13 +4,16 @@ Test cases for datasets/starkqa_primekg_loader.py
|
|
4
4
|
|
5
5
|
import os
|
6
6
|
import shutil
|
7
|
+
|
7
8
|
import pytest
|
9
|
+
|
8
10
|
from ..datasets.starkqa_primekg import StarkQAPrimeKG
|
9
11
|
|
10
12
|
# Remove the data folder for testing if it exists
|
11
13
|
LOCAL_DIR = "../data/starkqa_primekg_test/"
|
12
14
|
shutil.rmtree(LOCAL_DIR, ignore_errors=True)
|
13
15
|
|
16
|
+
|
14
17
|
@pytest.fixture(name="starkqa_primekg")
|
15
18
|
def starkqa_primekg_fixture():
|
16
19
|
"""
|
@@ -18,6 +21,7 @@ def starkqa_primekg_fixture():
|
|
18
21
|
"""
|
19
22
|
return StarkQAPrimeKG(local_dir=LOCAL_DIR)
|
20
23
|
|
24
|
+
|
21
25
|
def test_download_starkqa_primekg(starkqa_primekg):
|
22
26
|
"""
|
23
27
|
Test the loading method of the StarkQAPrimeKGLoaderTool class by downloading files
|
@@ -34,13 +38,15 @@ def test_download_starkqa_primekg(starkqa_primekg):
|
|
34
38
|
# Check if the local directory exists
|
35
39
|
assert os.path.exists(starkqa_primekg.local_dir)
|
36
40
|
# Check if downloaded files exist in the local directory
|
37
|
-
files = [
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
files = [
|
42
|
+
"qa/prime/split/test-0.1.index",
|
43
|
+
"qa/prime/split/test.index",
|
44
|
+
"qa/prime/split/train.index",
|
45
|
+
"qa/prime/split/val.index",
|
46
|
+
"qa/prime/stark_qa/stark_qa.csv",
|
47
|
+
"qa/prime/stark_qa/stark_qa_human_generated_eval.csv",
|
48
|
+
"skb/prime/processed.zip",
|
49
|
+
]
|
44
50
|
for file in files:
|
45
51
|
path = f"{starkqa_primekg.local_dir}/{file}"
|
46
52
|
assert os.path.exists(path)
|
@@ -52,11 +58,11 @@ def test_download_starkqa_primekg(starkqa_primekg):
|
|
52
58
|
assert primekg_node_info is not None
|
53
59
|
assert len(primekg_node_info) == 129375
|
54
60
|
# Check split indices
|
55
|
-
assert list(split_idx.keys()) == [
|
56
|
-
assert len(split_idx[
|
57
|
-
assert len(split_idx[
|
58
|
-
assert len(split_idx[
|
59
|
-
assert len(split_idx[
|
61
|
+
assert list(split_idx.keys()) == ["train", "val", "test", "test-0.1"]
|
62
|
+
assert len(split_idx["train"]) == 6162
|
63
|
+
assert len(split_idx["val"]) == 2241
|
64
|
+
assert len(split_idx["test"]) == 2801
|
65
|
+
assert len(split_idx["test-0.1"]) == 280
|
60
66
|
# Check query embeddings
|
61
67
|
assert query_embeddings is not None
|
62
68
|
assert len(query_embeddings) == 11204
|
@@ -66,6 +72,7 @@ def test_download_starkqa_primekg(starkqa_primekg):
|
|
66
72
|
assert len(node_embeddings) == 129375
|
67
73
|
assert node_embeddings[0].shape[1] == 1536
|
68
74
|
|
75
|
+
|
69
76
|
def test_load_existing_starkqa_primekg(starkqa_primekg):
|
70
77
|
"""
|
71
78
|
|
@@ -83,13 +90,15 @@ def test_load_existing_starkqa_primekg(starkqa_primekg):
|
|
83
90
|
# Check if the local directory exists
|
84
91
|
assert os.path.exists(starkqa_primekg.local_dir)
|
85
92
|
# Check if downloaded and processed files exist
|
86
|
-
files = [
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
+
files = [
|
94
|
+
"qa/prime/split/test-0.1.index",
|
95
|
+
"qa/prime/split/test.index",
|
96
|
+
"qa/prime/split/train.index",
|
97
|
+
"qa/prime/split/val.index",
|
98
|
+
"qa/prime/stark_qa/stark_qa.csv",
|
99
|
+
"qa/prime/stark_qa/stark_qa_human_generated_eval.csv",
|
100
|
+
"skb/prime/processed.zip",
|
101
|
+
]
|
93
102
|
for file in files:
|
94
103
|
path = f"{starkqa_primekg.local_dir}/{file}"
|
95
104
|
assert os.path.exists(path)
|
@@ -101,11 +110,11 @@ def test_load_existing_starkqa_primekg(starkqa_primekg):
|
|
101
110
|
assert primekg_node_info is not None
|
102
111
|
assert len(primekg_node_info) == 129375
|
103
112
|
# Check split indices
|
104
|
-
assert list(split_idx.keys()) == [
|
105
|
-
assert len(split_idx[
|
106
|
-
assert len(split_idx[
|
107
|
-
assert len(split_idx[
|
108
|
-
assert len(split_idx[
|
113
|
+
assert list(split_idx.keys()) == ["train", "val", "test", "test-0.1"]
|
114
|
+
assert len(split_idx["train"]) == 6162
|
115
|
+
assert len(split_idx["val"]) == 2241
|
116
|
+
assert len(split_idx["test"]) == 2801
|
117
|
+
assert len(split_idx["test-0.1"]) == 280
|
109
118
|
# Check query embeddings
|
110
119
|
assert query_embeddings is not None
|
111
120
|
assert len(query_embeddings) == 11204
|
@@ -5,6 +5,7 @@ Test cases for tools/graphrag_reasoning.py
|
|
5
5
|
import pytest
|
6
6
|
from langchain_core.messages import HumanMessage
|
7
7
|
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
|
8
|
+
|
8
9
|
from ..agents.t2kg_agent import get_app
|
9
10
|
|
10
11
|
# Define the data path
|
@@ -52,58 +53,104 @@ def input_dict_fixture():
|
|
52
53
|
"topk_nodes": 3,
|
53
54
|
"topk_edges": 3,
|
54
55
|
"graph_dict": {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
56
|
+
"nodes": [
|
57
|
+
("IFNG_(3495)", {}),
|
58
|
+
("IKBKG_(3672)", {}),
|
59
|
+
("ATG16L1_(6661)", {}),
|
60
|
+
("inflammatory bowel disease_(28158)", {}),
|
61
|
+
("Crohn ileitis and jejunitis_(35814)", {}),
|
62
|
+
("Crohn's colitis_(83770)", {}),
|
63
|
+
],
|
64
|
+
"edges": [
|
65
|
+
(
|
66
|
+
"IFNG_(3495)",
|
67
|
+
"inflammatory bowel disease_(28158)",
|
68
|
+
{
|
69
|
+
"relation": [
|
70
|
+
"gene/protein",
|
71
|
+
"associated with",
|
72
|
+
"disease",
|
73
|
+
],
|
74
|
+
"label": ["gene/protein", "associated with", "disease"],
|
75
|
+
},
|
76
|
+
),
|
77
|
+
(
|
78
|
+
"IFNG_(3495)",
|
79
|
+
"Crohn's colitis_(83770)",
|
80
|
+
{
|
81
|
+
"relation": [
|
82
|
+
"gene/protein",
|
83
|
+
"associated with",
|
84
|
+
"disease",
|
85
|
+
],
|
86
|
+
"label": ["gene/protein", "associated with", "disease"],
|
87
|
+
},
|
88
|
+
),
|
89
|
+
(
|
90
|
+
"IFNG_(3495)",
|
91
|
+
"Crohn ileitis and jejunitis_(35814)",
|
92
|
+
{
|
93
|
+
"relation": [
|
94
|
+
"gene/protein",
|
95
|
+
"associated with",
|
96
|
+
"disease",
|
97
|
+
],
|
98
|
+
"label": ["gene/protein", "associated with", "disease"],
|
99
|
+
},
|
100
|
+
),
|
101
|
+
(
|
102
|
+
"ATG16L1_(6661)",
|
103
|
+
"IKBKG_(3672)",
|
104
|
+
{
|
105
|
+
"relation": ["gene/protein", "ppi", "gene/protein"],
|
106
|
+
"label": ["gene/protein", "ppi", "gene/protein"],
|
107
|
+
},
|
108
|
+
),
|
109
|
+
(
|
110
|
+
"Crohn's colitis_(83770)",
|
111
|
+
"ATG16L1_(6661)",
|
112
|
+
{
|
113
|
+
"relation": [
|
114
|
+
"disease",
|
115
|
+
"associated with",
|
116
|
+
"gene/protein",
|
117
|
+
],
|
118
|
+
"label": ["disease", "associated with", "gene/protein"],
|
119
|
+
},
|
120
|
+
),
|
121
|
+
],
|
122
|
+
},
|
76
123
|
"graph_text": """
|
77
124
|
node_id,node_attr
|
78
|
-
IFNG_(3495),"IFNG belongs to gene/protein category.
|
79
|
-
This gene encodes a soluble cytokine that is a member of the type II interferon class.
|
80
|
-
The encoded protein is secreted by cells of both the innate and adaptive immune systems.
|
81
|
-
The active protein is a homodimer that binds to the interferon gamma receptor
|
82
|
-
which triggers a cellular response to viral and microbial infections.
|
83
|
-
Mutations in this gene are associated with an increased susceptibility to viral,
|
84
|
-
bacterial and parasitic infections and to several autoimmune diseases.
|
125
|
+
IFNG_(3495),"IFNG belongs to gene/protein category.
|
126
|
+
This gene encodes a soluble cytokine that is a member of the type II interferon class.
|
127
|
+
The encoded protein is secreted by cells of both the innate and adaptive immune systems.
|
128
|
+
The active protein is a homodimer that binds to the interferon gamma receptor
|
129
|
+
which triggers a cellular response to viral and microbial infections.
|
130
|
+
Mutations in this gene are associated with an increased susceptibility to viral,
|
131
|
+
bacterial and parasitic infections and to several autoimmune diseases.
|
85
132
|
[provided by RefSeq, Dec 2015]."
|
86
|
-
IKBKG_(3672),"IKBKG belongs to gene/protein category. This gene encodes the regulatory
|
87
|
-
subunit of the inhibitor of kappaB kinase (IKK) complex, which activates NF-kappaB
|
88
|
-
resulting in activation of genes involved in inflammation, immunity, cell survival,
|
89
|
-
and other pathways. Mutations in this gene result in incontinentia pigmenti,
|
90
|
-
hypohidrotic ectodermal dysplasia, and several other types of immunodeficiencies.
|
91
|
-
A pseudogene highly similar to this locus is located in an adjacent region of the
|
133
|
+
IKBKG_(3672),"IKBKG belongs to gene/protein category. This gene encodes the regulatory
|
134
|
+
subunit of the inhibitor of kappaB kinase (IKK) complex, which activates NF-kappaB
|
135
|
+
resulting in activation of genes involved in inflammation, immunity, cell survival,
|
136
|
+
and other pathways. Mutations in this gene result in incontinentia pigmenti,
|
137
|
+
hypohidrotic ectodermal dysplasia, and several other types of immunodeficiencies.
|
138
|
+
A pseudogene highly similar to this locus is located in an adjacent region of the
|
92
139
|
X chromosome. [provided by RefSeq, Mar 2016]."
|
93
|
-
ATG16L1_(6661),"ATG16L1 belongs to gene/protein category. The protein encoded
|
94
|
-
by this gene is part of a large protein complex that is necessary for autophagy,
|
95
|
-
the major process by which intracellular components are targeted to lysosomes
|
96
|
-
for degradation. Defects in this gene are a cause of susceptibility to inflammatory
|
97
|
-
bowel disease type 10 (IBD10). Several transcript variants encoding different
|
140
|
+
ATG16L1_(6661),"ATG16L1 belongs to gene/protein category. The protein encoded
|
141
|
+
by this gene is part of a large protein complex that is necessary for autophagy,
|
142
|
+
the major process by which intracellular components are targeted to lysosomes
|
143
|
+
for degradation. Defects in this gene are a cause of susceptibility to inflammatory
|
144
|
+
bowel disease type 10 (IBD10). Several transcript variants encoding different
|
98
145
|
isoforms have been found for this gene.[provided by RefSeq, Jun 2010]."
|
99
|
-
inflammatory bowel disease_(28158),inflammatory bowel disease belongs to disease
|
100
|
-
category. Any inflammatory bowel disease in which the cause of the disease
|
101
|
-
is a mutation in the NOD2 gene.
|
102
|
-
Crohn ileitis and jejunitis_(35814),Crohn ileitis and jejunitis belongs to
|
103
|
-
disease category. An Crohn disease involving a pathogenic inflammatory
|
104
|
-
response in the ileum.
|
105
|
-
Crohn's colitis_(83770),Crohn's colitis belongs to disease category.
|
106
|
-
Crohn's disease affecting the colon.
|
146
|
+
inflammatory bowel disease_(28158),inflammatory bowel disease belongs to disease
|
147
|
+
category. Any inflammatory bowel disease in which the cause of the disease
|
148
|
+
is a mutation in the NOD2 gene.
|
149
|
+
Crohn ileitis and jejunitis_(35814),Crohn ileitis and jejunitis belongs to
|
150
|
+
disease category. An Crohn disease involving a pathogenic inflammatory
|
151
|
+
response in the ileum.
|
152
|
+
Crohn's colitis_(83770),Crohn's colitis belongs to disease category.
|
153
|
+
Crohn's disease affecting the colon.
|
107
154
|
|
108
155
|
head_id,edge_type,tail_id
|
109
156
|
Crohn's colitis_(83770),"('disease', 'associated with', 'gene/protein')",
|
@@ -116,45 +163,45 @@ def input_dict_fixture():
|
|
116
163
|
Crohn ileitis and jejunitis_(35814)
|
117
164
|
""",
|
118
165
|
"graph_summary": """
|
119
|
-
The subgraph extracted from `subkg_12345` includes several important genes and
|
166
|
+
The subgraph extracted from `subkg_12345` includes several important genes and
|
120
167
|
their associations with inflammatory bowel diseases, particularly Crohn's disease.
|
121
168
|
|
122
169
|
Key Nodes:
|
123
|
-
1. **IFNG (Interferon gamma)**: This gene encodes a cytokine that plays a crucial
|
124
|
-
role in immune response. It is associated with several diseases, including
|
125
|
-
inflammatory bowel disease and specifically Crohn's colitis and Crohn ileitis and
|
126
|
-
jejunitis. Mutations in IFNG can lead to increased susceptibility to infections
|
170
|
+
1. **IFNG (Interferon gamma)**: This gene encodes a cytokine that plays a crucial
|
171
|
+
role in immune response. It is associated with several diseases, including
|
172
|
+
inflammatory bowel disease and specifically Crohn's colitis and Crohn ileitis and
|
173
|
+
jejunitis. Mutations in IFNG can lead to increased susceptibility to infections
|
127
174
|
and autoimmune diseases.
|
128
175
|
|
129
|
-
2. **IKBKG (Inhibitor of kappaB kinase gamma)**: This gene is involved in the
|
130
|
-
regulation of NF-kappaB, which is critical for inflammation and immune responses.
|
176
|
+
2. **IKBKG (Inhibitor of kappaB kinase gamma)**: This gene is involved in the
|
177
|
+
regulation of NF-kappaB, which is critical for inflammation and immune responses.
|
131
178
|
Mutations can lead to immunodeficiencies and other disorders.
|
132
179
|
|
133
|
-
3. **ATG16L1**: This gene is essential for autophagy, a process that helps in
|
134
|
-
degrading intracellular components. Defects in ATG16L1 are linked to inflammatory
|
180
|
+
3. **ATG16L1**: This gene is essential for autophagy, a process that helps in
|
181
|
+
degrading intracellular components. Defects in ATG16L1 are linked to inflammatory
|
135
182
|
bowel disease type 10 (IBD10) and are associated with Crohn's colitis.
|
136
183
|
|
137
|
-
4. **Inflammatory Bowel Disease**: A category of diseases characterized by
|
138
|
-
chronic inflammation of the gastrointestinal tract, with specific mention of
|
184
|
+
4. **Inflammatory Bowel Disease**: A category of diseases characterized by
|
185
|
+
chronic inflammation of the gastrointestinal tract, with specific mention of
|
139
186
|
mutations in the NOD2 gene as a cause.
|
140
187
|
|
141
|
-
5. **Crohn's Colitis**: A specific type of Crohn's disease affecting the colon,
|
188
|
+
5. **Crohn's Colitis**: A specific type of Crohn's disease affecting the colon,
|
142
189
|
indicating a pathogenic inflammatory response.
|
143
190
|
|
144
|
-
6. **Crohn Ileitis and Jejunitis**: Another form of Crohn's disease that involves
|
191
|
+
6. **Crohn Ileitis and Jejunitis**: Another form of Crohn's disease that involves
|
145
192
|
inflammation in the ileum.
|
146
193
|
|
147
194
|
Key Edges:
|
148
|
-
- **IFNG is associated with inflammatory bowel disease, Crohn's colitis, and
|
195
|
+
- **IFNG is associated with inflammatory bowel disease, Crohn's colitis, and
|
149
196
|
Crohn ileitis and jejunitis**: This highlights the role of IFNG in these diseases.
|
150
|
-
- **ATG16L1 is associated with Crohn's colitis**: This indicates a direct link
|
197
|
+
- **ATG16L1 is associated with Crohn's colitis**: This indicates a direct link
|
151
198
|
between the gene and the disease.
|
152
|
-
- **ATG16L1 interacts with IKBKG**: This protein-protein interaction suggests a
|
153
|
-
functional relationship between these two genes in the context of immune response
|
199
|
+
- **ATG16L1 interacts with IKBKG**: This protein-protein interaction suggests a
|
200
|
+
functional relationship between these two genes in the context of immune response
|
154
201
|
and inflammation.
|
155
202
|
|
156
|
-
In summary, the subgraph illustrates the connections between key genes
|
157
|
-
(IFNG, IKBKG, ATG16L1) and their associations with inflammatory bowel diseases,
|
203
|
+
In summary, the subgraph illustrates the connections between key genes
|
204
|
+
(IFNG, IKBKG, ATG16L1) and their associations with inflammatory bowel diseases,
|
158
205
|
particularly Crohn's disease, emphasizing the genetic underpinnings of these conditions.
|
159
206
|
""",
|
160
207
|
}
|
@@ -186,11 +233,11 @@ def test_graphrag_reasoning_openai(input_dict):
|
|
186
233
|
)
|
187
234
|
prompt = """
|
188
235
|
Without extracting a new subgraph, based on subgraph extracted from `subkg_12345`
|
189
|
-
perform Graph RAG reasoning to get insights related to nodes of genes
|
190
|
-
mentioned in the knowledge graph related to Adalimumab.
|
236
|
+
perform Graph RAG reasoning to get insights related to nodes of genes
|
237
|
+
mentioned in the knowledge graph related to Adalimumab.
|
191
238
|
|
192
239
|
Here is an additional context:
|
193
|
-
Adalimumab is a fully human monoclonal antibody (IgG1)
|
240
|
+
Adalimumab is a fully human monoclonal antibody (IgG1)
|
194
241
|
that specifically binds to tumor necrosis factor-alpha (TNF-α), a pro-inflammatory cytokine.
|
195
242
|
"""
|
196
243
|
|