Skip to content

Commit bbca5e4

Browse files
committed
fix: ensure missing values in VCF fields are properly encoded
Fixes an issue where missing HGVS_P values were not properly coalesced to HGVS_C
1 parent 395696c commit bbca5e4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

workflow/scripts/format_vcf_fields_longer.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ read_tsv(
4545
# Rename "...[*]..." columns using the provided lookup via Snakemake config
4646
rename(all_of(unlist(snakemake@params$colnames_mapping))) %>%
4747

48+
# Ensure missing values are properly encoded
49+
mutate(across(where(is.character), ~ na_if(.x, "NA"))) %>%
50+
4851
# Separate &-delimited error column (more than one error/warning/info message per row is possible)
4952
mutate(split_errors = strsplit(ERRORS, "&")) %>%
5053
# Keep rows with none of the excluded ERRORS terms, if any

0 commit comments

Comments
 (0)