gatb.core-API-0.0.0
Instructions to compile GATB-Core

Compile the library (and other artifacts)

The gatb::core library is generated by the cmake tool.

In the following, we will call GATB the main directory of the gatb core project (ie. the root directory of the source archive).

You have then to do the following:

cd <some_directory>
git clone https://github.com/GATB/gatb-core.git
cd gatb-core/gatb-core
mkdir build ; cd build ; cmake ..
make -j8 (adjust -j8 to the number of cores of your system)

You can force compilation in debug mode by calling cmake in a specific way:

cmake -D CMAKE_BUILD_TYPE=Debug ..

Several artifacts are generated:

  • the gatb core library is available in the generated build/lib directory
  • the gatb core binaries are available in the generated build/bin directory

you can type 'make help' to know all the available targets.

If CppUnit is installed, a unit tests binary should be generated; you can launch it with

cd <some_directory>/gatb-core/gatb-core/build/bin
export CPPUNIT_VERBOSE=1
# Launch the full test suite
./gatb-core-cppunit all <gatb-core-home>/gatb-core/test/db

You can use the exit status code of the command to know the success status (0 for success).

Use

./gatb-core-cppunit -h

to get more information on how to use this testing program.

Note that one may set the environment variable CPPUNIT_VERBOSE to 1 to known which tests pass.

By default, gatb::core supports kmer sizes up to 128. In fact, it has 4 different implementations of kmers, one for KSIZE_1=32, KSIZE_2=64, KSIZE_3=96 and KSIZE_4=128. If you need bigger kmers sizes, you can compile this way:

cmake -Dk1=32 -Dk2=64 -Dk3=96 -Dk4=256 ..

Compile the code snippets

A directory named examples holds some snippets that show how to use services provided by the library.

In order to compile them, you will first need to compile the full library (see above).

A simple way to generate the snippets is to type:

cmake -DGATB_CORE_INCLUDE_EXAMPLES=True -DCMAKE_BUILD_TYPE=Debug .. [1]
make examples

[1] some code snippets use assert(), so it is required to compile in Debug mode.

You can also compile a single snippet using its name, such as:

make bank1

Then, you can have a look at the header of each snippet source file to review how to use them. You can also have a look at this script we used on a Jenkins platform to automatically run and test all these snippets; in that script, you'll see how they are started (i.e. what is the command-line to use).

Some documentation about these code snippets is also available here.

Use Eclipse c++ IDE or Xcode IDE to work with GATB-Core

If you are interested in using an IDE to develop c++ source codes relying on the GATB-Core library, we have written this manual to explain how to setup Eclipse c++ framework or Xcode one:

https://gatb.inria.fr/use-eclipse-to-develop-gatb-core-softwares/ https://gatb.inria.fr/use-xcode-to-develop-gatb-core-softwares/

You also have the opportunity to easily work on code snippets directly from Eclipse/Xcode. Please, refer to the above links.