From 2026d4796cef5514fa7fbfb169db47e8df3b339c Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 13 Jul 2023 16:45:53 +0100 Subject: [PATCH 1/7] allow missing value to not respect cardinality --- src/vcf/record.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vcf/record.cpp b/src/vcf/record.cpp index 675311aef..3e79ed67c 100644 --- a/src/vcf/record.cpp +++ b/src/vcf/record.cpp @@ -698,6 +698,7 @@ namespace ebi raise(std::make_shared(line, " meta specification Number=" + number + " is not one of [A, R, G, ., ]")); } + if (values.from == MISSING_VALUE) { return; } // No need to check missing data bool number_matches = true; if (expected_cardinality > 0) { From 9e8585216ada3e1560fac341e80ccda0425bb8ca Mon Sep 17 00:00:00 2001 From: tcezard Date: Thu, 13 Jul 2023 21:27:42 +0100 Subject: [PATCH 2/7] allow missing value to not respect cardinality --- 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 3e79ed67c..36fa8208d 100644 --- a/src/vcf/record.cpp +++ b/src/vcf/record.cpp @@ -698,7 +698,7 @@ namespace ebi raise(std::make_shared(line, " meta specification Number=" + number + " is not one of [A, R, G, ., ]")); } - if (values.from == MISSING_VALUE) { return; } // No need to check missing data + if (values.front() == MISSING_VALUE) { return; } // No need to check missing data bool number_matches = true; if (expected_cardinality > 0) { From 901db08861b5d5158993c868ca1721b294d250eb Mon Sep 17 00:00:00 2001 From: tcezard Date: Fri, 14 Jul 2023 00:22:34 +0100 Subject: [PATCH 3/7] Fix version of ubuntu to 20.04 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 282a39632..63a2509bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: ### Linux build linux_build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: config: From fd8c88a705201676824d91d857bae541b89d656e Mon Sep 17 00:00:00 2001 From: sundarvenkata-EBI Date: Sun, 16 Jul 2023 08:53:58 +0100 Subject: [PATCH 4/7] Guard against empty vector --- src/vcf/record.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vcf/record.cpp b/src/vcf/record.cpp index 36fa8208d..dd185f047 100644 --- a/src/vcf/record.cpp +++ b/src/vcf/record.cpp @@ -698,7 +698,9 @@ namespace ebi raise(std::make_shared(line, " meta specification Number=" + number + " is not one of [A, R, G, ., ]")); } - if (values.front() == MISSING_VALUE) { return; } // No need to check missing data + if(!values.empty()) { + if (values.front() == MISSING_VALUE) { return; } // No need to check missing data + } bool number_matches = true; if (expected_cardinality > 0) { From dee4c80ac817839cb1f5c6a026ca807fbb4e65a0 Mon Sep 17 00:00:00 2001 From: tcezard Date: Mon, 17 Jul 2023 10:44:11 +0100 Subject: [PATCH 5/7] Add line in valid VCF to test missing data in the Samples' columns --- test/input_files/v4.1/passed/passed_body_samples.vcf | 1 + test/input_files/v4.2/passed/passed_body_samples.vcf | 1 + test/input_files/v4.3/passed/passed_body_samples.vcf | 2 ++ 3 files changed, 4 insertions(+) diff --git a/test/input_files/v4.1/passed/passed_body_samples.vcf b/test/input_files/v4.1/passed/passed_body_samples.vcf index e54023271..f86d45044 100644 --- a/test/input_files/v4.1/passed/passed_body_samples.vcf +++ b/test/input_files/v4.1/passed/passed_body_samples.vcf @@ -9,3 +9,4 @@ 1 300 rs180734498 C T 100 PASS AC=4 GT:MY 1/0:A 0|1:A,B,C 1 400 rs180734498 C T,A 100 PASS AC=4,6 GT:CU 1/2:1,5 0|1:2,0 1 500 rs180734498 C T 100 PASS AC=4 DP 1 4 +1 700 rs180734498 C T 100 PASS AC=4 GT:GL 0|0:.,.,. 0|1:. diff --git a/test/input_files/v4.2/passed/passed_body_samples.vcf b/test/input_files/v4.2/passed/passed_body_samples.vcf index e94ebc541..2ea56cc01 100644 --- a/test/input_files/v4.2/passed/passed_body_samples.vcf +++ b/test/input_files/v4.2/passed/passed_body_samples.vcf @@ -11,3 +11,4 @@ 1 400 rs180734498 C T,A 100 PASS AC=4,5 GT:CU 1/2:1,5 0|1:2,0 1 500 rs180734498 C T,G 100 PASS AC=4,6 GT:CU2 1/2:-0.13,-0.58,-3.62 0|1:-2.45,-0.00,-5.00 1 600 rs180734498 C T 100 PASS AC=4 DP 1 4 +1 700 rs180734498 C T 100 PASS AC=4 GT:GL 0|0:.,.,. 0|1:. diff --git a/test/input_files/v4.3/passed/passed_body_samples.vcf b/test/input_files/v4.3/passed/passed_body_samples.vcf index 6bf9bedc0..49c77c9d6 100644 --- a/test/input_files/v4.3/passed/passed_body_samples.vcf +++ b/test/input_files/v4.3/passed/passed_body_samples.vcf @@ -11,3 +11,5 @@ 1 400 rs180734498 C T,A 100 PASS AC=4,5 GT:CU 1/2:1,5 0|1:2,0 1 500 rs180734498 C T,G 100 PASS AC=4,6 GT:CU2 1/2:-0.13,-0.58,-3.62 0|1:-2.45,-0.00,-5.00 1 600 rs180734498 C T 100 PASS AC=4 DP 1 4 +1 700 rs180734498 C T 100 PASS AC=4 GT:GL 0|0:.,.,. 0|1:. + From a2d8b5f58cbb1f91fa624789a4efefb14e1ff173 Mon Sep 17 00:00:00 2001 From: tcezard Date: Mon, 17 Jul 2023 10:48:07 +0100 Subject: [PATCH 6/7] Update test to osx version currently supported byt GitHub Actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63a2509bc..97804b7ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: ### Mac OS build macos_build: - runs-on: macos-10.15 + runs-on: macos-11 strategy: matrix: config: From 72f786cf766984020125a8ff22e71bf1f3e0e122 Mon Sep 17 00:00:00 2001 From: tcezard Date: Tue, 18 Jul 2023 11:47:29 +0100 Subject: [PATCH 7/7] Remove CI support for MacOS until we can figure out why the build is failing --- .github/workflows/build.yml | 92 ++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97804b7ca..6320d8ce1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,57 +60,57 @@ jobs: ### Mac OS build - macos_build: - runs-on: macos-11 - strategy: - matrix: - config: - - {cc: "gcc", cxx: "g++"} - - {cc: "clang", cxx: "clang++"} - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - brew update - brew install boost sqlite3 - ./install_dependencies.sh osx - - name: Compile and test - run: | - mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} .. - export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib - make -j2 - cd .. && ./build/bin/test_validation_suite - - name: Rename release files - if: ${{ matrix.config.cc == 'clang' }} - run: | - mv build/bin/vcf_validator vcf_validator_macos - mv build/bin/vcf_debugulator vcf_debugulator_macos - mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos - - name: Upload vcf-validator - uses: actions/upload-artifact@v3 - if: ${{ matrix.config.cc == 'clang' }} - with: - name: vcf_validator_macos - path: vcf_validator_macos - - name: Upload vcf-debugulator - uses: actions/upload-artifact@v3 - if: ${{ matrix.config.cc == 'clang' }} - with: - name: vcf_debugulator_macos - path: vcf_debugulator_macos - - name: Upload vcf-assembly-checker - uses: actions/upload-artifact@v3 - if: ${{ matrix.config.cc == 'clang' }} - with: - name: vcf_assembly_checker_macos - path: vcf_assembly_checker_macos +# macos_build: +# runs-on: macos-11 +# strategy: +# matrix: +# config: +# - {cc: "gcc", cxx: "g++"} +# - {cc: "clang", cxx: "clang++"} +# +# steps: +# - uses: actions/checkout@v2 +# - name: Install dependencies +# run: | +# brew update +# brew install boost sqlite3 +# ./install_dependencies.sh osx +# - name: Compile and test +# run: | +# mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} .. +# export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib +# make -j2 +# cd .. && ./build/bin/test_validation_suite +# - name: Rename release files +# if: ${{ matrix.config.cc == 'clang' }} +# run: | +# mv build/bin/vcf_validator vcf_validator_macos +# mv build/bin/vcf_debugulator vcf_debugulator_macos +# mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos +# - name: Upload vcf-validator +# uses: actions/upload-artifact@v3 +# if: ${{ matrix.config.cc == 'clang' }} +# with: +# name: vcf_validator_macos +# path: vcf_validator_macos +# - name: Upload vcf-debugulator +# uses: actions/upload-artifact@v3 +# if: ${{ matrix.config.cc == 'clang' }} +# with: +# name: vcf_debugulator_macos +# path: vcf_debugulator_macos +# - name: Upload vcf-assembly-checker +# uses: actions/upload-artifact@v3 +# if: ${{ matrix.config.cc == 'clang' }} +# with: +# name: vcf_assembly_checker_macos +# path: vcf_assembly_checker_macos ### Release job (tags only) create_release: if: startsWith(github.ref, 'refs/tags/') - needs: [ linux_build, macos_build ] + needs: [ linux_build ] runs-on: ubuntu-latest steps: - name: Download artifacts