UW-GAC / wgsaparsr

Code for parsing TOPMED variant annotation files produced by the WGSA annotation tool.
Other
5 stars 3 forks source link

validate_config is too aggressive for pivotChar2 #115

Closed bheavner closed 5 years ago

bheavner commented 5 years ago

when trying to parse with config at /projects/topmed/variant_annotation/freeze_8/database/v1/build/parsing_code/20190701_fr_8_config_v1.tsv I get this error:

Error in validate_config(raw_config) : 
  all pivotChar2 values must be the same within a pivotGroup

Checking with:

raw_config <- readr::read_tsv(config_path, col_names = TRUE,  comment = "#", col_types = readr::cols())
raw_config %>% group_by(pivotGroup, pivotChar2) %>% select(field, pivotGroup, pivotChar, pivotChar2) %>% View()

it looks like the error arises because there are pivotChar2 values of both NA and ;, which should be okay. The validation should instead check that all non-NA pivotchar2 fields have the same parseGroup.