fix bug wrong ploidy error: assumed GT is always present
@@ -69,6 +69,8 @@ namespace ebi
void ValidateOptionalPolicy::check_body_entry_ploidy(ParsingState & state, Record & record)
{
+ bool format_column_contains_gt = record.format.size() >= 1 and record.format[0] == "GT";
+ if (format_column_contains_gt) {
// All samples should have the same ploidy
size_t ploidy = 0;
size_t i = 1;
@@ -102,6 +104,7 @@ namespace ebi
throw new SamplesFieldBodyError{state.n_lines, ss.str(), "GT", static_cast<long>(provided_ploidy)};
}
}
+ }
void ValidateOptionalPolicy::check_body_entry_position_zero(ParsingState & state, Record & record) const
{
