Skip to content

Commit a03e1e7

Browse files
ahmigLlunabp
andcommitted
fix: force reading VCF fields as character
Co-authored-by: Lluna Bellot <llunabellotpastor@gmail.com>
1 parent 8980050 commit a03e1e7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

workflow/scripts/format_vcf_fields_longer.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ filter.exclude <- lapply(snakemake@params$filter_exclude, empty.to.na)
2727

2828
# Process input table
2929
log_info("Applying filters and writing results")
30-
read_tsv(snakemake@input$tsv) %>%
30+
read_tsv(
31+
snakemake@input$tsv,
32+
col_types = cols(
33+
POS = col_integer(),
34+
.default = col_character()
35+
)
36+
) %>%
3137

3238
# Separate <sep>-delimited "...[*]..." columns (e.g. ANN[*].EFFECT)
3339
separate_rows(
3440
contains("[*]"),
3541
sep = snakemake@params$sep,
36-
convert = TRUE
42+
convert = FALSE
3743
) %>%
3844

3945
# Rename "...[*]..." columns using the provided lookup via Snakemake config

0 commit comments

Comments
 (0)