A variation graph implementation that takes GFA as input.
- Configurable Parsing: Easily toggle the inclusion of vertex labels, references, and more.
- Minimal Graph: Optimize performance by retrieving only essential data.
- GFA Version Support:
- The GFA format represents a superset of a variation graph. Therefore, liteseq does not support every feature in the GFA specification.
- Sequence IDs in the GFA must be numerical. Non-numeric IDs are not supported and may result in parsing errors.
To ensure that we parse only the essential subset of GFA data, liteseq uses a
gfa_config struct to determine which graph properties to read from the GFA file.
The fields of the gfa_config struct are described in the table below.
| Field | Type | Description |
|---|---|---|
gfa_file_path |
char * |
The path to the GFA file to be parsed. Ensure the file path is valid. |
inc_vtx_labels |
bool |
If set to true, vertex labels will be read. |
inc_refs |
bool |
If set to true, reference fields in the GFA file will be parsed**. |
Note
To verify successful parsing, check if g->status == 0 in the gfa_props returned by gfa_new.
Prerequisites:
- CMake (3.0+ recommended)
- C compiler (e.g., GCC or Clang)
git clone https://github.com/urbanslug/liteseq.git
cd liteseq
cmake -DCMAKE_BUILD_TYPE=Release -H. -Bbuild && cmake --build build -- -j 3
cmake -DCMAKE_BUILD_TYPE=Debug -H. -Bbuild && cmake --build build -- -j 3
To compile the examples binary set LITESEQ_BUILD_EXAMPLE ON when configuring the build
cmake -DLITESEQ_BUILD_EXAMPLE=ON -DCMAKE_BUILD_TYPE=Debug -H. -Bbuild && cmake --build build -- -j 3
Run examples with ./bin/liteseq-example <path/to/gfa>.
- Include Headers:
#include <liteseq/gfa.h>
- Set Up Configuration:
gfa_config config = {
.inc_vtx_labels = false,
.inc_refs = false,
// ...
};
- Initialize, Parse, and Use:
gfa_props *gfa = gfa_new(config);
// ...
// parse, process, etc.
- Cleanup:
gfa_free(gfa);
See examples/example.c for a more detailed example.
Contributions, bug reports, and feature requests are welcome. Please open an issue or a pull request here on GitHub.
MIT
Happy parsing!