2023-02-12 17:10:48 +01:00
|
|
|
snomed2 <- microorganisms %>%
|
|
|
|
filter(mo %in% c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY")) %>%
|
2023-02-06 11:57:22 +01:00
|
|
|
pull(snomed)
|
|
|
|
|
|
|
|
new_typhi <- microorganisms %>%
|
2023-02-12 17:10:48 +01:00
|
|
|
filter(mo == "B_SLMNL_THSS") %>%
|
|
|
|
slice(c(1, 1, 1)) %>%
|
|
|
|
mutate(
|
|
|
|
mo = c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY"),
|
|
|
|
fullname = c("Salmonella Typhi", "Salmonella Typhimurium", "Salmonella Paratyphi"),
|
|
|
|
subspecies = c("Typhi", "Typhimurium", "Paratyphi"),
|
|
|
|
snomed = snomed2
|
|
|
|
)
|
2023-02-06 11:57:22 +01:00
|
|
|
|
|
|
|
new_groupa <- microorganisms %>%
|
2023-02-12 17:10:48 +01:00
|
|
|
filter(mo == "B_SLMNL_GRPB") %>%
|
|
|
|
mutate(
|
|
|
|
mo = "B_SLMNL_GRPA",
|
|
|
|
fullname = gsub("roup B", "roup A", fullname),
|
|
|
|
species = gsub("roup B", "roup A", species)
|
|
|
|
)
|
2023-02-06 11:57:22 +01:00
|
|
|
|
|
|
|
microorganisms$mo <- as.character(microorganisms$mo)
|
|
|
|
|
|
|
|
microorganisms <- microorganisms %>%
|
2023-02-12 17:10:48 +01:00
|
|
|
filter(!mo %in% c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY")) %>%
|
|
|
|
bind_rows(new_typhi, new_groupa) %>%
|
2023-02-06 11:57:22 +01:00
|
|
|
arrange(fullname)
|
|
|
|
|
|
|
|
microorganisms$lpsn_parent[which(microorganisms$genus == "Salmonella" & microorganisms$rank == "species")] <- "516547"
|
|
|
|
microorganisms$gbif_parent[which(microorganisms$genus == "Salmonella" & microorganisms$rank == "species")] <- "3221815"
|
|
|
|
|
|
|
|
class(microorganisms$mo) <- c("mo", "character")
|