26 KiB
Package index
Introduction to the package
Please find the introduction to (and some general information about) our package here.
-
The
AMRPackage
Preparing data: microorganisms
These functions are meant to get taxonomically valid properties of
microorganisms from any input, but also properties derived from
taxonomy, such as the Gram stain
(mo_gramstain()) ,
or mo_is_yeast().
Use mo_source() to
teach this package how to translate your own codes to valid
microorganisms, and use
add_custom_microorganisms()
to add your own custom microorganisms to this package.
as.mo()is.mo()mo_uncertainties()mo_renamed()mo_failures()mo_reset_session()mo_cleaning_regex(): Transform Arbitrary Input to Valid Microbial Taxonomymo_name()mo_fullname()mo_shortname()mo_subspecies()mo_species()mo_genus()mo_family()mo_order()mo_class()mo_phylum()mo_kingdom()mo_domain()mo_type()mo_status()mo_pathogenicity()mo_gramstain()mo_is_gram_negative()mo_is_gram_positive()mo_is_yeast()mo_is_intrinsic_resistant()mo_oxygen_tolerance()mo_is_anaerobic()mo_snomed()mo_ref()mo_authors()mo_year()mo_lpsn()mo_mycobank()mo_gbif()mo_rank()mo_taxonomy()mo_synonyms()mo_current()mo_group_members()mo_info()mo_url()mo_property(): Get Properties of a Microorganism-
add_custom_microorganisms()clear_custom_microorganisms()- Add Custom Microorganisms
set_mo_source()get_mo_source(): User-Defined Reference Data Set for Microorganisms
Preparing data: antimicrobials
Use these functions to get valid properties of antimicrobials from any
input or to clean your input. You can even retrieve drug names and doses
from clinical text records, using
ab_from_text().
as.ab()is.ab()ab_reset_session(): Transform Input to an Antibiotic IDab_name()ab_cid()ab_synonyms()ab_tradenames()ab_group()ab_atc()ab_atc_group1()ab_atc_group2()ab_loinc()ab_ddd()ab_ddd_units()ab_info()ab_url()ab_property()set_ab_names(): Get Properties of an Antibioticab_from_text(): Retrieve Antimicrobial Drug Names and Doses from Clinical Text-
atc_online_property()atc_online_groups()atc_online_ddd()atc_online_ddd_units()- Get ATC Properties from WHOCC Website
-
add_custom_antimicrobials()clear_custom_antimicrobials()- Add Custom Antimicrobials
Preparing data: antimicrobial results
With as.mic() and
as.disk() you can
transform your raw input to valid MIC or disk diffusion values. Use
as.sir() for cleaning raw
data to let it only contain “R”, “I” and “S”, or to interpret MIC or
disk diffusion values as SIR based on the lastest EUCAST and CLSI
guidelines. Afterwards, you can extend antibiotic interpretations by
applying EUCAST
rules
with
eucast_rules().
-
as.sir()NA_sir_is.sir()is_sir_eligible()sir_interpretation_history()- Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data
-
as.mic()is.mic()NA_mic_rescale_mic()mic_p50()mic_p90()droplevels(<mic>)- Transform Input to Minimum Inhibitory Concentrations (MIC)
as.disk()NA_disk_is.disk(): Transform Input to Disk Diffusion Diameterseucast_rules()eucast_dosage(): Apply EUCAST Rules-
custom_eucast_rules()- Define Custom EUCAST Rules
Analysing data
Use these function for the analysis part. You can use
susceptibility() or
resistance() on any
antibiotic column. With
antibiogram(), you
can generate a traditional, combined, syndromic, or weighted-incidence
syndromic combination antibiogram (WISCA). This function also comes with
support for R Markdown and Quarto. Be sure to first select the isolates
that are appropiate for analysis, by using
first_isolate() or
is_new_episode().
You can also filter your data on certain resistance in certain
antibiotic classes
(carbapenems(),
aminoglycosides()),
or determine multi-drug resistant microorganisms (MDRO,
mdro()).
-
antibiogram()wisca()retrieve_wisca_parameters()plot(<antibiogram>)autoplot(<antibiogram>)knit_print(<antibiogram>)- Generate Traditional, Combination, Syndromic, or WISCA Antibiograms
-
resistance()susceptibility()sir_confidence_interval()proportion_R()proportion_IR()proportion_I()proportion_SI()proportion_S()proportion_df()sir_df(): Calculate Antimicrobial Resistance -
count_resistant()count_susceptible()count_S()count_SI()count_I()count_IR()count_R()count_all()n_sir()count_df(): Count Available Isolates -
get_episode()is_new_episode(): Determine Clinical or Epidemic Episodes -
first_isolate()filter_first_isolate()- Determine First Isolates
-
key_antimicrobials()all_antimicrobials()antimicrobials_equal()- (Key) Antimicrobials for First Weighted Isolates
-
mdro()brmo()mrgn()mdr_tb()mdr_cmi2012()eucast_exceptional_phenotypes()- Determine Multidrug-Resistant Organisms (MDRO)
-
custom_mdro_guideline()c(<custom_mdro_guideline>)- Define Custom MDRO Guideline
-
bug_drug_combinations()format(<bug_drug_combinations>)- Determine Bug-Drug Combinations
-
aminoglycosides()aminopenicillins()antifungals()antimycobacterials()betalactams()betalactams_with_inhibitor()carbapenems()cephalosporins()cephalosporins_1st()cephalosporins_2nd()cephalosporins_3rd()cephalosporins_4th()cephalosporins_5th()fluoroquinolones()glycopeptides()isoxazolylpenicillins()lincosamides()lipoglycopeptides()macrolides()monobactams()nitrofurans()oxazolidinones()penicillins()phenicols()polymyxins()quinolones()rifamycins()streptogramins()sulfonamides()tetracyclines()trimethoprims()ureidopenicillins()amr_class()amr_selector()administrable_per_os()administrable_iv()not_intrinsic_resistant()- Antimicrobial Selectors
-
Filter Top n Microorganisms
-
mean_amr_distance()amr_distance_from_row()- Calculate the Mean AMR Distance
-
resistance_predict()sir_predict()plot(<resistance_predict>)ggplot_sir_predict()autoplot(<resistance_predict>)- Predict Antimicrobial Resistance
-
guess_ab_col(): Guess Antibiotic Column
Plotting data
Use these functions for the plotting part. The scale_*_mic() functions
extend the ggplot2 package to allow plotting of MIC values, even within
a manually set range. If using
plot() (base R) or
autoplot()
(ggplot2) on MIC values or disk diffusion values, the user can set the
interpretation guideline to give the bars the right SIR colours. The
ggplot_sir() function
is a short wrapper for users not much accustomed to ggplot2 yet. The
ggplot_pca() function
is a specific function to plot so-called biplots for PCA (principal
component analysis).
-
scale_x_mic()scale_y_mic()scale_colour_mic()scale_fill_mic()scale_x_sir()scale_colour_sir()scale_fill_sir()plot(<mic>)autoplot(<mic>)plot(<disk>)autoplot(<disk>)plot(<sir>)autoplot(<sir>)facet_sir()scale_y_percent()scale_sir_colours()theme_sir()labels_sir_count(): Plotting Helpers for AMR Data Analysis -
AMR Plots with
ggplot2 -
PCA Biplot with
ggplot2
AMR-specific options
The AMR package is customisable, by providing settings that can be set per user or per team. For example, the default interpretation guideline can be changed from EUCAST to CLSI, or a supported language can be set for the whole team (system-language independent) for antibiotic names in a foreign language.
AMR-options: Options for the AMR package
Other: antiviral drugs
This package also provides extensive support for antiviral agents, even
though it is not the primary scope of this package. Working with data
containing information about antiviral drugs was never easier. Use these
functions to get valid properties of antiviral drugs from any input or
to clean your input. You can even retrieve drug names and doses from
clinical text records, using
av_from_text().
as.av()is.av(): Transform Input to an Antiviral Drug IDav_name()av_cid()av_synonyms()av_tradenames()av_group()av_atc()av_loinc()av_ddd()av_ddd_units()av_info()av_url()av_property(): Get Properties of an Antiviral Drugav_from_text(): Retrieve Antiviral Drug Names and Doses from Clinical Text
Other: background information on included data
Some pages about our package and its external sources. Be sure to read our How To’s for more information about how to work with functions in this package.
-
microorganisms- Data Set with 78 679 Taxonomic Records of Microorganisms
antimicrobialsantibioticsantivirals: Data Sets with 618 Antimicrobial Drugs-
clinical_breakpoints- Data Set with Clinical Breakpoints for SIR Interpretation
-
example_isolates- Data Set with 2 000 Example Isolates
-
microorganisms.codes- Data Set with 6 036 Common Microorganism Codes
-
microorganisms.groups- Data Set with 534 Microorganisms In Species Groups
-
intrinsic_resistant- Data Set Denoting Bacterial Intrinsic Resistance
dosage: Data Set with Treatment Dosages as Defined by EUCASTWHOCC: WHOCC: WHO Collaborating Centre for Drug Statistics Methodology-
example_isolates_unclean- Data Set with Unclean Data
WHONET: Data Set with 500 Isolates - WHONET Example
Other: miscellaneous functions
These functions are mostly for internal use, but some of them may also
be suitable for your analysis. Especially the ‘like’ function can be
useful: if (x %like% y) {...}.
age_groups(): Split Ages into Age Groupsage(): Age in Years of Individuals-
export_ncbi_biosample()- Export Data Set as NCBI BioSample Antibiogram
availability(): Check Availability of Columnsget_AMR_locale()set_AMR_locale()reset_AMR_locale()translate_AMR(): Translate Strings from the AMR Package-
italicise_taxonomy()italicize_taxonomy()- Italicise Taxonomic Families, Genera, Species, Subspecies
like()`%like%``%unlike%``%like_case%``%unlike_case%`: Vectorised Pattern Matching with Keyboard Shortcut-
mo_matching_score()- Calculate the Matching Score for Microorganisms
pca(): Principal Component Analysis (for AMR)random_mic()random_disk()random_sir(): Random MIC Values/Disk Zones/SIR Generation
Other: statistical tests
Some statistical tests or methods are not part of base R and were added to this package for convenience.
-
g.test():G-test for Count Data
-
kurtosis(): Kurtosis of the Sample -
skewness(): Skewness of the Sample
Other: deprecated functions/arguments/datasets
These objects are deprecated, meaning that they will still work but show a warning that they will be removed in a future version.
ab_class()ab_selector(): Deprecated Functions, Arguments, or Datasets