From d0d5db6dc5231acd321cac1b76e4b2f6256a3188 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Tue, 27 Mar 2018 15:55:33 -0400 Subject: [PATCH 1/2] Allow AF Info field to contain missing value. --- src/vcf/record.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vcf/record.cpp b/src/vcf/record.cpp index 6a4ab845f..1a8e843e8 100644 --- a/src/vcf/record.cpp +++ b/src/vcf/record.cpp @@ -375,6 +375,7 @@ namespace ebi } } else if (field_key == AF) { for (auto & value : values) { + if (value == MISSING_VALUE) { continue; } if (std::stold(value) < 0 || std::stold(value) > 1) { throw new InfoBodyError{line, "INFO AF value does not lie in the interval [0,1]", "AA=" + field_value, ErrorFix::IRRECOVERABLE_VALUE, field_key}; From bc5b05dbc78110df366b9ddea00a20a686fa36fd Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Tue, 27 Mar 2018 15:58:13 -0400 Subject: [PATCH 2/2] Fix for text report AF error. --- src/vcf/record.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcf/record.cpp b/src/vcf/record.cpp index 1a8e843e8..820f1facd 100644 --- a/src/vcf/record.cpp +++ b/src/vcf/record.cpp @@ -377,7 +377,7 @@ namespace ebi for (auto & value : values) { if (value == MISSING_VALUE) { continue; } if (std::stold(value) < 0 || std::stold(value) > 1) { - throw new InfoBodyError{line, "INFO AF value does not lie in the interval [0,1]", "AA=" + field_value, + throw new InfoBodyError{line, "INFO AF value does not lie in the interval [0,1]", "AF=" + field_value, ErrorFix::IRRECOVERABLE_VALUE, field_key}; } }