  Over the recent years, the field of whole metagenome shotgun sequencing has
witnessed significant growth due to the high-throughput sequencing technologies
that allow sequencing genomic samples cheaper, faster, and with better coverage
than before. This technical advancement has initiated the trend of sequencing
multiple samples in different conditions or environments to explore the
similarities and dissimilarities of the microbial communities. Examples include
the human microbiome project and various studies of the human intestinal tract.
With the availability of ever larger databases of such measurements, finding
samples similar to a given query sample is becoming a central operation. In
this paper, we develop a content-based exploration and retrieval method for
whole metagenome sequencing samples. We apply a distributed string mining
framework to efficiently extract all informative sequence $k$-mers from a pool
of metagenomic samples and use them to measure the dissimilarity between two
samples. We evaluate the performance of the proposed approach on two human gut
metagenome data sets as well as human microbiome project metagenomic samples.
We observe significant enrichment for diseased gut samples in results of
queries with another diseased sample and very high accuracy in discriminating
between different body sites even though the method is unsupervised. A software
implementation of the DSM framework is available at
https://github.com/HIITMetagenomics/dsm-framework
