feat: filter zero-valued entries from kmer strict matches output
Optimize query serialization by conditionally excluding genomes with zero total matches. This reduces JSON payload size while preserving the label-to-count mapping structure. Updates architecture documentation and bumps version to 1.1.36.
This commit is contained in:
@@ -153,7 +153,7 @@ Genome keys follow the iteration order of `meta.genomes`.
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `kmer_count` | int | always | k-mers confirmed (post-Findere) with at least one genome match |
|
| `kmer_count` | int | always | k-mers confirmed (post-Findere) with at least one genome match |
|
||||||
| `kmer_missing` | int | `--count-missing` | k-mers absent from the index entirely (pre-Findere None) |
|
| `kmer_missing` | int | `--count-missing` | k-mers absent from the index entirely (pre-Findere None) |
|
||||||
| `kmer_strict_matches` | object | always | per-genome accumulated value (label → count or 0/1) |
|
| `kmer_strict_matches` | object | always | per-genome accumulated value, non-zero entries only (label → count or 0/1) |
|
||||||
| `coverage` | object | `--detail` | per-genome array of per-position contributions (label → [u32]) |
|
| `coverage` | object | `--detail` | per-genome array of per-position contributions (label → [u32]) |
|
||||||
|
|
||||||
`kmer_count + kmer_missing` ≤ total k_user-mers in the sequence. The gap corresponds to k_user-mers whose z-window was not fully confirmed (at least one s-mer absent or zero for all genomes) but whose first s-mer was present in the index.
|
`kmer_count + kmer_missing` ≤ total k_user-mers in the sequence. The gap corresponds to k_user-mers whose z-window was not fully confirmed (at least one s-mer absent or zero for all genomes) but whose first s-mer was present in the index.
|
||||||
|
|||||||
Generated
+1
-1
@@ -1704,7 +1704,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.35"
|
version = "1.1.36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"csv",
|
"csv",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.35"
|
version = "1.1.36"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|||||||
@@ -501,8 +501,10 @@ fn emit_batch(
|
|||||||
|
|
||||||
let mut match_map = serde_json::Map::new();
|
let mut match_map = serde_json::Map::new();
|
||||||
for (g, genome) in meta.genomes.iter().enumerate() {
|
for (g, genome) in meta.genomes.iter().enumerate() {
|
||||||
|
if acc.genome_totals[g] != 0 {
|
||||||
match_map.insert(genome.label.clone(), acc.genome_totals[g].into());
|
match_map.insert(genome.label.clone(), acc.genome_totals[g].into());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ann.insert("kmer_strict_matches".into(), match_map.into());
|
ann.insert("kmer_strict_matches".into(), match_map.into());
|
||||||
|
|
||||||
if detail && !cov.is_empty() {
|
if detail && !cov.is_empty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user