liteseq is a lightweight C library for parsing GFA files, using a bidirected model of the graph. In this model, each vertex has two sides (or ends): a left side and a right side.
- Configurable Parsing: Choose whether to include vertex labels, references, etc.
- Minimal Graph: Improve performance by fetching only what's needed
- GFA Version Support:
- GFA v1.0 (VN:Z:1.0)
- Limitations
- Sequence IDs in the GFA should be numerical
Often, we only need to read a subset of the GFA data. Therefore, liteseq
depends on a config to determine what graph properties to read from the GFA.
This can be seen in examples/main.c
.
When both inc_vtx_labels
and inc_refs
are false it only reads the most minimal graph possible,
that is, vertex IDs and the edges.
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
If you want to compile a specific target (such as examples/main.c), run:
cmake -H. -DCMAKE_BUILD_TYPE=Debug -Bbuild && cmake --build build --target liteseq -- -j 8
- Include Headers:
#include <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/main.c
for more detailed usage.
Contributions, bug reports, and feature requests are welcome. Please open an issue or a pull request on GitHub.
MIT
Happy parsing!