Open karissawhiting opened 5 months ago
[ ] Perhaps for checking variant class allowed levels?
# Clean Variant Class ----------------------------------------------------- levels_in_data <- names(table(sv$structural_variant_type)) allowed_chr_levels <- c("DELETION", "TRANSLOCATION", "DUPLICATION", "INSERTION", "INVERSION", "FUSION", "UNKNOWN") all_allowed <- c(allowed_chr_levels, names(allowed_chr_levels)) not_allowed <- levels_in_data[!levels_in_data %in% all_allowed] if(length(not_allowed) > 0) { cli::cli_abort(c("Unknown values in {.field variant_class} field: {.val {not_allowed}}", "Must be one of the following: {.val {all_allowed}}")) }
- [ ] consequence map function/checking should be separated out
[ ] Perhaps for checking variant class allowed levels?