Skip to contents

Data Import & Preprocessing

Functions to import, harmonise, and prepare genotype and phenotype data from public repositories or internal formats.

import_abricate()
Import and Process ABRicate Results
import_amrfp()
Import and Process AMRFinderPlus Results
import_amrfp_ebi()
Import EBI-processed AMRFinderPlus Genotypes
import_amrfp_ebi_ftp()
Import EBI-processed AMRFinderPlus Genotypes from FTP
import_amrfp_ebi_web()
Import EBI-processed AMRFinderPlus Genotypes from Web
import_amrrules_predictions()
Import phenotype predictions from AMRrules output
import_ebi_pheno()
Import and process antimicrobial susceptibility phenotype data from the EBI AMR web portal
import_ebi_pheno_ftp()
Import and process antimicrobial phenotype data files retrieved from the EBI AMR portal FTP site
import_geno()
Import and process antimicrobial genotype data from common sources
import_kleborate()
Import and Process Kleborate Results
import_microscan_pheno()
Import and process antimicrobial phenotype data exported from MicroScan instruments
import_ncbi_biosample()
Import and process antimicrobial phenotype data retrieved from NCBI BioSamples
import_ncbi_pheno()
Import and process antimicrobial susceptibility phenotype data from the NCBI AST browser
import_pheno()
Import and process antimicrobial phenotype data from common sources
import_phoenix_pheno()
Import and process antimicrobial phenotype data exported from BD Phoenix instruments
import_rgi()
Import and Process Resistance Gene Identifier (RGI) Results
import_sensititre_pheno()
Import and process antimicrobial phenotype data exported from Sensititre instruments
import_sirscan_pheno()
Import and process antimicrobial susceptibility data from SIRscan (Bio-Rad)
import_vitek_pheno()
Import and process antimicrobial phenotype data exported from Vitek instruments
import_whonet_pheno()
Import and process antimicrobial phenotype data from WHONET files
export_ebi_pheno()
Export EBI Antibiogram
export_ncbi_pheno()
Export NCBI BioSample Antibiogram
convert_aa_code()
Convert single-letter amino acid code(s) to three-letter code(s)
convert_mutation()
Convert mutation string based on method
download_ebi()
Download antimicrobial genotype or phenotype data from the EBI AMR Portal
download_ncbi_pheno()
Download NCBI antimicrobial susceptibility testing (AST) data
summarise_geno()
Summarise a Genotype Table
summarise_geno_pheno()
Summarise the intersection of a genotype table and a phenotype table
summarise_pheno()
Summarise a Phenotype Table
format_ebi_json()
Generate EBI antibiogram submission in JSON
format_pheno()
Import and process antimicrobial phenotype data from a generic format
get_binary_matrix()
Get Binary Matrix of Genotype and Phenotype Data
get_combo_matrix()
Add marker combinations to a binary geno-pheno matrix
query_ncbi_bq_geno()
Query antimicrobial genotype (MicroBIGG-E) data from NCBI Pathogen Detection BigQuery
query_ncbi_bq_pheno()
Query antimicrobial phenotype data from NCBI Pathogen Detection BigQuery

Resistance Interpretation

Core tools for interpreting antimicrobial resistance based on EUCAST breakpoints and custom models.

compare_estimates()
Plot to Compare Two Sets of Estimates
compare_geno_pheno_id()
Compare Genotype and Phenotype Data by Sample ID
get_eucast_amr_distribution() get_eucast_mic_distribution() get_eucast_disk_distribution() compare_mic_with_eucast() compare_disk_with_eucast()
Get and Compare Antimicrobial Wild Type Distributions from EUCAST
eucast_supported_ab_distributions()
Retrieve Available Antimicrobial Wild Type Distributions from EUCAST
merge_logreg_soloppv()
Merge Logistic Regression and Solo PPV Statistics
interpret_pheno()
Interpret antimicrobial susceptibility phenotype data in a standard format tibble

Modelling and analysis

Statistical models for resistance prediction and inference, including logistic regression and Firth regression.

amr_upset()
Generate Upset Plot
solo_ppv()
Perform Solo PPV Analysis for AMR Markers
amr_ppv()
Generate PPV Plot
amr_logistic()
AMR Logistic Regression Analysis
glm_details()
Extract Details from a Generalised Linear Model
logistf_details()
Extract Details from a logistf Model
getBreakpoints()
Get Clinical Breakpoints for an Antibiotic
checkBreakpoints()
Check and Retrieve Breakpoints for an Antibiotic
concordance()
Calculate genotype-phenotype concordance from binary matrix
concordance_from_tables()
Assess concordance between tables of observed and predicted phenotypes
print(<amr_concordance>)
Print method for amr_concordance objects

