Skip to content

Commit b452b0d

Browse files
committed
First attempt at CRF
1 parent fa388e0 commit b452b0d

File tree

9 files changed

+2669
-16
lines changed

9 files changed

+2669
-16
lines changed

BUILD_NOTES.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Build Notes for hidive
2+
3+
## System Dependencies
4+
5+
### sdsl-lite (vgteam fork)
6+
7+
The `odgi-ffi` dependency requires sdsl-lite, which has known compilation issues with newer Clang versions. The vgteam fork (https://github.com/vgteam/sdsl-lite) includes fixes for these issues.
8+
9+
**Installation:**
10+
11+
```bash
12+
# Install the vgteam fork of sdsl-lite system-wide
13+
# This can be done via Homebrew or by building from source:
14+
git clone https://github.com/vgteam/sdsl-lite.git
15+
cd sdsl-lite
16+
mkdir build && cd build
17+
cmake ..
18+
make
19+
sudo make install
20+
```
21+
22+
### OpenMP (libomp)
23+
24+
OpenMP is required for sdsl-lite compilation.
25+
26+
**Installation on macOS:**
27+
28+
```bash
29+
brew install libomp
30+
```
31+
32+
### Build Configuration
33+
34+
When building, ensure the system-installed sdsl-lite and OpenMP are found by setting:
35+
36+
```bash
37+
export CMAKE_PREFIX_PATH="/opt/homebrew/opt/libomp:$CMAKE_PREFIX_PATH"
38+
export CFLAGS="-I/opt/homebrew/opt/libomp/include"
39+
export CXXFLAGS="-I/opt/homebrew/opt/libomp/include"
40+
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
41+
export CMAKE_ARGS="-Dsdsl-lite_ROOT=/usr/local/include -DOpenMP_C_INCLUDE_DIR=/opt/homebrew/opt/libomp/include -DOpenMP_CXX_INCLUDE_DIR=/opt/homebrew/opt/libomp/include -DOpenMP_C_LIB_NAMES=omp -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib -DCMAKE_C_FLAGS=-I/opt/homebrew/opt/libomp/include -DCMAKE_CXX_FLAGS=-I/opt/homebrew/opt/libomp/include"
42+
```
43+
44+
Or add these to your shell profile for persistent configuration.
45+
46+
**Note:** The vgteam fork of sdsl-lite fixes the `louds_tree.hpp` compilation issues that occur with newer Clang versions. Make sure you have this version installed system-wide rather than relying on the bundled version in odgi-ffi.
47+
48+
## odgi-ffi Status
49+
50+
The `odgi-ffi` crate is **disabled** due to build issues with Clang 17+ and the `atomic_queue` dependency. Instead, hidive uses a modular approach:
51+
52+
### Design Decision
53+
54+
**Users prepare ODGI graphs externally** using the command-line `odgi` tool. This approach:
55+
- Avoids build complexity and dependency issues
56+
- Allows users to use their preferred graph construction tools
57+
- Makes the workflow more modular and debuggable
58+
- Enables reuse of graphs across multiple analyses
59+
60+
### Workflow
61+
62+
1. **Build pangenome graph**: `hidive build-pangenome` outputs a GFA file
63+
2. **Convert to ODGI**: Users run `odgi build -g <gfa> -o <odgi>` (external tool)
64+
3. **Use ODGI graph**: `hidive train-crf` and `hidive infer-haplotypes` accept ODGI files
65+
66+
See `PANGENOME_WORKFLOW.md` for detailed instructions.
67+
68+
### Dependencies
69+
70+
- **seqwish**: Included as Rust dependency, used by `build-pangenome`
71+
- **odgi**: Command-line tool, must be installed separately by users
72+

0 commit comments

Comments
 (0)