mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 18:46:11 +01:00
scientific notation for MICs
This commit is contained in:
parent
bcab4bc9ba
commit
ca72a646d0
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 2.1.0.9003
|
||||
Version: 2.1.0.9004
|
||||
Date: 2023-10-20
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
4
NEWS.md
4
NEWS.md
@ -1,10 +1,10 @@
|
||||
# AMR 2.1.0.9003
|
||||
# AMR 2.1.0.9004
|
||||
|
||||
* Fix for selecting first isolates using the phenotype-based method
|
||||
* This included too many isolates when patients had altering antibiograms within the same bacterial species
|
||||
* See for more info [our issue #122](https://github.com/msberends/AMR/issues/122)
|
||||
* Added 1,366 LOINC codes to the `antibiotics` data set and updated to the latest version (LOINC v2.76)
|
||||
* MICs can now be used in complex number calculations
|
||||
* MICs can now be used in complex number calculations and allow scientific number format as input (e.g., `as.mic("1.28e-2")`)
|
||||
* Fix rounding MICs on latest R beta ('R-devel')
|
||||
* Removed unneeded note about the used language when option `AMR_locale` is set
|
||||
* Fixed non-ASCII characters in documentation, according to CRAN maintainers
|
||||
|
@ -102,7 +102,7 @@ TAXONOMY_VERSION <- list(
|
||||
),
|
||||
SNOMED = list(
|
||||
accessed_date = as.Date("2021-07-01"),
|
||||
citation = "Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12).",
|
||||
citation = "Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12).",
|
||||
url = "https://phinvads.cdc.gov"
|
||||
),
|
||||
LOINC = list(
|
||||
@ -113,6 +113,7 @@ TAXONOMY_VERSION <- list(
|
||||
)
|
||||
|
||||
globalVariables(c(
|
||||
".GenericCallEnv",
|
||||
".mo",
|
||||
".rowid",
|
||||
".syndromic_group",
|
||||
|
2
R/mic.R
2
R/mic.R
@ -184,6 +184,8 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
|
||||
# comma to period
|
||||
x <- gsub(",", ".", x, fixed = TRUE)
|
||||
# transform scientific notation
|
||||
x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"] <- as.double(x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"])
|
||||
# transform Unicode for >= and <=
|
||||
x <- gsub("\u2264", "<=", x, fixed = TRUE)
|
||||
x <- gsub("\u2265", ">=", x, fixed = TRUE)
|
||||
|
@ -45,6 +45,19 @@ expect_equal(
|
||||
1373
|
||||
)
|
||||
|
||||
# for phenotype determination
|
||||
expect_equal(AMR:::duplicated_antibiogram("SSSS", points_threshold = 2, ignore_I = TRUE, type = "points"),
|
||||
FALSE)
|
||||
expect_equal(AMR:::duplicated_antibiogram(c("RRR", "SSS"),
|
||||
points_threshold = 2, ignore_I = TRUE, type = "points"),
|
||||
c(FALSE, FALSE))
|
||||
expect_equal(AMR:::duplicated_antibiogram(c("RRR", "RRR", "SSS"),
|
||||
points_threshold = 2, ignore_I = TRUE, type = "points"),
|
||||
c(FALSE, TRUE, FALSE))
|
||||
expect_equal(AMR:::duplicated_antibiogram(c("RRR", "RSS", "SSS", "RSS", "RRR", "RRR", "SSS", "RSS", "RSR", "RRR"),
|
||||
points_threshold = 2, ignore_I = TRUE, type = "points"),
|
||||
c(FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE))
|
||||
|
||||
# Phenotype-based, using key antimicrobials
|
||||
expect_equal(
|
||||
sum(first_isolate(
|
||||
|
@ -127,7 +127,7 @@ The coercion rules consider the prevalence of microorganisms in humans, which is
|
||||
\item Parte, AC \emph{et al.} (2020). \strong{List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ.} International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; \doi{10.1099/ijsem.0.004332}. Accessed from \url{https://lpsn.dsmz.de} on December 11th, 2022.
|
||||
\item GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset \doi{10.15468/39omei}. Accessed from \url{https://www.gbif.org} on December 11th, 2022.
|
||||
\item Reimer, LC \emph{et al.} (2022). \strong{\emph{BacDive} in 2022: the knowledge base for standardized bacterial and archaeal data.} Nucleic Acids Res., 50(D1):D741-D74; \doi{10.1093/nar/gkab961}. Accessed from \url{https://bacdive.dsmz.de} on May 12th, 2023.
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Bartlett A \emph{et al.} (2022). \strong{A comprehensive list of bacterial pathogens infecting humans} \emph{Microbiology} 168:001269; \doi{10.1099/mic.0.001269}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ A \link[tibble:tibble]{tibble} with 52 171 observations and 23 variables:
|
||||
\item Parte, AC \emph{et al.} (2020). \strong{List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ.} International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; \doi{10.1099/ijsem.0.004332}. Accessed from \url{https://lpsn.dsmz.de} on December 11th, 2022.
|
||||
\item GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset \doi{10.15468/39omei}. Accessed from \url{https://www.gbif.org} on December 11th, 2022.
|
||||
\item Reimer, LC \emph{et al.} (2022). \strong{\emph{BacDive} in 2022: the knowledge base for standardized bacterial and archaeal data.} Nucleic Acids Res., 50(D1):D741-D74; \doi{10.1093/nar/gkab961}. Accessed from \url{https://bacdive.dsmz.de} on May 12th, 2023.
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Grimont \emph{et al.} (2007). Antigenic Formulae of the Salmonella Serovars, 9th Edition. WHO Collaborating Centre for Reference and Research on \emph{Salmonella} (WHOCC-SALM).
|
||||
\item Bartlett \emph{et al.} (2022). \strong{A comprehensive list of bacterial pathogens infecting humans} \emph{Microbiology} 168:001269; \doi{10.1099/mic.0.001269}
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ This function uses \code{\link[=as.mo]{as.mo()}} internally, which uses an advan
|
||||
\item Parte, AC \emph{et al.} (2020). \strong{List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ.} International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; \doi{10.1099/ijsem.0.004332}. Accessed from \url{https://lpsn.dsmz.de} on December 11th, 2022.
|
||||
\item GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset \doi{10.15468/39omei}. Accessed from \url{https://www.gbif.org} on December 11th, 2022.
|
||||
\item Reimer, LC \emph{et al.} (2022). \strong{\emph{BacDive} in 2022: the knowledge base for standardized bacterial and archaeal data.} Nucleic Acids Res., 50(D1):D741-D74; \doi{10.1093/nar/gkab961}. Accessed from \url{https://bacdive.dsmz.de} on May 12th, 2023.
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: \url{https://phinvads.cdc.gov}
|
||||
\item Bartlett A \emph{et al.} (2022). \strong{A comprehensive list of bacterial pathogens infecting humans} \emph{Microbiology} 168:001269; \doi{10.1099/mic.0.001269}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user