Skip to content

Commit

Permalink
Update vocs
Browse files Browse the repository at this point in the history
  • Loading branch information
saketkc committed Jan 14, 2024
1 parent ecddcd5 commit 5dd18ce
Show file tree
Hide file tree
Showing 108 changed files with 1,818 additions and 2,908 deletions.
21 changes: 14 additions & 7 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ GetVOCs <- function() {
beta = beta_voc,
gamma = gamma_voc,
delta = delta_voc,
omicron = omicron_voc,
B.1 = c("B.1")
omicron = omicron_voc
# B.1 = c("B.1")
# lambda = lambda_voc,
# mu = mu_voc,
# epsilon = epsilon_voc,
Expand Down Expand Up @@ -330,16 +330,23 @@ CollapseLineageToVOCs <- function(variant_df, vocs = GetVOCs(), custom_voc_mappi
for (name in names(vocs)) {
variant_df <- variant_df %>% mutate(lineage_collapsed = case_when(
# pangolin_lineage %in% vocs[[!!name]] ~ str_to_title(!!name),
grepl(pattern = vocs[[!!name]], x = pangolin_lineage) ~ str_to_title(!!name),
grepl(pattern = paste(vocs[[!!name]], collapse = "|"), x = pangolin_lineage) ~ str_to_title(!!name),
TRUE ~ lineage_collapsed
))
}
if (!is.null(custom_voc_mapping)) {
for (name in names(custom_voc_mapping)) {
variant_df <- variant_df %>% mutate(lineage_collapsed = case_when(
grepl(pattern = !!name, x = pangolin_lineage) ~ custom_voc_mapping[[!!name]],
TRUE ~ lineage_collapsed
))
if (grepl(pattern = "\\*", x = name)) {
variant_df <- variant_df %>% mutate(lineage_collapsed = case_when(
grepl(pattern = !!name, x = pangolin_lineage) ~ custom_voc_mapping[[!!name]],
TRUE ~ lineage_collapsed
))
} else {
variant_df <- variant_df %>% mutate(lineage_collapsed = case_when(
pangolin_lineage %in% c(name) ~ custom_voc_mapping[[!!name]],
TRUE ~ lineage_collapsed
))
}
}
}
if (summarize) {
Expand Down
34 changes: 3 additions & 31 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 3 additions & 31 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/articles/Brazil_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/Brazil_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/Brazil_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/Brazil_animated_2024.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Germany_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Germany_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/Germany_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/Germany_animated_2024.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2021.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2022.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_2023.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/IN_animated_latest.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5dd18ce

Please sign in to comment.