seqtree 0.7.0 — deduplicated Hamming-neighbourhood enumeration
Added
seqtree.distance now enumerates a Hamming ball, not just scores one.
neighbourhood(seq, r=1, alphabet=None, include_self=True, shell=False)— the closed ball (19·L + 1atr = 1over the 20 standard residues).neighbourhood_union(seqs, ...)— the union over many centres, each distinct sequence emitted once.union_size(seqs, ...)— the cardinality, without building or sorting the result list.
Substitution only, fixed length. Deduplication happens during a multi-source breadth-first walk, so the Σ 19·L_i multiset is never materialised — the point, since near-duplicate centres overlap heavily. For 200 length-14 junctions all within distance 1 of a common centre the per-sequence balls double-count 41.7% (53,400 → 31,122); at spread 2, 4.5%; at spread ≥ 3, nothing.
shell=True returns the sphere at exactly r from the nearest centre. Shells partition the closed ball exactly: shells 0..r are pairwise disjoint, their union is the ball, and every member sits at distance exactly d from its nearest centre — so a per-shell quantity sums back to the per-ball one.
neighbourhood_union and union_size raise TypeError on a single string rather than iterating it: union_size("CASSLGQYF") would otherwise take the 8 distinct characters as centres and answer 20 instead of 172.
seqtree.__version__, read from the installed distribution metadata, so pyproject.toml is the single source.
Fixed
The documentation build stamped every page 0.6.1 while the package was 0.7.0 — docs/conf.py hand-copied the version. Both fields now read seqtree.__version__.
Gates
341 → 346 tests passed, 3 skipped · ctest 1/1 · sphinx -W clean · oracle and perf regression within threshold · sdist + wheel build, twine check PASSED.