sourmash interoperability
snipe is an alignment-free QC tool built on its own .snipesig format; its QC metrics and edgemer model are its own. For interoperability it can read and write sourmash .sig files at the K1 level. snipe hashes k-mers with the same canonical convention — it uses the sourmash library for that hashing and for the .sig I/O — so a sketch round-trips into an existing k-mer workflow, or a sourmash sketch reads into snipe, without a conversion step. This page documents that support.
What each format holds
Section titled “What each format holds”snipe’s native format, .snipesig, is edgemer-based: it stores the K1 base k-mer, its K2 extension, abundance, and the full signature header. That K2 structure is what the sequencing-error and mutation metrics are computed from, and it does not exist in a sourmash file.
A sourmash .sig is K1-only: a FracMinHash sketch of base k-mers with abundance, and nothing about the K2 extension. It is the format snipe reads and writes when you need to move a K1-only sketch in or out.
Hash compatibility
Section titled “Hash compatibility”snipe’s K1 layer uses the same canonical murmur3 hashing (seed 42) as sourmash, taken over the lexicographically smaller of a k-mer and its reverse complement. Because the hashing matches, the K1 hash values in a snipe sketch and a sourmash sketch of the same sequence are the same numbers.
That match extends to the signature’s md5. When snipe writes a sourmash .sig, it builds the sketch through sourmash’s own signature machinery (same seed, same scaled, same k-mer size), so the md5sum snipe emits equals the one sourmash would compute for the same content. The md5 is checked in both directions: on export (snipe writing a .sig) and on load (snipe reading a sourmash .sig).
Practical shape
Section titled “Practical shape”Exporting a .snipesig to sourmash produces a K1-only .sig:
snipe export --input sample.snipesig --format sourmash --output sample.sigLoading works the other way: hand snipe a sourmash .sig and it comes in as a K1-only signature, ready for the operations that only need base k-mers. Anything that needs the K2 extension — the sequencing-error and mutation metrics — requires a full .snipesig, because that signal is not present in a K1-only file.
- Why snipe → — what the edgemer layer buys you.
- Edgemers → — the K1/K2 pair that
.snipesigkeeps and.sigdrops. - Versioning & compatibility → — how formats stay readable over time.
exportreference → — the full command surface.