Visualisation & Reporting

Tools to visualise results, including MIC distributions, model outputs, and genotype-phenotype relationships.

plot_combined_stats()
Plot Combined Statistics
plot_estimates()
Plot Estimates from a Table of Results
plot_solo_logReg()
Plot Combined Statistics of Logistic Regression and Solo PPV
assay_by_var()
Plot Assay Values Colored by a Variable

Data

Example datasets for demonstration and reproducible analysis.

ecoli_pheno
E. coli NCBI AST Example Data, Re-interpreted with AMR Package
ecoli_pheno_raw
E. coli NCBI AST Example Data
ecoli_geno_raw
E. coli Genotype Example Data
ecoli_cip_vs_ref
E. coli Ciprofloxacin MIC Distribution Example Data
ecoli_cip_mic_data
EUCAST Reference distribution for Ciprofloxacin in E. coli
staph_pheno_ncbi
S. aureus Example of Imported NCBI Phenotype Data
staph_pheno_ncbi_raw
S. aureus Example of Raw Phenotype Data Downloaded from NCBI BioSamples via Entrez API
staph_pheno_ncbi_cloud_raw
S. aureus Example of Raw Phenotype Data Downloaded from NCBI via Google Cloud BigQuery
staph_geno_ncbi_cloud_raw
S. aureus Example of Raw Genotype Data Downloaded from NCBI via Google Cloud BigQuery
staph_pheno_ebi
S. aureus Example of Imported EBI Phenotype Data
staph_geno_ebi
S. aureus Example of Imported EBI Genotype Data
amrfp_drugs_table
NCBI Subclass mapping to drug class
pheno_eco_2075
E. coli AST data from Mills et al 2022
geno_eco_2075
E. coli genotype data from Mills et al 2022
eurogasp_geno_raw
N. gonorrhoeae Euro-GASP Genotype Data Use Case 1
ngono_cro_geno_raw
N. gonorrhoeae PBP2 Mutations Genotype Data Use Case 2
ngono_tet_geno_raw
N. gonorrhoeae Tetracycline Resistance Genotype Data Use Case 3
ngono_cro_pheno_raw
N. gonorrhoeae PBP2 Mutations Phenotype Data Use Case 2
eurogasp_pheno_raw
N. gonorrhoeae Euro-GASP Phenotype Data Use Case 1
azm_comparison
N. gonorrhoeae Euro-GASP azithromycin data vs EUCAST reference distribution
cip_comparison
N. gonorrhoeae Euro-GASP ciprofloxacin data vs EUCAST reference distribution
cro_comparison
N. gonorrhoeae Euro-GASP ceftriaxone data vs EUCAST reference distribution
cfm_comparison
N. gonorrhoeae Euro-GASP cefixime data vs EUCAST reference distribution
ngono_tet_pheno_raw
N. gonorrhoeae Tetracycline Resistance Phenotype Data Use Case 3
salm_raw
Example Salmonella Genotype-Phenotype Data
kleborate_raw
Example Kleborate Genotype Data from EuSCAPE project
kleborate_raw_v313
Example Kleborate v3.1.3 Genotype Data from EuSCAPE project
kleborate_classes
Table mapping Kleborate drug class columns
pheno_CLI_public
Clindamycin MIC data for 5914 Staphylococcus aureus isolates
afp_CLI_public
S. aureus Clindamycin Resistance Genotype Data
ST_data_CLI
ST data for Staphylococcus aureus genomes for clindamycin vignette
DASSIM_pheno_raw
DASSIM phenotype metadata
btESBL_pheno
blantyreESBL AST data
DASSIM_geno
DASSIM genotype data (AMRFinderPlus)
NCBI_Ecoli_pheno_chl
NCBI AST for Escherichia coli tested against chloramphenicol
MICROBIGGE_Ecoli_CHLR
MicroBIGG-E for E.coli containing all chloramphenicol resistance genes
rgi_raw
Example Resistance Gene Identifier (RGI) v6.0.6 Genotype Data
rgi_short_name_table
Table mapping CARD/RGI Model ID and CARD Short Name
rgi_drugs_table
Table mapping CARD/RGI drug class and antibiotic columns
rgi_EuSCAPE_raw
Example Resistance Gene Identifier (RGI) v6.0.6 Genotype Data from EuSCAPE project
kp_mero_euscape
Meropenem Phenotype Data from EuSCAPE project
kp_mero_amrfp
Example AMRFinderPlus Genotype Data from EuSCAPE project
sirscan_codes
SIRscan antibiotic code mapping