MSKCC-Epi-Bio / gnomeR

Package to wrangle and visualize genomic data in R
https://mskcc-epi-bio.github.io/gnomeR/
Other
26 stars 16 forks source link

`purrr::when()` will be depreciated #203

Closed michaelcurry1123 closed 1 year ago

michaelcurry1123 commented 1 year ago

purrr::when() will be depreciated, we will need to update all functions that have purrr::when() to something else.... eventually

michaelcurry1123 commented 1 year ago

ctrl + shift + F will open a find command that will look for a text string in all files in a directory, easy way to find purrr::when

hfuchs5 commented 1 year ago

To ask in meeting:

"data.frame" = {

       specify_panel %>%
         purrr::when(
           any(is.na(specify_panel$panel_id)) ~ cli::cli_abort("Some {.field panel_id} values in {.code sample_panel_pair} df are {.code NA}. Please explicitely indicate {.code no} for those samples instead if you wish to skip annotating these."),
           length(setdiff(c(specify_panel$panel_id), c(gene_panels$gene_panel, "no"))) > 0 ~
                       cli::cli_abort("Panels not known: {.val {setdiff(c(specify_panel$panel_id), c(gene_panels$gene_panel, 'no'))}}. See {.code  gnomeR::gene_panels} for known panels, or skip annotation with {.code specify_panel = 'no'} or indicating {.code 'no'} for those samples in {.field panel_id} column of sample_id-panel_id pair data frame"),
                     TRUE ~ .)}

}

karissawhiting commented 1 year ago

Updated #238