Additional information on sourmash

Computational requirements

Read more about the computational requirements, here.

Prepared search databases

We offer a number of prepared search databases.

You can read about the supported database formats here.

Other MinHash implementations for DNA

In addition to mash, also see:

  • RKMH: Read Classification by Kmers

  • mashtree: For building trees using Mash

  • Finch: “Fast sketches, count histograms, better filtering.”

  • BBMap and SendSketch: part of Brian Bushnell’s tool collection.

  • PATRIC uses MinHash for genome search.

If you are interested in exactly how these MinHash approaches calculate the hashes of DNA sequences, please see some simple Python code in sourmash, utils/

Papers and references

On the resemblance and containment of documents, Broder, 1997. The original MinHash paper!

Mash: fast genome and metagenome distance estimation using MinHash., Ondov et al. 2016.

sourmash: a library for MinHash sketching of DNA., Brown and Irber, 2017.

Improving MinHash via the Containment Index with Applications to Metagenomic Analysis, Koslicki and Zabeti, 2017.

Ultra-fast search of all deposited bacterial and viral genomic data, Bradley et al., 2019.

Streaming histogram sketching for rapid microbiome analytics, Rowe et al., 2019.

Dashing: Fast and Accurate Genomic Distances with HyperLogLog, Baker and Langmead, 2019.

Presentations and posters

Taxonomic classification of microbial metagenomes using MinHash signatures, Brooks et al., 2017. Presented at ASM.

Blog posts

We (and others) have a number of blog posts on sourmash and MinHash more generally:

JSON format for the signature

The JSON format is not necessarily final; this is a TODO item for future releases. In particular, we’d like to update it to store more metadata for samples.

Interoperability with mash

The hashing functions used by sourmash and mash are the same, but we are still working on ways to convert the file formats. Please keep an eye on sourmash signature import and sourmash signature export!

Developing sourmash

Please see:

Known issues

For at least some versions of matplotlib, users may encounter an error “Failed to connect to server socket:” or “RuntimeError: Invalid DISPLAY variable”. This is because by default matplotlib tries to connect to X11 to use the Tkinter backend.

The solution is to force the use of the ‘Agg’ backend in matplotlib; see this stackoverflow answer or this sourmash issue comment.

Newer versions of matplotlib do not seem to have this problem.