Skip to content

Commit

Permalink
Merge pull request #224 from tcezard/valid_missing_data
Browse files Browse the repository at this point in the history
EVA-3338 - Missing data is valid even if multiple values are expected
  • Loading branch information
tcezard authored Jul 18, 2023
2 parents 3e1bd9b + 72f786c commit 6807ed3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 47 deletions.
94 changes: 47 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

### Linux build
linux_build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
config:
Expand Down Expand Up @@ -60,57 +60,57 @@ jobs:


### Mac OS build
macos_build:
runs-on: macos-10.15
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
Expand Down
3 changes: 3 additions & 0 deletions src/vcf/record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,9 @@ namespace ebi
raise(std::make_shared<Error>(line, " meta specification Number=" + number
+ " is not one of [A, R, G, ., <non-negative number>]"));
}
if(!values.empty()) {
if (values.front() == MISSING_VALUE) { return; } // No need to check missing data
}

bool number_matches = true;
if (expected_cardinality > 0) {
Expand Down
1 change: 1 addition & 0 deletions test/input_files/v4.1/passed/passed_body_samples.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -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:.
1 change: 1 addition & 0 deletions test/input_files/v4.2/passed/passed_body_samples.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -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:.
2 changes: 2 additions & 0 deletions test/input_files/v4.3/passed/passed_body_samples.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -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:.

0 comments on commit 6807ed3

Please sign in to comment.