Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vasudeva8 committed Oct 18, 2024
1 parent 993cf42 commit e71227c
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 245 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install cmake wget build-essential
./install_dependencies.sh linux
./install_dependencies.sh
- 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 }} -DSTATIC_BUILD=1 ..
Expand Down Expand Up @@ -67,7 +67,6 @@ jobs:
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost automake
./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 }} ..
Expand Down Expand Up @@ -107,7 +106,6 @@ jobs:
run: |
#brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost 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 }} ..
Expand Down
71 changes: 0 additions & 71 deletions LICENSE_ODB

This file was deleted.

13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ Boost* | \>=1.65 | manual or automatic
If you are using Ubuntu 16, you can prepare all dependencies and compile the Validation Suite with these commands:
```
sudo apt-get install cmake wget build-essential
./install_dependencies.sh linux
./install_dependencies.sh
mkdir build && cd build && cmake -G "Unix Makefiles" -DSTATIC_BUILD=1 ..
make
```

The VCF Validation Suite binaries will be created in the `build/bin` subfolder. Optionally, read below for the explanation of the previous commands.

##### CMake and automatic installation
The automatic install **requires** CMake and wget to be installed before running the script (as zlib require them to be installed). Also, the script will compile some dependencies so a compilation environment is needed. If you are using Ubuntu, you can install all that with the command `sudo apt-get install cmake wget build-essential`. After installing that, use the command `./install_dependencies.sh linux`.
The automatic install **requires** CMake and wget to be installed before running the script (as zlib require them to be installed). Also, the script will compile some dependencies so a compilation environment is needed. If you are using Ubuntu, you can install all that with the command `sudo apt-get install cmake wget build-essential`. After installing that, use the command `./install_dependencies.sh`.

A subfolder named `dependencies` will be created, with all the required libraries copied into it.

Expand Down Expand Up @@ -177,7 +177,7 @@ Boost | \>=1.65 | manual

You can prepare all dependencies and compile the Validation Suite with these commands:
```
brew install cmake boost sqlite3
brew install cmake boost
mkdir build && cd build && cmake -G "Unix Makefiles" ..
make
```
Expand All @@ -188,8 +188,6 @@ The VCF Validation Suite binaries will be created in the `build/bin` subfolder.

The automatic install requires CMake and wget to be installed before running the script (as zlib require them to be installed). In order to set up the environment to compile the dependencies, first you need to run `brew install cmake boost`.

A subfolder named `osx_dependencies` will be created, with all the required libraries copied into it.

#### Compile

In order to create the build scripts, please run `cmake` with your preferred generator. For instance, `mkdir build && cd build && cmake -G "Unix Makefiles" ..` will create Makefiles, and to build the binaries, you will need to run `make`.
Expand Down Expand Up @@ -222,15 +220,12 @@ bootstrap
In order to create the build scripts and compile vcf-validator, please run the following commands from the project root folder:

```
cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" /path/to/CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=1 -G "NMake Makefiles" /path/to/CMakeLists.txt
nmake
```

Binaries will be created in the `bin` subfolder.

In order to run those binaries, you will need to add the `lib/windows_specific` directory to the `PATH`. This will allow the dll files inside that directory to be found.


## Deliverables

The following binaries are be created after successful build:
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,5 @@ artifacts:
- path: bin\vcf_validator.exe
name: vcf_validator_win.exe

- path: bin\vcf_debugulator.exe
name: vcf_debugulator_win.exe

- path: bin\vcf_assembly_checker.exe
name: vcf_assembly_checker_win.exe
58 changes: 8 additions & 50 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ into the programming technical details.

## Build process overview

This is a C++ project that produces 3 binaries: vcf-validator,
vcf-assembly-checker and vcf-debugulator. The build is done with CMake (file
This is a C++ project that produces 2 binaries: vcf-validator and
vcf-assembly-checker. The build is done with CMake (file
[CMakeLists.txt](../CMakeLists.txt)) for Linux, Windows and macOS. There are
scripts to help installing the dependencies
([install_dependencies.sh](../install_dependencies.sh)) for Linux and macOS, and
([install_dependencies.sh](../install_dependencies.sh)) for Linux and
[install_dependencies.bat](../install_dependencies.bat) for Windows).

We also use TravisCI ([.travis.yml](../.travis.yml)) and AppVeyor
Expand Down Expand Up @@ -79,11 +79,7 @@ VCF (including the metadata section), and `Error` classes (related among
themselves by hierarchical inheritance) are used to represent different types of
possible errors.

Based on those `Error`s, the program can produce human-readable reports and a
machine-readable report that the VCF Debugulator can read to fix some basic
errors. Later, this machine-readable report and Debugulator support were removed
to make build, packaging and installation simpler.

Based on those `Error`s, the program can produce human-readable reports.
The level of checks can be configured, from doing just a quick syntax check, to
raise warnings of suspicious details.

Expand Down Expand Up @@ -179,25 +175,9 @@ of polymorphism when we catch those exceptions in vcf.ragel (again, search for

If the policy to report the errors is in use, the parser has the list of
report writers the user requested. These can be any combination of
[simple report](../inc/vcf/record.hpp), [summary
report](../inc/vcf/summary_report_writer.hpp), and [ODB
report](../inc/vcf/odb_report.hpp).

ODB is a library for Object Relational Mapping. In other words, we use it to
serialize the class data of errors, so that the debugulator can deserialize
the error details directly into variables and classes without parsing.

We use ODB mostly in [inc/vcf/Error.hpp](../inc/vcf/error.hpp), through some
pragmas. The way ODB works is parsing the C++ classes that have ODB pragmas and
outputs C++ code that serializes the class instance information into a SQL
database. We chose Sqlite as database backend, which means that the DB reports
can actually be opened with a Sqlite client.

The debugulator had very minimal functionality and limited usage. To reduce the
build, packaging and installation complexities, a few of the dependencies were
removed and ODB is one among them. Along with ODB, debugulator was also removed
from build as it is fully dependent on ODB. The sources and part of
documentation retained for future reference.
[simple report](../inc/vcf/record.hpp) and
[summaryreport](../inc/vcf/summary_report_writer.hpp).


### VCF assembly checker

Expand All @@ -222,31 +202,9 @@ There's also limited support to use assembly reports
and translate between synonym contig names/accessions in case the nomenclature
in the VCF and in the FASTA don't match.

### VCF Debugulator

At the beginning of the project we expected there would be interesting
situations were we could use the ODB report to fix automatically wrong VCFs.
Sadly, it turned out that there's not much an automated program can do, really.

The fixes are implemented in [inc/vcf/fixer.hpp](../inc/vcf/fixer.hpp) and
[src/vcf/fixer.cpp](../src/vcf/fixer.cpp), and basically consist on removing
duplicate variants and dropping entire fields that are non-conforming with the
spec.

The debugulator had very minimal functionality and limited usage. To reduce the
build, packaging and installation complexities, a few of the dependencies were
removed and ODB is one among them. Along with ODB, debugulator was also removed
from build as it is fully dependent on ODB. The sources and part of
documentation retained for future reference.

## Testing

Testing is performed with [Catch](https://github.com/catchorg/Catch2) in the
[`test/`](../test/) folder. The folders test/vcf/, test/fasta/ and
test/assembly_report/ contain test source code, and test/input_files contain a
medium-sized set of correct and wrong VCFs that are used in the tests.

## ODB dependency

ODB was in use earlier and it has now been removed. Debugulator was also removed
along with it as it depends on ODB.
medium-sized set of correct and wrong VCFs that are used in the tests.
Binary file modified docs/img/VCF-validator-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e71227c

Please sign in to comment.