Skip to content

v1.6.0 — uniqsketch homopolymer filter and strict margin

Latest

Choose a tag to compare

@hamidamz hamidamz released this 21 Aug 18:51
· 2 commits to main since this release
d9d947f

Features

  • uniqsketch --max-homopolymer=N: drop signatures containing long homopolymer runs.
    Signature candidates with a single-base run longer than N bp are rejected. The aggregate entropy
    filter scores a signature across the whole k-mer, so a short local run (a poly-G tract, for example)
    gets diluted and can survive; this adds a direct local-run-length gate for such indel-prone tracts.
    The check runs while each genomic selection slot is scanned, so a rejected candidate is replaced from
    the same slot wherever one exists and per-reference signature counts and genomic spacing are largely
    preserved. The default (--max-homopolymer=0) disables the filter and leaves selection unchanged.
  • uniqsketch --strict-margin: enforce --min-margin as a hard requirement.
    By default --min-margin=2 falls back to a margin-1 candidate when a selection slot has no 2-safe
    option. With --strict-margin such slots are left empty instead, so every emitted signature satisfies
    the requested margin, at the cost of a smaller sketch. The default (off) leaves --min-margin
    behavior unchanged.

Both options are off by default, so this release is backward compatible with v1.5.0 output.

Verification

Measured on an 8-genome simulated reference set:

  • Without the homopolymer filter, 61 of 799 signatures carry runs longer than 5 bp (longest 8). With
    --max-homopolymer=5, none exceed the bound (longest exactly 5) and only 26 signatures are lost net,
    because slot selection substitutes another candidate.
  • With --min-margin=2, soft mode yields 800 signatures of which 737 (92.1%) satisfy margin ≥ 2;
    --strict-margin yields 737 signatures, all of which satisfy it.
  • An end-to-end query against a homopolymer-filtered index recovered a 90/10 two-reference mixture at
    90.03% / 9.97%, so quantification accuracy is preserved.

Credits

The --max-homopolymer and --strict-margin features were contributed by Christian Gauthier (@chg60).

Full changelog: https://github.com/amazon-science/uniqsketch/blob/main/CHANGELOG.md