Microbial source tracking (MST) computationally determines the origin of a fecal or environmental sample by comparing its microbial community profile against known source libraries using Bayesian inference. Tools like SourceTracker and FEAST model a sink sample as a mixture of potential source environments, estimating the proportional contribution of each source to the observed community.
Glossary
Microbial Source Tracking

What is Microbial Source Tracking?
Microbial source tracking (MST) is a computational approach that identifies the host or environmental origin of a biological sample by analyzing the taxonomic or functional composition of its microbial community.
These methods leverage the principle that different host guts harbor distinct microbial signatures. By applying Gibbs sampling to taxonomic abundance tables, MST algorithms probabilistically assign contamination origins without requiring the isolation of a single marker organism, enabling source attribution in complex environmental and public health investigations.
Key Characteristics of Computational MST
Computational Microbial Source Tracking (MST) leverages the taxonomic or functional composition of a microbial community to probabilistically identify the host or environmental origin of a biological sample. These methods move beyond simple marker-gene detection to model the entire community structure as a mixture of potential sources.
Bayesian Mixture Model Framework
The core mathematical engine of tools like SourceTracker and FEAST is a Gibbs sampler operating on a Bayesian mixture model. The model treats an unknown 'sink' community as a convex combination of known 'source' communities, estimating the proportion of each source contributing to the sink. This probabilistic approach naturally handles uncertainty and provides posterior distributions for source contributions rather than single point estimates.
Taxonomic vs. Functional Features
Source tracking can operate on two distinct feature spaces:
- Taxonomic composition: Uses Operational Taxonomic Units (OTUs), Amplicon Sequence Variants (ASVs), or species-level relative abundances as input features. This is the most common approach and works well when sources have distinct community profiles.
- Functional gene profiles: Uses the abundance of gene families (e.g., KEGG Orthology groups) rather than taxonomic labels. This approach can be more robust when tracking sources across environments where taxonomy varies but metabolic function is conserved.
FEAST: Fast Expectation-Maximization
FEAST (Fast Expectation-mAximization microbial Source Tracking) improves upon earlier methods by using an Expectation-Maximization (EM) algorithm instead of Gibbs sampling. This provides orders-of-magnitude speed improvements, scaling to thousands of sources and millions of sequences. FEAST also introduces a source-sink similarity metric that quantifies the overall relatedness between a sink and each potential source before decomposition.
Sink-Seeded Source Selection
A critical preprocessing step in modern MST workflows is sink-seeded source selection. Rather than including all available sources in the mixture model, which can lead to overfitting and spurious assignments, this method first identifies a subset of sources that share taxa with the sink sample. This is often implemented using FracMinHash sketches to rapidly estimate the containment index between the sink and each candidate source, retaining only those above a threshold.
Unknown Source Estimation
A key advantage of Bayesian MST methods is the explicit modeling of an 'unknown' source. The model includes a latent source category that accounts for taxa observed in the sink but absent from all provided sources. The estimated proportion assigned to this unknown category serves as a diagnostic: a high unknown proportion indicates that the true source environment was not sampled, preventing false attribution to an incorrect but available source.
Validation with Mock Communities
Rigorous validation of MST pipelines requires in silico mock communities with known mixing proportions. Synthetic sink samples are generated by computationally mixing reads from pure-culture or single-source metagenomes at defined ratios. The MST tool's predicted proportions are then compared against the ground truth using metrics like root-mean-square error (RMSE) and Pearson correlation, quantifying accuracy across a range of mixture complexities and sequencing depths.
Frequently Asked Questions
Explore the computational methods used to trace the origin of microbial communities in environmental, clinical, and public health samples.
Microbial source tracking (MST) is a computational approach that identifies the host or environmental origin of a biological sample by analyzing the taxonomic or functional composition of its microbial community. The core principle relies on the concept that different hosts—such as humans, cattle, or birds—harbor distinct, characteristic microbial signatures in their gut, skin, or fecal matter. When a contaminated water source or a clinical swab is sequenced, the resulting metagenomic profile is compared against a curated library of known source profiles. Bayesian inference methods, implemented in tools like SourceTracker and FEAST, model the sample as a mixture of potential sources and estimate the proportion of each source contributing to the observed community. These algorithms use Gibbs sampling or expectation-maximization to iteratively assign sequence reads to source environments, providing a probabilistic breakdown of contamination origins rather than a simple binary classification.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core computational and ecological concepts that underpin microbial source tracking algorithms, enabling the identification of host origins from complex community mixtures.
SourceTracker
A Bayesian inference framework that models a sink sample as a convex combination of known source communities using Gibbs sampling. It estimates the posterior distribution of source proportions, providing uncertainty quantification for each contribution. Originally developed for the QIIME 1 pipeline, it remains a foundational method for environmental forensics and contamination tracing.
FracMinHash
A sketching technique that selects a fraction of all k-mer hash values falling below a defined abundance threshold. It provides a robust, scalable method for estimating the containment index and Average Nucleotide Identity (ANI) between two genomic datasets, serving as the computational backbone for rapid source-sink comparisons in tools like sourmash.
Community Compositionality
The statistical principle that microbial relative abundances are compositional data—they carry only relative information and sum to a constant. Source tracking methods must account for this constraint using log-ratio transformations or Dirichlet distributions to avoid spurious correlations when comparing proportional community structures across source and sink environments.
Sink-Source Framework
The conceptual model treating a sample of unknown origin as a sink that receives microbial immigrants from one or more known source environments. The framework assumes that the sink community is a mixture of source communities, enabling the mathematical deconvolution of proportional contributions through optimization or sampling-based inference.
Marker Gene Profiling
A technique that estimates taxonomic composition by identifying and quantifying a predefined set of single-copy, universally distributed, clade-specific genes rather than using whole-genome approaches. Tools like MetaPhlAn leverage these markers to generate species-level abundance tables that serve as input features for source tracking algorithms.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us