{"id":29901860,"url":"https://github.com/amrverse/amrrulemaker","last_synced_at":"2025-08-01T15:14:53.177Z","repository":{"id":289896500,"uuid":"972686128","full_name":"AMRverse/AMRrulemakeR","owner":"AMRverse","description":"What the Package Does (One Line, Title Case)","archived":false,"fork":false,"pushed_at":"2025-06-25T17:08:53.000Z","size":181,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T17:43:10.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AMRverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-25T13:41:13.000Z","updated_at":"2025-06-25T17:08:57.000Z","dependencies_parsed_at":"2025-05-07T18:14:24.933Z","dependency_job_id":"c6629a9e-3e70-48b2-9aad-73737e6c982d","html_url":"https://github.com/AMRverse/AMRrulemakeR","commit_stats":null,"previous_names":["katholt/amrrulesr","amrverse/amrrulemaker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AMRverse/AMRrulemakeR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMRverse%2FAMRrulemakeR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMRverse%2FAMRrulemakeR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMRverse%2FAMRrulemakeR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMRverse%2FAMRrulemakeR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AMRverse","download_url":"https://codeload.github.com/AMRverse/AMRrulemakeR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMRverse%2FAMRrulemakeR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268248941,"owners_count":24219559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-01T15:14:50.475Z","updated_at":"2025-08-01T15:14:53.167Z","avatar_url":"https://github.com/AMRverse.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"AMRrules_logo.png\" width=\"200\" align=\"left\"\u003e\n\n# AMRrulemakeR: Define and Test AMRrules for Interpreting AMR Genotypes\n\n\nThis package is in early development. Its purpose will be to define and test AMRrules, which specify how the presence of an antimicrobial resistance (AMR) marker in the genome of a given bacterial species should be interpreted in terms of the expected phenotype.\n\nAn overview of the AMRrules concept, with example data structures and code, is available in the [AMRrules](https://github.com/AMRverse/AMRrules) repository.\n\nDevelopment of the AMRrules scheme, and curation of organism-specific rule sets, is being undertaken by a working group of [ESGEM, the ESCMID Study Group on Epidemiological Markers](https://www.escmid.org/esgem/), known as the ESGEM-AMR Working Group. Details of this group and their activities can be found [here](https://github.com/AMRverse/AMRrulescuration), including draft rules in the AMRrules format ([specification v0.5](https://docs.google.com/spreadsheets/d/1F-J-_8Kyo3W0Oh6eDYyd0N8ahqVwiddM2112-Fg1gKc/edit?usp=sharing)).\n\nTo support the work of defining AMRrules, we have developed the [AMRgen](https://github.com/AMRverse/AMRgen) R package to facilitate comparison of AMR genotype and phenotype data and the defining and checking of rules based on quantitative analysis. \n\n__The `AMRrulemakeR` package draws on the `AMR` and `AMRgen` package functions to:__\n* summarise the available genotype-phenotype data for a given drug, and the available breakpoints with which to interpret phenotypes, using the `summarise_data` function\n* automate runnning a series of genotype-phenotype analyses (including calcualting solo marker positive predictive value, generating upset plots, calculating distributions for MIC and disk diffusion assay values for individual markers and combinations, logistic regression of markers vs phenotypes etc), using the `amrrules_analysis` function\n* use these quantitative results to draft AMRrules to interpret individual markers or combinations in terms of expected phenotypes (wildtype/nonwildtype) and clinical categories (S/I/R), according to the [AMRrules specification (v0.5)](https://docs.google.com/spreadsheets/d/1F-J-_8Kyo3W0Oh6eDYyd0N8ahqVwiddM2112-Fg1gKc/edit?usp=sharing), using the `makerules` function\n* automate generating and saving AMRrules, and saving the quantitative results to files (TSV tables, PDF figures), using the `amrrules_save` function\n* perform basic testing/validation of the auto-defined rules by applying them to interpret AMRfinderplus results into wildtype/nonwildtype S/I/R, using the `test_rules_amrfp` function (Note that this is separate from the main [AMRrules interpretation engine](https://github.com/AMRverse/AMRrules), which is being developed in Python.)\n\n\n## Getting Started\n\nTo install and explore the AMRrulemakeR package, follow the instructions below:\n\n### Installation\nNote that this package requires the latest version of the `AMR` and `AMRgen` packages.\n\nInstall the latest version of these with:\n```r\ninstall.packages(\"remotes\") # if you haven't already\nremotes::install_github(\"msberends/AMR\")\nremotes::install_github(\"AMRverse/AMRgen\")\n```\n\nThen install this package\n```r\n# Install from GitHub\nremotes::install_github(\"AMRverse/AMRrulemakeR\")\n```\n\nIt is best to restart R before running the installation. If you didn't do this and/or you encounter issues with the examples below after install, it may help to also restart after the install and start fresh with the examples below.\n\n\n### Examples\n```r\nlibrary(AMRgen)\nlibrary(AMRrulemakeR)\nlibrary(tidyverse)\n\n# example data from AMRgen package: E. coli MIC data from NCBI, matching AMRfinderplus data\necoli_ast\necoli_geno \u003c- import_amrfp(ecoli_geno_raw, \"Name\")\n\n# run quantitative analyses\ncip_analysis \u003c- amrrules_analysis(ecoli_geno, ecoli_ast, antibiotic=\"Cipro\", drug_class_list=c(\"Quinolones\"), species=\"E. coli\")\n\ncip_analysis$ppv_plot\ncip_analysis$upset_mic_plot\ncip_analysis$upset_disk_plot\n\n# save tables and plots and generate rules\ncip_rules \u003c- amrrules_save(cip_analysis, bp_site=\"Non-meningitis\", dir_path=\"amrrules\", file_prefix=\"Cipro\", use_disk=F, guide=\"CLSI 2025\")\n\n# alternatively, call makerules directly on the analysis object\ncip_rules \u003c- makerules(cip_analysis, bp_site=\"Non-meningitis\", use_disk=F, guide=\"CLSI 2025\")\n\n# view the proposed rules, in AMRrules specification format, with quantitative fields added\nview(cip_rules$rules)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrverse%2Famrrulemaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrverse%2Famrrulemaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrverse%2Famrrulemaker/lists"}