diff --git a/tools/aoptk/.shed.yml b/tools/aoptk/.shed.yml index a44aadf1..513e852c 100644 --- a/tools/aoptk/.shed.yml +++ b/tools/aoptk/.shed.yml @@ -1,16 +1,16 @@ name: aoptk owner: recetox -remote_repository_url: "https://github.com/rdurnik/aoptk" +remote_repository_url: "https://github.com/RECETOX/galaxytools/tree/master/tools/aoptk" homepage_url: "https://github.com/rdurnik/aoptk" categories: - Machine Learning -description: "AOP-toolkit (aoptk) is a Python package designed to support the development of Adverse Outcome Pathways (AOPs) that require extensive data mining." +description: "AOP-toolkit (aoptk) is a Python package designed to support data mining and analysis of toxicological outcomes." long_description: | - "AOP-toolkit (aoptk) is a Python package developed to support the construction of Adverse Outcome Pathways (AOPs) that require extensive mining and integration of toxicological data from heterogeneous sources. It enables researchers to collect literature from databases such as PubMed and Europe PMC, extract relevant information from full-text publications, and analyze complex, unstructured data using large language models. The toolkit also provides functionality for normalizing chemical names across publications, helping ensure consistency and interoperability." + "AOP-toolkit (aoptk) is a Python package for mining and analyzing toxicological and biomedical literature. Originally developed to support the construction of Adverse Outcome Pathways (AOPs), it provides general-purpose tools for retrieving, processing, and analyzing scientific publications." auto_tool_repositories: name_template: "{{ tool_id }}" description_template: "{{ tool_name }} tool from the aoptk package" suite: name: suite_aoptk - description: AOP-toolkit (aoptk) is a Python package developed to support the construction of Adverse Outcome Pathways (AOPs) that require extensive mining and integration of toxicological data from heterogeneous sources. + description: AOP-toolkit (aoptk) is a Python package for mining and analyzing toxicological and biomedical literature. Originally developed to support the construction of Adverse Outcome Pathways (AOPs), it provides general-purpose tools for retrieving, processing, and analyzing scientific publications. type: repository_suite_definition \ No newline at end of file diff --git a/tools/aoptk/aoptk_chemical_identifier.xml b/tools/aoptk/aoptk_chemical_identifier.xml index 2d5b66e8..5b00156b 100644 --- a/tools/aoptk/aoptk_chemical_identifier.xml +++ b/tools/aoptk/aoptk_chemical_identifier.xml @@ -1,16 +1,17 @@ - + Detect chemicals in scientific literature and filter based on a screening list. macros.xml - + aoptk + - + + + + + @@ -30,16 +35,16 @@ - + - + - + - + 10.18653/v1/w19-5034 10.1093/bioinformatics/btp163 + 10.5281/zenodo.20036704 \ No newline at end of file diff --git a/tools/aoptk/aoptk_download_publication_data.xml b/tools/aoptk/aoptk_download_publication_data.xml new file mode 100644 index 00000000..b5cb0523 --- /dev/null +++ b/tools/aoptk/aoptk_download_publication_data.xml @@ -0,0 +1,153 @@ + + Download publication data - full text publications and figures, abstracts, or PDFs. + + macros.xml + + + + + + + + + + + + +import os +from Bio import Entrez +from aoptk.literature.databases.pmc import PMC +from aoptk.literature.databases.europepmc import EuropePMC +from aoptk.literature.databases.pubmed import PubMed +from aoptk.literature.id import ID + +with open("$input_file", "r") as f: + raw_ids = [line.strip() for line in f.readlines()] + ids = [ID(id) for id in raw_ids] + +Entrez.email = os.environ.get("EMAIL") or None +Entrez.api_key = os.environ.get("NCBI_API_KEY") or None + + +#if $literature.database == "pmc": +database = PMC(storage = "./", figure_storage="./figures") + +#elif $literature.database == "europepmc": +database = EuropePMC(storage = "./", figure_storage="./figures") + +#elif $literature.database == "pubmed": +database = PubMed(storage = "./") + +#else: +raise ValueError("Select valid database.") +#end if + + +#if $literature.type_choice == "publications": +publications = database.get_publications(ids=ids, download_figures_enabled=False) + +#elif $literature.type_choice == "abstracts": +abstracts = database.get_abstracts(ids=ids) + +#elif $literature.type_choice == "pdfs": +pdfs = database.get_pdfs(ids=ids) + +#else: +raise ValueError("Select valid data type.") +#end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + literature['type_choice'] == 'publications' or literature['type_choice'] == 'abstracts' + + + + literature['type_choice'] == 'pdfs' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/aoptk_finalize_output.xml b/tools/aoptk/aoptk_finalize_output.xml new file mode 100644 index 00000000..8065a602 --- /dev/null +++ b/tools/aoptk/aoptk_finalize_output.xml @@ -0,0 +1,85 @@ + + Finalize the output of relationship identification. + + macros.xml + + + + + openpyxl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/aoptk_find_relationships_chemicals.xml b/tools/aoptk/aoptk_find_relationships_chemicals.xml new file mode 100644 index 00000000..641f7adb --- /dev/null +++ b/tools/aoptk/aoptk_find_relationships_chemicals.xml @@ -0,0 +1,201 @@ + + Identify relationships between chemicals and effects. + + macros.xml + + + + + + + + + + + +import os +import sys +from pathlib import Path +import pandas as pd +import yaml +from aoptk.literature.pdf import PDF +from aoptk.literature.pymupdf_parser import PymupdfParser +from aoptk.effect import Effect +from aoptk.chemical import Chemical +from aoptk.relationships.relationship_type import Causative +from aoptk.relationships.relationship_type import Inhibitive +from aoptk.text_generation_api import TextGenerationAPI + +@MODEL_SETUP@ + +def write_relationships(relationships): + with open("relationships.tsv", "w") as f_out: + f_out.write("id\tchemical\teffect\trelationship\n") + for relationship in relationships: + f_out.write(f"{publication_id}\t{relationship.chemical}\t{relationship.effect}\t{relationship.relationship_type}\n") + +def write_chemicals(chemicals): + with open("chemicals.tsv", "w") as f_out: + f_out.write("id\tchemical\n") + for chemical in chemicals: + chemical_name = chemical.name if hasattr(chemical, "name") else chemical + f_out.write(f"{publication_id}\t{chemical_name}\n") + + +with open("$input_file", "r") as f_in: + text = f_in.read() + +publication_id = os.path.splitext("$input_file.element_identifier")[0] + +#if $analysis_purpose.method == "relationships_chemicals" +effects = [] +#for $effect in $effects +effects.append(Effect("$effect.effect")) +#end for + +relationship_types = [] +types = [t.strip() for t in "$relationship_types".split(",")] +for type in types: + if type == "causative": + relationship_types.append(Causative()) + elif type == "inhibitive": + relationship_types.append(Inhibitive()) + else: + raise ValueError(f"Unsupported relationship type: {type}") + +chemicals = TextGenerationAPI(model="$model", api_key=litellm_api_key, url=litellm_base_url).find_chemicals(text) +relationships = TextGenerationAPI(model="$model", api_key=litellm_api_key, url=litellm_base_url).find_relationships_in_text(text=text, chemicals=chemicals, effects=effects, relationship_types=relationship_types) +write_relationships(relationships) +write_chemicals(chemicals) + +#elif $analysis_purpose.method == "relationships" +effects = [] +#for $effect in $effects +effects.append(Effect("$effect.effect")) +#end for + +relationship_types = [] +types = [t.strip() for t in "$relationship_types".split(",")] +for type in types: + if type == "causative": + relationship_types.append(Causative()) + elif type == "inhibitive": + relationship_types.append(Inhibitive()) + else: + raise ValueError(f"Unsupported relationship type: {type}") + +chemicals = [Chemical(chem) for chem in pd.read_csv("$chemicals", sep="\t")["chemical"].tolist()] +relationships = TextGenerationAPI(model="$model", api_key=litellm_api_key, url=litellm_base_url).find_relationships_in_text(text=text, chemicals=chemicals, effects=effects, relationship_types=relationship_types) +write_relationships(relationships) + +#elif $analysis_purpose.method == "chemicals" +chemicals = TextGenerationAPI(model="$model", api_key=litellm_api_key, url=litellm_base_url).find_chemicals(text) +write_chemicals(chemicals) +#end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + analysis_purpose['method'] != 'chemicals' + + + analysis_purpose['method'] != 'relationships' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/aoptk_normalize_chemicals.xml b/tools/aoptk/aoptk_normalize_chemicals.xml new file mode 100644 index 00000000..5e4a340d --- /dev/null +++ b/tools/aoptk/aoptk_normalize_chemicals.xml @@ -0,0 +1,133 @@ + + Normalize chemical entities using LLMs. + + macros.xml + + + + + + + + + + + +import os +import sys + +import pandas as pd +import yaml +from aoptk.chemical import Chemical +from aoptk.text_generation_api import TextGenerationAPI +from aoptk.normalization.pubchem_api import PubChemAPI +from aoptk.normalization.mesh_terms import MeshTerms +from aoptk.normalization.provide_mesh_term_dataframe_from_xml import ProvideMeshTermDataframeFromXML + + +#if $normalization_method.method == "llm" +@MODEL_SETUP@ + +chemicals = pd.read_csv("$chemicals", sep="\t") +chemical_list = pd.read_csv("$chemical_list", sep="\t")["chemical"].tolist() + +chemicals["chemical"] = chemicals["chemical"].apply( + lambda x: TextGenerationAPI(model=model, api_key=litellm_api_key, url=litellm_base_url).normalize_chemical(chemical=Chemical(x), chemical_list=[Chemical(chem) for chem in chemical_list]) + ) + +#elif $normalization_method.method == "pubchem" +chemicals = pd.read_csv("$input_file", sep="\t") +chemicals["chemical"] = chemicals["chemical"].apply( + lambda x: PubChemAPI().normalize_chemical(Chemical(x)) + ) + +#elif $normalization_method.method == "mesh" +chemicals = pd.read_csv("$input_file", sep="\t") +mesh_terms_df = ProvideMeshTermDataframeFromXML(database_path="$input_xml").provide_normalization_dataframe() +chemicals["chemical"] = chemicals["chemical"].apply( + lambda x: MeshTerms(mesh_terms=mesh_terms_df).normalize_chemical(Chemical(x)) + ) + +#else +raise ValueError("Select a valid normalization method.") +#end if + +chemicals["heading"] = chemicals["chemical"].apply(lambda chem: chem.heading) +chemicals.to_csv("normalized_chemicals.tsv", sep="\t", index=False) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/aoptk_parse_pdf.xml b/tools/aoptk/aoptk_parse_pdf.xml new file mode 100644 index 00000000..351d7b7c --- /dev/null +++ b/tools/aoptk/aoptk_parse_pdf.xml @@ -0,0 +1,86 @@ + + Parse PDF files. + + macros.xml + + + + + + + + + + + +import os +import sys + +import yaml +from aoptk.literature.pdf import PDF +from aoptk.literature.pymupdf_parser import PymupdfParser +from aoptk.text_generation_api import TextGenerationAPI + + + +publication_id = os.path.splitext("$input_file.element_identifier")[0] + +#if $use_llms == "true" +@MODEL_SETUP@ +text_generation=TextGenerationAPI(model=model, api_key=litellm_api_key, url=litellm_base_url) + +#else +text_generation = None +#end if + +text = PymupdfParser([PDF("$input_file")], text_generation=text_generation).get_publications(download_figures_enabled=False)[0].full_text +with open(f"{publication_id}.txt", "w") as f: + f.write(text) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/aoptk_publication_tracker.xml b/tools/aoptk/aoptk_publication_tracker.xml index b20a13ab..b182884d 100644 --- a/tools/aoptk/aoptk_publication_tracker.xml +++ b/tools/aoptk/aoptk_publication_tracker.xml @@ -1,11 +1,12 @@ - + Tool to track publications. macros.xml - + aoptk + - + + + + + @@ -33,7 +38,6 @@ - @@ -44,29 +48,29 @@ - + - + - + - + - + - - + + 10.1093/bioinformatics/btp163 + 10.5281/zenodo.20036704 \ No newline at end of file diff --git a/tools/aoptk/aoptk_query_literature.xml b/tools/aoptk/aoptk_query_literature.xml new file mode 100644 index 00000000..7db904fa --- /dev/null +++ b/tools/aoptk/aoptk_query_literature.xml @@ -0,0 +1,155 @@ + + Query literature for a list of publication IDs. + + macros.xml + + + + + + + + + + + + +import asyncio +from Bio import Entrez +import os +from aoptk.literature.databases.pubmed import PubMed +from aoptk.literature.databases.europepmc import EuropePMC +from aoptk.literature.databases.pmc import PMC +from aoptk.literature.query import Query + +email = os.environ.get("EMAIL") or None +api_key = os.environ.get("NCBI_API_KEY") or None + +#if $literature.database == "pubmed": +#if $literature.preprint_mode == "only": +only_preprint = True +#else: +only_preprint = False +#end if +licensing = None + +#elif $literature.database in ["europepmc", "pmc"]: +#if $literature.preprint_mode == "only": +only_preprint = True +#else: +only_preprint = False +#end if +#if $literature.licensing == "all": +licensing = None +#else: +licensing = "$literature.licensing" +#end if + +#else: +raise ValueError("Select valid database.") +#end if + +#if $full_text_subset +full_text_subset = True +#else: +full_text_subset = False +#end if +query = Query(search_term="$search_term", full_text_subset=full_text_subset, only_preprint=only_preprint, licensing=licensing) + +#if $literature.database == "pubmed": +Entrez.email = email +Entrez.api_key = api_key +ids = PubMed(query=query, storage = "./").get_ids() +#elif $literature.database == "europepmc": +ids = EuropePMC(query=query, storage = "./", figure_storage="./figures").get_ids() +#elif $literature.database == "pmc": +Entrez.email = email +Entrez.api_key = api_key +ids = PMC(query=query, storage = "./", figure_storage="./figures").get_ids() +#end if + +with open(f"ids.txt", "w") as f: + for id in ids: + f.write(f"{id}\n") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.5281/zenodo.20036704 + + + \ No newline at end of file diff --git a/tools/aoptk/macros.xml b/tools/aoptk/macros.xml index 5c0881e5..4ef3bf9e 100644 --- a/tools/aoptk/macros.xml +++ b/tools/aoptk/macros.xml @@ -1,19 +1,44 @@ - 0.1.6 + 0.5.0 0 aoptk + pyyaml + + + - + + + + + + + + + + + + + - - + + @@ -28,7 +53,6 @@ - @@ -53,7 +77,6 @@ - @@ -80,29 +103,198 @@ - [0-9a-zA-Z_ ()*'"[\]\[\]\-:.\[\]α-ωΑ-Ω]+ + [0-9a-zA-Z_ ()*'"[\]\[\]\-:.\[\]α-ωΑ-Ω]* - - - + + + + + + + + + + + + + - -from matchms.importing import load_from_msp, scores_from_json -from matchms import Scores -#if $scores.use_scores == "True" -scores = scores_from_json("$scores_in") -join_type = "$scores.join_type" -#else -scores = Scores(references=list(load_from_msp("$references")), queries=list(load_from_msp("$queries")), is_symmetric=False) -join_type = "left" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True == value + + + + + + ]]> - -from matchms import set_matchms_logger_level -set_matchms_logger_level("WARNING") - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [0-9a-zA-Z_ ()*'"[\]\[\]\-:.\[\]α-ωΑ-Ω]* + + + + + + + [0-9a-zA-Z]+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/aoptk/test-data/chemicals.tsv b/tools/aoptk/test-data/chemicals.tsv new file mode 100644 index 00000000..61fc0ec8 --- /dev/null +++ b/tools/aoptk/test-data/chemicals.tsv @@ -0,0 +1,4 @@ +id chemical +123 thioacetamide +456 acetaminophen +789 paracetamol diff --git a/tools/aoptk/test-data/ids.txt b/tools/aoptk/test-data/ids.txt new file mode 100644 index 00000000..45504114 --- /dev/null +++ b/tools/aoptk/test-data/ids.txt @@ -0,0 +1,2 @@ +41480994 +PMC12930283 \ No newline at end of file diff --git a/tools/aoptk/test-data/ids_europepmc.txt b/tools/aoptk/test-data/ids_europepmc.txt new file mode 100644 index 00000000..bb915739 --- /dev/null +++ b/tools/aoptk/test-data/ids_europepmc.txt @@ -0,0 +1,2 @@ +PMC4387231 +PMC9045590 diff --git a/tools/aoptk/test-data/ids_pmc.txt b/tools/aoptk/test-data/ids_pmc.txt new file mode 100644 index 00000000..abe60027 --- /dev/null +++ b/tools/aoptk/test-data/ids_pmc.txt @@ -0,0 +1,70 @@ +PMC13008360 +PMC12958302 +PMC12722370 +PMC12712776 +PMC12615732 +PMC12580166 +PMC12561621 +PMC12560119 +PMC12283783 +PMC12281243 +PMC12075197 +PMC12027150 +PMC11953279 +PMC11597081 +PMC11531151 +PMC11274902 +PMC11226731 +PMC11042069 +PMC10978534 +PMC10673607 +PMC10457767 +PMC10180184 +PMC10141038 +PMC10090537 +PMC10005888 +PMC9981852 +PMC9909725 +PMC9742412 +PMC9735468 +PMC9733013 +PMC9659232 +PMC9629974 +PMC9569683 +PMC9565252 +PMC9534590 +PMC9340459 +PMC9320734 +PMC9256002 +PMC8950395 +PMC8773802 +PMC8772881 +PMC8742652 +PMC8450120 +PMC8349706 +PMC8126138 +PMC7957963 +PMC7836452 +PMC7645917 +PMC7395068 +PMC7347206 +PMC6966667 +PMC6904863 +PMC6904905 +PMC6843249 +PMC6836491 +PMC6769037 +PMC6410160 +PMC6310944 +PMC6153761 +PMC6174638 +PMC5695905 +PMC5515971 +PMC5493342 +PMC5241492 +PMC5216757 +PMC5187530 +PMC5048025 +PMC4669991 +PMC4212306 +PMC3753504 diff --git a/tools/aoptk/test-data/ids_pubmed.txt b/tools/aoptk/test-data/ids_pubmed.txt new file mode 100644 index 00000000..9b515f43 --- /dev/null +++ b/tools/aoptk/test-data/ids_pubmed.txt @@ -0,0 +1,42 @@ +42225163 +42068642 +41893178 +41811695 +41747606 +39861177 +38714237 +39958782 +37952411 +36809998 +35092399 +34894963 +34829709 +33845730 +33806829 +33732322 +33407858 +32827326 +32821877 +32172678 +30784932 +29558627 +28802065 +28754618 +28694658 +28611265 +28440100 +27245430 +26733159 +25280007 +24611903 +24481875 +24396831 +24345506 +22138190 +21782536 +16054533 +16008752 +15763544 +15629516 +14739098 +11793227 diff --git a/tools/aoptk/test-data/mesh_terms_database.xml b/tools/aoptk/test-data/mesh_terms_database.xml new file mode 100644 index 00000000..c7f4e0e8 --- /dev/null +++ b/tools/aoptk/test-data/mesh_terms_database.xml @@ -0,0 +1,407 @@ + + + + + D000001 + + Calcimycin + + + 1974 + 11 + 19 + + + 2023 + 02 + 26 + + + 1984 + 01 + 01 + + + + + Q000008 + + administration & dosage + + + AD + + + + Q000009 + + adverse effects + + + AE + + + + Q000031 + + analogs & derivatives + + + AA + + + + Q000032 + + analysis + + + AN + + + + Q000037 + + antagonists & inhibitors + + + AI + + + + Q000096 + + biosynthesis + + + BI + + + + Q000097 + + blood + + + BL + + + + Q000134 + + cerebrospinal fluid + + + CF + + + + Q000138 + + chemical synthesis + + + CS + + + + Q000145 + + classification + + + CL + + + + Q000191 + + economics + + + EC + + + + Q000266 + + history + + + HI + + + + Q000276 + + immunology + + + IM + + + + Q000302 + + isolation & purification + + + IP + + + + Q000378 + + metabolism + + + ME + + + + Q000493 + + pharmacokinetics + + + PK + + + + Q000494 + + pharmacology + + + PD + + + + Q000506 + + poisoning + + + PO + + + + Q000528 + + radiation effects + + + RE + + + + Q000592 + + standards + + + ST + + + + Q000600 + + supply & distribution + + + SD + + + + Q000627 + + therapeutic use + + + TU + + + + Q000633 + + toxicity + + + TO + + + + Q000652 + + urine + + + UR + + + + Q000737 + + chemistry + + + CH + + + + Q000819 + + agonists + + + AG + + + 91(75); was A 23187 1975-90 (see under ANTIBIOTICS 1975-83) + + use CALCIMYCIN to search A 23187 1975-90 + + 91; was A 23187 1975-90 (see under ANTIBIOTICS 1975-83) + + + Antibiotics (1973-1974) + Carboxylic Acids (1973-1974) + + + + + D000900 + + Anti-Bacterial Agents + + + + + + D061207 + + Calcium Ionophores + + + + + + D02.355.291.933.125 + D02.540.576.625.125 + D03.633.100.221.173 + D04.345.241.654.125 + D04.345.674.625.125 + + + + M0000001 + + Calcimycin + + + 37H9VM9WZL + + An ionophorous, polyether antibiotic from Streptomyces chartreusensis. It binds and transports CALCIUM and other divalent cations across membranes and uncouples oxidative phosphorylation while inhibiting ATPase of rat liver mitochondria. The substance is used mostly as a biochemical tool to study the role of divalent cations in various biological systems. + + + 52665-69-7 (Calcimycin) + + + + M0000001 + M0353609 + + + + + T000002 + Calcimycin + + 1999 + 01 + 01 + + + FDA SRS (2014) + NLM (1975) + + + + T001124965 + 4-Benzoxazolecarboxylic acid, 5-(methylamino)-2-((3,9,11-trimethyl-8-(1-methyl-2-oxo-2-(1H-pyrrol-2-yl)ethyl)-1,7-dioxaspiro(5.5)undec-2-yl)methyl)-, (6S-(6alpha(2S*,3S*),8beta(R*),9beta,11alpha))- + + 2022 + 09 + 22 + + + NLM (2024) + + + + + + M0353609 + + A-23187 + + + 0 + + + + M0000001 + M0353609 + + + + + T000001 + A-23187 + + 1990 + 03 + 08 + + + NLM (1991) + + + + T000001 + A 23187 + + + T000003 + Antibiotic A23187 + + 1990 + 03 + 08 + + + NLM (1991) + + + + T000003 + A23187, Antibiotic + + + T000004 + A23187 + + 1974 + 11 + 11 + + + UNK (19XX) + + + + + + + + diff --git a/tools/aoptk/test-data/normalized.tsv b/tools/aoptk/test-data/normalized.tsv new file mode 100644 index 00000000..9bbd0096 --- /dev/null +++ b/tools/aoptk/test-data/normalized.tsv @@ -0,0 +1,4 @@ +heading chemical +thioacetamide thioacetamide +acetaminophen acetaminophen +acetaminophen paracetamol diff --git a/tools/aoptk/test-data/output.tsv b/tools/aoptk/test-data/output.tsv new file mode 100644 index 00000000..31151f56 --- /dev/null +++ b/tools/aoptk/test-data/output.tsv @@ -0,0 +1,9 @@ +id chemical effect relationship heading +11 acetaminophen liver fibrosis inhibits acetaminophen +11 thioacetamide liver fibrosis inhibits thioacetamide +12 paracetamol liver fibrosis does not inhibit acetaminophen +26 acetaminophen liver fibrosis does not inhibit acetaminophen +35 methotrexate cell death causes methotrexate +98 acetaminophen cell death does not cause acetaminophen +26 acetaminophen liver fibrosis does not cause acetaminophen +23 paracetamol liver fibrosis does not inhibit acetaminophen \ No newline at end of file diff --git a/tools/aoptk/test-data/output_no_heading.tsv b/tools/aoptk/test-data/output_no_heading.tsv new file mode 100644 index 00000000..20ab9741 --- /dev/null +++ b/tools/aoptk/test-data/output_no_heading.tsv @@ -0,0 +1,5 @@ +id chemical effect relationship +11 acetaminophen liver fibrosis positive +11 thioacetamide liver fibrosis positive +12 paracetamol liver fibrosis negative +26 acetaminophen liver fibrosis negative diff --git a/tools/aoptk/test-data/relationships.tsv b/tools/aoptk/test-data/relationships.tsv new file mode 100644 index 00000000..9d809fb9 --- /dev/null +++ b/tools/aoptk/test-data/relationships.tsv @@ -0,0 +1,2 @@ +id chemical effect relationship +text thioacetamide liver fibrosis positive diff --git a/tools/aoptk/test-data/text.pdf b/tools/aoptk/test-data/text.pdf new file mode 100644 index 00000000..6f043315 Binary files /dev/null and b/tools/aoptk/test-data/text.pdf differ diff --git a/tools/aoptk/test-data/text.txt b/tools/aoptk/test-data/text.txt new file mode 100644 index 00000000..9016b1eb --- /dev/null +++ b/tools/aoptk/test-data/text.txt @@ -0,0 +1 @@ +Thioacetamide is a chemical that causes liver fibrosis. Acetaminophen does not cause liver fibrosis. Methotrexate inhibits liver fibrosis. Thioacetamide does not inhibit cancer. Methotrexate does not cause cancer. \ No newline at end of file diff --git a/tools/aoptk/tool-data/genai_models.loc.sample b/tools/aoptk/tool-data/genai_models.loc.sample new file mode 100644 index 00000000..add60967 --- /dev/null +++ b/tools/aoptk/tool-data/genai_models.loc.sample @@ -0,0 +1,26 @@ +#This is a sample file distributed with Galaxy that is used to define litellm +#models, using 6 columns tab separated +#(longer whitespace are TAB characters): +# +# +# +#value: Unique identifier for the dropdown selection +#model_id: The actual model identifier to send to the LiteLLM API +#name: Display name shown to users in the Galaxy interface +#domain: Model type - text, image, or multimodal +#provider: Server identifier matching a key in the servers section of your YAML config +#free_tag: Optional tag that can be freely used by admins to specify additional filter options +# +#Examples: +# +# +#gpt-oss-20b gpt-oss-20b-llmlb GPT-OSS Local (20B) text uni-freiburg openai +#gpt-oss-120b gpt-oss-120b-llmlb GPT-OSS Pro (120B) text uni-freiburg openai +#deepseek-qwen-8b deepseek-r1-0528-qwen3-8b-llmlb DeepSeek Qwen Chat (8B) text uni-freiburg deepseek +#gemma-3-12b-freiburg gemma-3-12b-llmlb Gemma 3 (12B) - Freiburg multimodal uni-freiburg google +#gemma-3-12b-custom gemma-3-12b-llmlb Gemma 3 (12B) - Custom multimodal custom-server google +#llama-3.1-8b llama-3.1-8b-fp8-llmlb LLaMA 3.1 (8B) text uni-freiburg meta +#qwen2.5-vl-7b qwen2.5-vl-7b-llmlb Qwen 2.5 VL (7B) multimodal uni-freiburg alibaba +# +#Note: The same model (same model_id) can be provided by different servers by using +#different value identifiers and provider fields. See gemma-3-12b examples above. \ No newline at end of file diff --git a/tools/aoptk/tool_data_table_conf.xml.sample b/tools/aoptk/tool_data_table_conf.xml.sample new file mode 100644 index 00000000..0b2d0445 --- /dev/null +++ b/tools/aoptk/tool_data_table_conf.xml.sample @@ -0,0 +1,7 @@ + + + + value, model_id, name, domain, provider, free_tag + +
+
\ No newline at end of file