Methods that underpin interacting with genome data.
This project is a C++ library with optional Python bindings.
The Python bindings provide a Python module called asmc_data_module.
Get the source, together with the vcpkg submodule (for installing dependencies) and the pybind11 submodule (for Python bindings):
git clone --recurse-submodules https://github.com/PalamaraLab/DataModule.git
cd DataModuleThe C++ code requires the following dependencies:
- eigen3 (linear algebra)
- {fmt} (text formatting)
- range-v3 (pre C++20 ranges support)
- zlib (compression)
The recommended way to install dependencies is via the built-in vcpkg CMake integration. Assuming you have checked out the vcpkg submodule, the dependencies will be automatically installed when you run the CMake configure step below.
If you want to use this project as a Python module, you only need to run:
pip install .This will work even if you have not installed the dependencies, but if you are a developer who may be installing the Python bindings multiple times, you should install the dependencies once, first, for efficiency.
This project uses CMake.
Create a build directory:
mkdir build
cd buildConfigure using the vcpkg toolchain file:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmakeBuild the DataModule library:
cmake --build . --parallel 4 --target data_module_libBuild the and run the unit tests:
cmake --build . --parallel 4 --target unit_tests
ctest --output-on-failureConfigure with coverage enabled, using g++ or clang++:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
cmake --build . --parallel 2 --target unit_tests
ctest -j2 --output-on-failure
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/vcpkg/*' '*/test/*' --output-file coverage.info
lcov --list coverage.infoThis project is configured to work with clang tidy and cppcheck.
Enable the relevant option and compile with clang++.
For clang tidy:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CLANG_TIDY=ON
cmake --build . --parallel 2 --target data_module_libFor cppcheck:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CPPCHECK=ON
cmake --build . --parallel 2 --target data_module_libThis project is configured to work with various LLVM sanitisers.
Enable the relevant option, compile with clang++, and run the unit tests.
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITISER_{{{SANITISER}}}=ON
cmake --build . --parallel 2 --target unit_tests
./test/unit_testswhere {{{SANITISER}}} is one of:
This project is currently released under the GNU General Public License Version 3.