18 October 2019
METHODS PAPER PREPRINTED
@@ -293,9 +293,9 @@ A methods paper about this package has been preprinted at bioRxiv (DOI: 10.1101/NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.
Read more about the data from WHOCC in our manual.
We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an example data set WHONET with the exact same structure as a WHONET export file. Furthermore, this package also contains a data set antibiotics with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.
Read our tutorial about how to work with WHONET data here.
NEWS.md
vctrs package for data transformation and data joining. In newer versions of e.g. the dplyr package, a function like bind_rows() would not preserve the right class for microorganisms (class mo) and antibiotics (class ab). This is fixed in this version.ggplot_pca() functionFixed important floating point error for some MIC comparisons in EUCAST 2020 guideline
Interpretation from MIC values (and disk zones) to R/SI can now be used with mutate_at() of the dplyr package:
yourdata %>% @@ -288,15 +307,15 @@ yourdata %>% mutate_at(vars(antibiotic1:antibiotic25), as.rsi, mo = .$mybacteria)
Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole
Added uti (as abbreviation of urinary tract infections) as parameter to as.rsi(), so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs
uti (as abbreviation of urinary tract infections) as parameter to as.rsi(), so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIsInfo printing in functions eucast_rules(), first_isolate(), mdro() and resistance_predict() will now at default only print when R is in an interactive mode (i.e. not in RMarkdown)
This software is now out of beta and considered stable. Nonetheless, this package will be developed continually.
antibiotics data set (thanks to Peter Dutey):
RIF) to rifampicin/isoniazid (RFI). Please note that the combination rifampicin/isoniazid has no DDDs defined, so e.g. ab_ddd("Rimactazid") will now return NA.RIF) to rifampicin/isoniazid (RFI). Please note that the combination rifampicin/isoniazid has no DDDs defined, so e.g. ab_ddd("Rimactazid") will now return NA.SMX) to trimethoprim/sulfamethoxazole (SXT)Support for a new MDRO guideline: Magiorakos AP, Srinivasan A et al. “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).
+mdro() functionmdro(...., verbose = TRUE)) returns an informative data set where the reason for MDRO determination is given for every isolate, and an list of the resistant antimicrobial agentsas.mo():
Now allows “ou” where “au” should have been used and vice versa
More intelligent way of coping with some consonants like “l” and “r”
Added a score (a certainty percentage) to mo_uncertainties(), that is calculated using the Levenshtein distance:
Determination of first isolates now excludes all ‘unknown’ microorganisms at default, i.e. microbial code "UNKNOWN". They can be included with the new parameter include_unknown:
first_isolate(..., include_unknown = TRUE)
For WHONET users, this means that all records/isolates with organism code "con" (contamination) will be excluded at default, since as.mo("con") = "UNKNOWN". The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.
"con" (contamination) will be excluded at default, since as.mo("con") = "UNKNOWN". The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.
For code consistency, classes ab and mo will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in NA:
# how it works in base R: @@ -495,9 +512,8 @@ x[1] <- "testvalue" #> Warning message: #> invalid microorganism code, NA generated
This is important, because a value like "testvalue" could never be understood by e.g. mo_name(), although the class would suggest a valid microbial code.
Function freq() has moved to a new package, clean (CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq() function still works, since it is re-exported from the clean package (which will be installed automatically upon updating this AMR package).
"testvalue" could never be understood by e.g. mo_name(), although the class would suggest a valid microbial code.
+freq() has moved to a new package, clean (CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq() function still works, since it is re-exported from the clean package (which will be installed automatically upon updating this AMR package).Renamed data set septic_patients to example_isolates
Since this is a major change, usage of the old also_single_tested will throw an informative error that it has been replaced by only_all_tested.
also_single_tested will throw an informative error that it has been replaced by only_all_tested.
tibble printing support for classes rsi, mic, disk, ab mo. When using tibbles containing antimicrobial columns, values S will print in green, values I will print in yellow and values R will print in red. Microbial IDs (class mo) will emphasise on the genus and species, not on the kingdom.
# (run this on your own console, as this page does not support colour printing)
@@ -560,9 +575,9 @@
as.mo() (of which some led to additions to the microorganisms data set). Many thanks to all contributors that helped improving the algorithms.
eucast_rules(..., verbose = TRUE)) returns more informative and readable outputeucast_rules(..., verbose = TRUE)) returns more informative and readable outputFunction mo_info() as an analogy to ab_info(). The mo_info() prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism
mo_info() as an analogy to ab_info(). The mo_info() prints a list with the full taxonomy, authors, and the URL to the online database of a microorganismFunction mo_synonyms() to get all previously accepted taxonomic names of a microorganism
count_df() and portion_df() are now lowercaseas.mo()
plot() and barplot() for MIC and RSI classesplot() and barplot() for MIC and RSI classesas.mo()
mdr_tb()) and added a new vignette about MDR. Read this tutorial here on our website.Fixed a critical bug in first_isolate() where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.
Fixed a bug in eucast_rules() where antibiotics from WHONET software would not be recognised
Completely reworked the antibiotics data set:
first_isolate() where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.eucast_rules() where antibiotics from WHONET software would not be recognisedantibiotics data set:
All entries now have 3 different identifiers:
+ab contains a human readable EARS-Net code, used by ECDC and WHO/WHONET - this is the primary identifier used in this packageatc contains the ATC code, used by WHO/WHOCCcid contains the CID code (Compound ID), used by PubChemBased on the Compound ID, almost 5,000 official brand names have been added from many different countries
All references to antibiotics in our package now use EARS-Net codes, like AMX for amoxicillin
Functions atc_certe, ab_umcg and atc_trivial_nl have been removed
All atc_* functions are superceded by ab_* functions
AMX for amoxicillinatc_certe, ab_umcg and atc_trivial_nl have been removedatc_* functions are superceded by ab_* functionsAll output will be translated by using an included translation file which can be viewed here.
-Please create an issue in one of our repositories if you want additions in this file.
-Improvements to plotting AMR results with ggplot_rsi():
ggplot_rsi():
colours to set the bar colourstitle, subtitle, caption, x.title and y.title to set titles and axis descriptionsImproved intelligence of looking up antibiotic columns in a data set using guess_ab_col()
Added ~5,000 more old taxonomic names to the microorganisms.old data set, which leads to better results finding when using the as.mo() function
This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as ‘increased exposure’ and not ‘intermediate’ anymore. For functions like portion_df() and count_df() this means that their new parameter combine_SI is TRUE at default. Our plotting function ggplot_rsi() also reflects this change since it uses count_df() internally.
The age() function gained a new parameter exact to determine ages with decimals
Removed deprecated functions guess_mo(), guess_atc(), EUCAST_rules(), interpretive_reading(), rsi()
Frequency tables (freq()):
guess_ab_col()
+microorganisms.old data set, which leads to better results finding when using the as.mo() functionportion_df() and count_df() this means that their new parameter combine_SI is TRUE at default. Our plotting function ggplot_rsi() also reflects this change since it uses count_df() internally.age() function gained a new parameter exact to determine ages with decimalsguess_mo(), guess_atc(), EUCAST_rules(), interpretive_reading(), rsi()
+freq()):
speed improvement for microbial IDs
fixed factor level names for R Markdown
when all values are unique it now shows a message instead of a warning
support for boxplots:
septic_patients %>% @@ -778,17 +790,20 @@
Removed all hardcoded EUCAST rules and replaced them with a new reference file which can be viewed here.
-Please create an issue in one of our repositories if you want changes in this file.
+Please create an issue in one of our repositories if you want changes in this file.Added ceftazidim intrinsic resistance to Streptococci
Changed default settings for age_groups(), to let groups of fives and tens end with 100+ instead of 120+
Fix for freq() for when all values are NA
Fix for first_isolate() for when dates are missing
Improved speed of guess_ab_col()
Function as.mo() now gently interprets any number of whitespace characters (like tabs) as one space
Function as.mo() now returns UNKNOWN for "con" (WHONET ID of ‘contamination’) and returns NA for "xxx"(WHONET ID of ‘no growth’)
Small algorithm fix for as.mo()
Removed viruses from data set microorganisms.codes and cleaned it up
age_groups(), to let groups of fives and tens end with 100+ instead of 120+freq() for when all values are NA
+first_isolate() for when dates are missingguess_ab_col()
+as.mo() now gently interprets any number of whitespace characters (like tabs) as one spaceas.mo() now returns UNKNOWN for "con" (WHONET ID of ‘contamination’) and returns NA for "xxx"(WHONET ID of ‘no growth’)as.mo()
+microorganisms.codes and cleaned it upFix for mo_shortname() where species would not be determined correctly
eucast_rules() with verbose = TRUE
New website!
We’ve got a new website: https://msberends.gitlab.io/AMR (built with the great pkgdown)
BREAKING: removed deprecated functions, parameters and references to ‘bactid’. Use as.mo() to identify an MO code.
Catalogue of Life as a new taxonomic source for data about microorganisms, which also contains all ITIS data we used previously. The microorganisms data set now contains:
as.mo() to identify an MO code.microorganisms data set now contains:
All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa
All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales (covering at least like all species of Aspergillus, Candida, Pneumocystis, Saccharomyces and Trichophyton)
All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like Strongyloides and Taenia)
All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
The responsible author(s) and year of scientific publication
-This data is updated annually - check the included version with the new function catalogue_of_life_version().
Due to this change, some mo codes changed (e.g. Streptococcus changed from B_STRPTC to B_STRPT). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.
New function mo_rank() for the taxonomic rank (genus, species, infraspecies, etc.)
New function mo_url() to get the direct URL of a species from the Catalogue of Life
catalogue_of_life_version().mo codes changed (e.g. Streptococcus changed from B_STRPTC to B_STRPT). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.mo_rank() for the taxonomic rank (genus, species, infraspecies, etc.)mo_url() to get the direct URL of a species from the Catalogue of LifeSupport for data from WHONET and EARS-Net (European Antimicrobial Resistance Surveillance Network):
+first_isolate() and eucast_rules(), all parameters will be filled in automatically.antibiotics data set now contains a column ears_net.These functions use as.atc() internally. The old atc_property has been renamed atc_online_property(). This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo() and e.g. mo_genus.
New functions set_mo_source() and get_mo_source() to use your own predefined MO codes as input for as.mo() and consequently all mo_* functions
Support for the upcoming dplyr version 0.8.0
New function guess_ab_col() to find an antibiotic column in a table
New function mo_failures() to review values that could not be coerced to a valid MO code, using as.mo(). This latter function will now only show a maximum of 10 uncoerced values and will refer to mo_failures().
New function mo_uncertainties() to review values that could be coerced to a valid MO code using as.mo(), but with uncertainty.
New function mo_renamed() to get a list of all returned values from as.mo() that have had taxonomic renaming
New function age() to calculate the (patients) age in years
New function age_groups() to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.
as.atc() internally. The old atc_property has been renamed atc_online_property(). This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo() and e.g. mo_genus.
+set_mo_source() and get_mo_source() to use your own predefined MO codes as input for as.mo() and consequently all mo_* functionsdplyr version 0.8.0guess_ab_col() to find an antibiotic column in a tablemo_failures() to review values that could not be coerced to a valid MO code, using as.mo(). This latter function will now only show a maximum of 10 uncoerced values and will refer to mo_failures().mo_uncertainties() to review values that could be coerced to a valid MO code using as.mo(), but with uncertainty.mo_renamed() to get a list of all returned values from as.mo() that have had taxonomic renamingage() to calculate the (patients) age in yearsage_groups() to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.New function ggplot_rsi_predict() as well as the base R plot() function can now be used for resistance prediction calculated with resistance_predict():
New function ggplot_rsi_predict() as well as the base R plot() function can now be used for resistance prediction calculated with resistance_predict():
x <- resistance_predict(septic_patients, col_ab = "amox") -plot(x) +plot(x) ggplot_rsi_predict(x)
New function availability() to check the number of available (non-empty) results in a data.frame
availability() to check the number of available (non-empty) results in a data.frame
+New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.
Using as.mo(..., allow_uncertain = 3) could lead to very unreliable results.
as.mo(..., allow_uncertain = 3) could lead to very unreliable results.
+Implemented the latest publication of Becker et al. (2019), for categorising coagulase-negative Staphylococci
All microbial IDs that found are now saved to a local file ~/.Rhistory_mo. Use the new function clean_mo_history() to delete this file, which resets the algorithms.
~/.Rhistory_mo. Use the new function clean_mo_history() to delete this file, which resets the algorithms.Incoercible results will now be considered ‘unknown’, MO code UNKNOWN. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:
mo_genus("qwerty", language = "es") @@ -963,16 +976,17 @@ # one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it. #> [1] "(género desconocido)"
Fix for vector containing only empty values
Finds better results when input is in other languages
Better handling for subspecies
Better handling for Salmonellae, especially the ‘city like’ serovars like Salmonella London
Understanding of highly virulent E. coli strains like EIEC, EPEC and STEC
There will be looked for uncertain results at default - these results will be returned with an informative warning
Manual (help page) now contains more info about the algorithms
Progress bar will be shown when it takes more than 3 seconds to get results
Support for formatted console text
Console will return the percentage of uncoercable input
first_isolate():
@@ -1020,15 +1034,17 @@
group_by(gender) %>%
freq(mo_genus(mo))Header info is now available as a list, with the header function
The parameter header is now set to TRUE at default, even for markdown
Added header info for class mo to show unique count of families, genera and species
Now honours the decimal.mark setting, which just like format defaults to getOption("OutDec")
The new big.mark parameter will at default be "," when decimal.mark = "." and "." otherwise
Fix for header text where all observations are NA
New parameter droplevels to exclude empty factor levels when input is a factor
Factor levels will be in header when present in input data (maximum of 5)
Fix for using select() on frequency tables
header functionheader is now set to TRUE at default, even for markdownmo to show unique count of families, genera and speciesdecimal.mark setting, which just like format defaults to getOption("OutDec")
+big.mark parameter will at default be "," when decimal.mark = "." and "." otherwiseNA
+droplevels to exclude empty factor levels when input is a factorselect() on frequency tablesscale_y_percent() now contains the limits parametermo_authors and mo_year to get specific values about the scientific reference of a taxonomic entryFunctions MDRO, BRMO, MRGN and EUCAST_exceptional_phenotypes were renamed to mdro, brmo, mrgn and eucast_exceptional_phenotypes
EUCAST_rules was renamed to eucast_rules, the old function still exists as a deprecated function
MDRO, BRMO, MRGN and EUCAST_exceptional_phenotypes were renamed to mdro, brmo, mrgn and eucast_exceptional_phenotypes
+Big changes to the eucast_rules function:
EUCAST_rules was renamed to eucast_rules, the old function still exists as a deprecated functioneucast_rules function:
rules to specify which rules should be applied (expert rules, breakpoints, others or all)Added column kingdom to the microorganisms data set, and function mo_kingdom to look up values
Tremendous speed improvement for as.mo (and subsequently all mo_* functions), as empty values wil be ignored a priori
Fewer than 3 characters as input for as.mo will return NA
kingdom to the microorganisms data set, and function mo_kingdom to look up valuesas.mo (and subsequently all mo_* functions), as empty values wil be ignored a priori
+as.mo will return NAFunction as.mo (and all mo_* wrappers) now supports genus abbreviations with “species” attached
as.mo("E. species") # B_ESCHR @@ -1094,13 +1112,14 @@ as.mo("S. spp") # B_STPHY mo_fullname("S. species") # "Staphylococcus species"
Added parameter combine_IR (TRUE/FALSE) to functions portion_df and count_df, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)
Fix for portion_*(..., as_percent = TRUE) when minimal number of isolates would not be met
Added parameter also_single_tested for portion_* and count_* functions to also include cases where not all antibiotics were tested but at least one of the tested antibiotics includes the target antimicribial interpretation, see ?portion
Using portion_* functions now throws a warning when total available isolate is below parameter minimum
Functions as.mo, as.rsi, as.mic, as.atc and freq will not set package name as attribute anymore
Frequency tables - freq():
combine_IR (TRUE/FALSE) to functions portion_df and count_df, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)portion_*(..., as_percent = TRUE) when minimal number of isolates would not be metalso_single_tested for portion_* and count_* functions to also include cases where not all antibiotics were tested but at least one of the tested antibiotics includes the target antimicribial interpretation, see ?portion
+portion_* functions now throws a warning when total available isolate is below parameter minimum
+as.mo, as.rsi, as.mic, as.atc and freq will not set package name as attribute anymorefreq():
Check for hms::is.hms
Now prints in markdown at default in non-interactive sessions
No longer adds the factor level column and sorts factors on count again
Support for class difftime
New parameter na, to choose which character to print for empty values
New parameter header to turn the header info off (default when markdown = TRUE)
New parameter title to manually setbthe title of the frequency table
hms::is.hms
+difftime
+na, to choose which character to print for empty valuesheader to turn the header info off (default when markdown = TRUE)title to manually setbthe title of the frequency tablefirst_isolate now tries to find columns to use as input when parameters are left blank
Improvements for MDRO algorithm (function mdro)
Data set septic_patients is now a data.frame, not a tibble anymore
Removed diacritics from all authors (columns microorganisms$ref and microorganisms.old$ref) to comply with CRAN policy to only allow ASCII characters
Fix for mo_property not working properly
Fix for eucast_rules where some Streptococci would become ceftazidime R in EUCAST rule 4.5
Support for named vectors of class mo, useful for top_freq()
ggplot_rsi and scale_y_percent have breaks parameter
AI improvements for as.mo:
first_isolate now tries to find columns to use as input when parameters are left blankmdro)septic_patients is now a data.frame, not a tibble anymoremicroorganisms$ref and microorganisms.old$ref) to comply with CRAN policy to only allow ASCII charactersmo_property not working properlyeucast_rules where some Streptococci would become ceftazidime R in EUCAST rule 4.5mo, useful for top_freq()
+ggplot_rsi and scale_y_percent have breaks parameteras.mo:
"CRS" -> Stenotrophomonas maltophilia
@@ -1148,11 +1171,12 @@
Fix for join functions
Speed improvement for is.rsi.eligible, now 15-20 times faster
In g.test, when sum(x) is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggested
ab_name will try to fall back on as.atc when no results are found
Removed the addin to view data sets
join functionsis.rsi.eligible, now 15-20 times fasterg.test, when sum(x) is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggestedab_name will try to fall back on as.atc when no results are foundPercentages will now will rounded more logically (e.g. in freq function)
The data set microorganisms now contains all microbial taxonomic data from ITIS (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via https://itis.gov. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set microorganisms.old contains all previously known taxonomic names from those kingdoms.
New functions based on the existing function mo_property:
microorganisms now contains all microbial taxonomic data from ITIS (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via https://itis.gov. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set microorganisms.old contains all previously known taxonomic names from those kingdoms.mo_property:
mo_phylum, mo_class, mo_order, mo_family, mo_genus, mo_species, mo_subspecies
Functions count_R, count_IR, count_I, count_SI and count_S to selectively count resistant or susceptible isolates
count_R, count_IR, count_I, count_SI and count_S to selectively count resistant or susceptible isolates
count_df (which works like portion_df) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variablesFunction is.rsi.eligible to check for columns that have valid antimicrobial results, but do not have the rsi class yet. Transform the columns of your raw data with: data %>% mutate_if(is.rsi.eligible, as.rsi)
is.rsi.eligible to check for columns that have valid antimicrobial results, but do not have the rsi class yet. Transform the columns of your raw data with: data %>% mutate_if(is.rsi.eligible, as.rsi)
+Functions as.mo and is.mo as replacements for as.bactid and is.bactid (since the microoganisms data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The as.mo function determines microbial IDs using intelligent rules:
as.mo("E. coli") @@ -1223,9 +1246,8 @@ # min median max neval # 0.01817717 0.01843957 0.03878077 100
Added parameter reference_df for as.mo, so users can supply their own microbial IDs, name or codes as a reference table
Renamed all previous references to bactid to mo, like:
reference_df for as.mo, so users can supply their own microbial IDs, name or codes as a reference tablebactid to mo, like:
EUCAST_rules, first_isolate and key_antibiotics
Function labels_rsi_count to print datalabels on a RSI ggplot2 model
labels_rsi_count to print datalabels on a RSI ggplot2 modelFunctions as.atc and is.atc to transform/look up antibiotic ATC codes as defined by the WHO. The existing function guess_atc is now an alias of as.atc.
Function ab_property and its aliases: ab_name, ab_tradenames, ab_certe, ab_umcg and ab_trivial_nl
Introduction to AMR as a vignette
Removed clipboard functions as it violated the CRAN policy
ab_property and its aliases: ab_name, ab_tradenames, ab_certe, ab_umcg and ab_trivial_nl
+Renamed septic_patients$sex to septic_patients$gender
Added three antimicrobial agents to the antibiotics data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)
antibiotics data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)Added 163 trade names to the antibiotics data set, it now contains 298 different trade names in total, e.g.:
For first_isolate, rows will be ignored when there’s no species available
Function ratio is now deprecated and will be removed in a future release, as it is not really the scope of this package
Fix for as.mic for values ending in zeroes after a real number
Small fix where B. fragilis would not be found in the microorganisms.umcg data set
Added prevalence column to the microorganisms data set
Added parameters minimum and as_percent to portion_df
first_isolate, rows will be ignored when there’s no species availableratio is now deprecated and will be removed in a future release, as it is not really the scope of this packageas.mic for values ending in zeroes after a real numbermicroorganisms.umcg data setprevalence column to the microorganisms data setminimum and as_percent to portion_df
+Support for quasiquotation in the functions series count_* and portions_*, and n_rsi. This allows to check for more than 2 vectors or columns.
Edited ggplot_rsi and geom_rsi so they can cope with count_df. The new fun parameter has value portion_df at default, but can be set to count_df.
Fix for ggplot_rsi when the ggplot2 package was not loaded
Added datalabels function labels_rsi_count to ggplot_rsi
Added possibility to set any parameter to geom_rsi (and ggplot_rsi) so you can set your own preferences
Fix for joins, where predefined suffices would not be honoured
Added parameter quote to the freq function
Added generic function diff for frequency tables
Added longest en shortest character length in the frequency table (freq) header of class character
ggplot_rsi and geom_rsi so they can cope with count_df. The new fun parameter has value portion_df at default, but can be set to count_df.ggplot_rsi when the ggplot2 package was not loadedlabels_rsi_count to ggplot_rsi
+geom_rsi (and ggplot_rsi) so you can set your own preferencesquote to the freq functiondiff for frequency tablesfreq) header of class character
+Support for types (classes) list and matrix for freq
resistance_predict and added more examplesas.mic("<= 0.002") now worksas.mic("<= 0.002") now worksrsi and mic do not add the attribute package.version anymore"groups" option for atc_property(..., property). It will return a vector of the ATC hierarchy as defined by the WHO. The new function atc_groups is a convenient wrapper around this.atc_property as it requires the host set by url to be responsivetibbles and data.tablesrsi and mic classesvctrs methods — AMR-vctrs • AMR (for R)These methods are needed to support methods used by the tidyverse, like joining and transforming data, with new classes that come with this package.
+vec_ptype2.mo(x, y, ...) + +vec_cast.mo(x, to, ...) + +vec_ptype2.ab(x, y, ...) + +vec_cast.ab(x, to, ...)+ + +
+The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.
If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
+On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
+ +https://gitlab.com/msberends/AMR/raw/master/data-raw/antivirals.txt
Files in R format (which data structure) can be found here:
Files in R format (with preserved data structure) can be found here:
@@ -334,7 +334,7 @@ This package contains all ~550 antibiotic, antimycotic and antiviral druObjects exported from other packages
vctrs methods
https://gitlab.com/msberends/AMR/raw/master/data-raw/microorganisms.txt
The file in R format (which data structure) can be found here:
The file in R format (with preserved data structure) can be found here:
@@ -317,7 +317,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 3fb120fe7..26fff214f 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ @@ -325,6 +325,7 @@mo_ref("Chlamydophila psittaci") will return "Everett et al., 1999" (without a warning)
The short name - mo_shortname() - almost always returns the first character of the genus and the species, like "E. coli". Exceptions are abbreviations of staphylococci and beta-haemolytic streptococci, like "CoNS" (Coagulase-Negative Staphylococci) and "GBS" (Group B Streptococci).
The Gram stain - mo_gramstain() - will be determined on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002) who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value NA.
All output will be translated where possible.
The function mo_url() will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.