mirror of
https://github.com/msberends/AMR.git
synced 2026-06-24 14:16:19 +02:00
(v3.0.1.9059) Update taxonomy of microorganisms
This commit is contained in:
@@ -81,12 +81,13 @@ test_that("test-data.R", {
|
||||
}
|
||||
}
|
||||
|
||||
AMR:::add_MO_lookup_to_AMR_env()
|
||||
df <- AMR:::AMR_env$MO_lookup
|
||||
expect_true(all(c(
|
||||
"mo", "fullname", "status", "kingdom", "phylum", "class", "order",
|
||||
"family", "genus", "species", "subspecies", "rank", "ref", "source",
|
||||
"lpsn", "lpsn_parent", "lpsn_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence",
|
||||
"snomed", "kingdom_index", "fullname_lower", "full_first", "species_first"
|
||||
"snomed", "domain_index", "fullname_lower", "full_first", "species_first"
|
||||
) %in% colnames(df)))
|
||||
|
||||
expect_inherits(AMR:::MO_CONS, "mo")
|
||||
|
||||
@@ -84,6 +84,16 @@ test_that("test-mo.R", {
|
||||
|
||||
# expect_warning(as.mo("Acinetobacter calcoaceticus/baumannii complex"))
|
||||
|
||||
# Issue #287: "X complex" fallback to "X" when complex is not a distinct taxon
|
||||
expect_identical(as.character(suppressWarnings(as.mo("Proteus vulgaris complex"))), as.character(suppressWarnings(as.mo("Proteus vulgaris"))))
|
||||
expect_identical(as.character(suppressWarnings(as.mo("Enterobacter cloacae complex"))), as.character(as.mo("Enterobacter cloacae complex")))
|
||||
|
||||
# Issue #288: abbreviated genus with exact species epithet match should win
|
||||
expect_identical(
|
||||
as.character(suppressWarnings(as.mo("S. apiospermum"))),
|
||||
as.character(suppressWarnings(as.mo("Scedosporium apiospermum")))
|
||||
)
|
||||
|
||||
# prevalent MO
|
||||
expect_identical(
|
||||
suppressWarnings(as.character(
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
test_that("test-mo_property.R", {
|
||||
skip_on_cran()
|
||||
|
||||
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
|
||||
expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
|
||||
expect_equal(mo_kingdom("Escherichia coli"), "Pseudomonadati")
|
||||
expect_equal(mo_phylum("Escherichia coli"), "Pseudomonadota")
|
||||
expect_equal(mo_class("Escherichia coli"), "Gammaproteobacteria")
|
||||
expect_equal(mo_order("Escherichia coli"), "Enterobacterales")
|
||||
@@ -71,12 +70,13 @@ test_that("test-mo_property.R", {
|
||||
"Erysipelotrichia",
|
||||
"Ktedonobacteria",
|
||||
"Limnochordia",
|
||||
"Limnocylindria",
|
||||
"Mollicutes",
|
||||
"Negativicutes",
|
||||
"Nitriliruptoria",
|
||||
"Rubrobacteria",
|
||||
"Syntrophomonadia",
|
||||
"Tepidiformia",
|
||||
"Thermaerobacteria",
|
||||
"Thermoflexia",
|
||||
"Thermoleophilia",
|
||||
"Thermolithobacteria"
|
||||
@@ -92,7 +92,7 @@ test_that("test-mo_property.R", {
|
||||
expect_equal(mo_gramstain("Escherichia coli", language = "en"), "Gram-negative")
|
||||
expect_inherits(mo_taxonomy("Escherichia coli"), "list")
|
||||
expect_equal(names(mo_taxonomy("Escherichia coli")), c(
|
||||
"kingdom", "phylum", "class", "order",
|
||||
"domain", "kingdom", "phylum", "class", "order",
|
||||
"family", "genus", "species", "subspecies"
|
||||
))
|
||||
expect_equal(mo_synonyms("Escherichia coli"), NULL)
|
||||
@@ -100,8 +100,8 @@ test_that("test-mo_property.R", {
|
||||
expect_inherits(mo_synonyms(c("Candida albicans", "Escherichia coli")), "list")
|
||||
expect_equal(names(mo_info("Escherichia coli")), c(
|
||||
"mo", "rank",
|
||||
"kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies",
|
||||
"status", "synonyms", "gramstain", "oxygen_tolerance",
|
||||
"domain", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies",
|
||||
"status", "synonyms", "gramstain", "morphology", "oxygen_tolerance",
|
||||
"url", "ref", "snomed", "lpsn", "mycobank", "gbif", "group_members"
|
||||
))
|
||||
expect_inherits(mo_info(c("Escherichia coli", "Staphylococcus aureus")), "list")
|
||||
@@ -115,7 +115,7 @@ test_that("test-mo_property.R", {
|
||||
|
||||
expect_equal(
|
||||
as.character(table(mo_pathogenicity(example_isolates$mo))),
|
||||
c("1911", "66", "1", "22")
|
||||
c("1915", "62", "1", "22")
|
||||
)
|
||||
|
||||
expect_equal(mo_ref("Escherichia coli"), "Castellani et al., 1919")
|
||||
@@ -185,7 +185,7 @@ test_that("test-mo_property.R", {
|
||||
c("Shimwellia blattae", "Escherichia coli")
|
||||
)
|
||||
|
||||
expect_identical(mo_ref("Chlamydia psittaci"), "Garcia-Lopez et al., 2019")
|
||||
expect_identical(mo_ref("Chlamydia psittaci"), "Page, 1968")
|
||||
expect_identical(mo_ref("Chlamydophila psittaci", keep_synonyms = TRUE), "Everett et al., 1999")
|
||||
|
||||
expect_true(112283007 %in% mo_snomed("Escherichia coli")[[1]])
|
||||
|
||||
Reference in New Issue
Block a user