Skip to content

Commit

Permalink
GA4GHTT-270: Merge changes from master (241, 247, 248) and porting 24…
Browse files Browse the repository at this point in the history
…8 for 4.4 (#251)

* update for CNV:TR and optional leading phasing info

* Squashed changes on Allow synonyms to be the same value if they are on the same line

* update to generate mac arm binary

* Update install_dependencies.sh for c-ares

c-ares download link changed to GitHub

* Squashed changes on Allow colon in chromosome names

* Bump version to 0.9.7

* ported pr248 for vcf4.4 - Allow colon in chromosome names

---------

Co-authored-by: tcezard <[email protected]>
  • Loading branch information
vasudeva8 and tcezard authored Jul 17, 2024
1 parent 3f063cd commit 925f3af
Show file tree
Hide file tree
Showing 46 changed files with 6,278 additions and 3,649 deletions.
71 changes: 59 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
path: vcf_assembly_checker_linux


### Mac OS build
macos_build:
### Mac OS build intel
macos_build_intel:
runs-on: macos-12
strategy:
matrix:
Expand All @@ -84,33 +84,80 @@ jobs:
- 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
mv build/bin/vcf_validator vcf_validator_macos_x64
mv build/bin/vcf_debugulator vcf_debugulator_macos_x64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_x64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos
path: vcf_validator_macos
name: vcf_validator_macos_x64
path: vcf_validator_macos_x64
- name: Upload vcf-debugulator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_debugulator_macos
path: vcf_debugulator_macos
name: vcf_debugulator_macos_x64
path: vcf_debugulator_macos_x64
- 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
name: vcf_assembly_checker_macos_x64
path: vcf_assembly_checker_macos_x64

### Mac OS build arm
macos_build_arm:
runs-on: macos-14
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost sqlite3 automake libtool
./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}:/opt/homebrew/opt/icu4c/lib:/opt/homebrew/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_arm64
mv build/bin/vcf_debugulator vcf_debugulator_macos_arm64
mv build/bin/vcf_assembly_checker vcf_assembly_checker_macos_arm64
- name: Upload vcf-validator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_validator_macos_arm64
path: vcf_validator_macos_arm64
- name: Upload vcf-debugulator
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_debugulator_macos_arm64
path: vcf_debugulator_macos_arm64
- name: Upload vcf-assembly-checker
uses: actions/upload-artifact@v3
if: ${{ matrix.config.cc == 'clang' }}
with:
name: vcf_assembly_checker_macos_arm64
path: vcf_assembly_checker_macos_arm64


### Release job (tags only)
create_release:
if: startsWith(github.ref, 'refs/tags/')
needs: [ linux_build, macos_build ]
needs: [ linux_build, macos_build_intel, macos_build_arm ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project (vcf-validator CXX C)

set (vcf-validator_VERSION_MAJOR 0)
set (vcf-validator_VERSION_MINOR 9)
set (vcf-validator_VERSION_PATCH 6)
set (vcf-validator_VERSION_PATCH 7)

configure_file (
"${PROJECT_SOURCE_DIR}/inc/cmake_config.hpp.in"
Expand Down
6 changes: 5 additions & 1 deletion inc/assembly_report/assembly_report.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ namespace ebi

void add_synonym(std::string synonym)
{
synonyms.push_back(synonym);
// Only add the synonym if there isn't one already
if (std::find(synonyms.begin(), synonyms.end(), synonym) == synonyms.end())
{
synonyms.push_back(synonym);
}
}

private:
Expand Down
2 changes: 1 addition & 1 deletion inc/vcf/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ namespace ebi
using BodySectionError::BodySectionError;
ChromosomeBodyError() : ChromosomeBodyError{0} {}
ChromosomeBodyError(size_t line) : ChromosomeBodyError{line,
"Chromosome is not a string without colons or whitespaces, optionally wrapped with angle brackets (<>)"} { }
"Chromosome is not a string without whitespaces, optionally wrapped with angle brackets (<>)"} { }
virtual ~ChromosomeBodyError() override { }
virtual void apply_visitor(ErrorVisitor &visitor) override { visitor.visit(*this); }
};
Expand Down
9 changes: 1 addition & 8 deletions inc/vcf/file_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,19 +430,12 @@ namespace ebi
void set_types();

/**
* Checks that chromosome does not contain colons or white-spaces
* Checks that chromosome does not contain white-spaces
*
* @throw ChromosomeBodyError
*/
void check_chromosome() const;

/**
* Checks that chromosome does not contain any colons
*
* @throw ChromosomeBodyError
*/
void check_chromosome_no_colons() const;

/**
* Checks that chromosome does not contain any white-spaces
*
Expand Down
Loading

0 comments on commit 925f3af

Please sign in to comment.