feat: add threshold-based Hamming distance and refine phylo documentation
Add `threshold_hamming_dist_matrix` to calculate k-mers present in exactly one genome using union minus intersection. Update `DistanceArgs` and `distance.rs` to support this metric on count indexes via `--presence-threshold`, removing the previous restriction that hamming was only for presence/absence indexes. - Add `threshold_hamming_dist_matrix` method to `CountPartials` in `src/obikmer/src/traits.rs` - Implement new test `threshold_hamming_counts_kmers_present_in_one_genome_only` in `src/obicompactvec/src/tests/intmatrix.rs` - Update `DistanceArgs` in `src/obikmer/src/cmd/phylo/args/distance.rs` to clarify threshold effects on Jaccard/Mash/Hamming - Modify `distance` function in `src/obikphylo/src/distance.rs` to support Hamming on count indexes and use pre-computed bit structures - Update `obicompactvec.md` documentation with new function details and partial result explanations - Refine `index.md` descriptions for `phylo`, `unitig`, and `select` options
This commit is contained in:
1 parent
c4eacb3f72
commit
c93616b432
6 files changed
+33
-13
No files matched your search
@@ -509,6 +509,7 @@ Provided finalisations:
|
||||
| `hellinger_dist_matrix()` | `√partial_hellinger[i,j] / √2` |
|
||||
| `hellinger_euclidean_dist_matrix()` | `√partial_hellinger[i,j]` |
|
||||
| `threshold_mash_dist_matrix(k, t)` | Mash distance, derived from `threshold_jaccard_dist_matrix(t)` — no separate partial |
|
||||
| `threshold_hamming_dist_matrix(t)` | `union[i,j] − inter[i,j]` (k-mers present in exactly one genome) — no separate partial |
|
||||
|
||||
### BitPartials
|
||||
|
||||
|
||||
Reference in new issue
Block a user