feat: enable index resumption and enforce directory creation

The command now supports reopening existing indexes instead of failing when the output file exists. Control flow branches between opening an existing index and constructing a new one, moving configuration setup exclusively to the creation path. Directory existence is enforced upfront with proper I/O error propagation. The --force flag retains its original semantics by removing the target directory before proceeding with a fresh build.
This commit is contained in:
Eric Coissac
2026-08-21 05:06:38 +02:00
parent abc51c2add
commit 5c1584967f
161 changed files with 5274 additions and 845 deletions
+2 -2
View File
@@ -1489,7 +1489,7 @@ instead of a per-partition `partial_*`, run the sequential source sweep:
```text
for p in 0..n_partitions: # OUTER — sequential
open source partition p's layers (QueryLayer-style, obikpartition)
open source partition p's layers (QueryLayer-style, obikindex::partition)
enumerate distinct canonical k-mers of p (one per MPHF slot) with their
presence/count vectors # column-major, as query stage 2
par_iter over these source k-mers: # INNER — rayon, thread-local tally
@@ -1513,7 +1513,7 @@ for p in 0..n_partitions: # OUTER — sequential
```
The inner lookup is precisely `QueryLayer::find_slot` +
`col_value(g, slot)` (`obikpartition/src/query_layer.rs`) — reuse or factor
`col_value(g, slot)` (`obikindex/src/partition/query_layer.rs`) — reuse or factor
out that path rather than reimplementing MPHF access. Enumerating "all distinct
k-mers of a partition with their vectors" is the `dump`/`query` stage-2
column-major scan already implemented in `dump_layer.rs` /
+2 -2
View File
@@ -3,8 +3,8 @@
## Code couvert
- `obikpartition/src/partition.rs` — routage par hash de minimiseur, choix des paramètres
- `obikpartition/src/lib.rs` — structure KmerPartition, nombre de partitions
- `obikindex/src/partition/partition.rs` — routage par hash de minimiseur, choix des paramètres
- `obikindex/src/partition/mod.rs` — structure KmerPartition, nombre de partitions
## Notes