Skip to content

Data module and utilities that will underpin other software from the Palamara Lab

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

PalamaraLab/DataModule

Repository files navigation

Unit tests: Windows Unit tests: Ubuntu Unit tests: macOS

Python 3.6-3.9 on Linux

Static analysis checks Sanitiser checks

Documentation codecov

Data Module

Methods that underpin interacting with genome data.

⚠️ this is a work in progress, and is not yet fully featured ⚠️

Quickstart

This project is a C++ library with optional Python bindings. The Python bindings provide a Python module called asmc_data_module.

Obtaining the source code

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 DataModule

Installing dependencies

The C++ code requires the following dependencies:

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.

Installing the Python module

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.

Configuring and compiling the C++ project

This project uses CMake.

Create a build directory:

mkdir build
cd build

Configure using the vcpkg toolchain file:

cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake

Build the DataModule library:

cmake --build . --parallel 4 --target data_module_lib

Build the and run the unit tests:

cmake --build . --parallel 4 --target unit_tests
ctest --output-on-failure

Extra tools

Coverage

Configure 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.info

Static analysis

This 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_lib

For cppcheck:

cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CPPCHECK=ON
cmake --build . --parallel 2 --target data_module_lib

Sanitisers

This 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_tests

where {{{SANITISER}}} is one of:

License

This project is currently released under the GNU General Public License Version 3.

About

Data module and utilities that will underpin other software from the Palamara Lab

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Packages

No packages published