Skip to main content

tools for comparing DNA sequences with MinHash sketches

Project description


Documentation Build Status codecov DOI

Compute MinHash signatures for nucleotide (DNA/RNA) and protein sequences.


sourmash compute *.fq.gz
sourmash compare *.sig -o distances
sourmash plot distances

We have demo notebooks on binder that you can interact with:


Sourmash is published on JOSS.

The name is a riff off of Mash, combined with @ctb's love of whiskey. (Sour mash is used in making whiskey.)

Authors: C. Titus Brown (@ctb) and Luiz C. Irber, Jr (@luizirber).

sourmash is a product of the Lab for Data-Intensive Biology at the UC Davis School of Veterinary Medicine.


We currently recommend installing the 2.0 pre-release series. You can use pip to do that like so:

pip install --pre sourmash

sourmash runs under both Python 2.7.x and Python 3.5+. The base requirements are screed and ijson, together with a C++ development environment and the CPython development headers and libraries (for the C++ extension).

The comparison code (sourmash compare) uses numpy, and the plotting code uses matplotlib and scipy, but most of the code is usable without these.

For search and gather you also need khmer version 2.1+.

Installation with conda

Bioconda is a channel for the conda package manager with a focus on bioinformatics software. After installing conda you will need to add the bioconda channel as well as the other channels bioconda depends on. Once you have setup bioconda, you can install sourmash by running:

$ conda create -n sourmash_env sourmash python=3.6.4
$ source activate sourmash_env
$ sourmash compute -h

which will install the latest alpha release.


Please ask questions and files issues on Github.


Development happens on github at dib-lab/sourmash.

After installation, sourmash is the main command-line entry point; run it with python -m sourmash, or do pip install -e /path/to/repo to do a developer install in a virtual environment.

The sourmash/ directory contains the library code.

Tests require py.test and can be run with make test.

Please see the developer notes for more information.

CTB June 2018

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sourmash, version 2.0.0a9
Filename, size File type Python version Upload date Hashes
Filename, size sourmash-2.0.0a9-cp27-cp27m-manylinux1_x86_64.whl (460.3 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size sourmash-2.0.0a9-cp27-cp27mu-manylinux1_x86_64.whl (460.3 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size sourmash-2.0.0a9-cp35-cp35m-manylinux1_x86_64.whl (479.6 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size sourmash-2.0.0a9-cp36-cp36m-manylinux1_x86_64.whl (491.9 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size sourmash-2.0.0a9-cp37-cp37m-manylinux1_x86_64.whl (561.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size sourmash-2.0.0a9.tar.gz (159.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page