Earth Microbiome Project - 16S Habitat Atlas
26,181 samplesmicrobiomeecologyjaccard
A TMAP of 26,181 samples from EMP Release 1 (97 studies), built from 16S OTU presence/absence (Jaccard metric). The tree strongly recovers habitat structure: 95.2% of edges connect samples from the same broad habitat (EMPO level 1: host-associated, free-living, control), and 92.0% at the more detailed EMPO level 3 (19 habitat types), with mean subtree purity of 0.917 and 0.846 respectively. Cross-habitat bridges are ecologically sensible - animal distal gut connects to water (878 edges) and animal surface (164 edges), plant rhizosphere to non-saline soil (406 edges). Per-habitat coherence varies widely, from plant surface (2.7% boundary edges, very tight) to sterile water blanks (81.2%, scattered as expected for a low-biomass control).
Earth Microbiome Project - 16S Habitat AtlasOpen full page
Loading interactive demo…
How it was made
generate.pypython
from tmap import TMAP
from tmap.graph.analysis import boundary_edges, subtree_purity
# OTU x sample presence/absence matrix -> per-sample OTU sets
otu_sets = [row.nonzero()[0].tolist() for row in otu_presence_absence]
model = TMAP(metric="jaccard", n_neighbors=20, seed=42).fit(otu_sets)
purity = subtree_purity(model.tree_, empo_level1_labels, min_size=20)
print(f"EMPO1 mean subtree purity: {purity.mean():.3f}")
viz = model.to_tmapviz()
viz.add_color_layout("habitat (EMPO1)", empo_level1_labels, categorical=True, color="tab10")
viz.add_color_layout("habitat (EMPO3)", empo_level3_labels, categorical=True, color="tab20")
viz.write_html("emp_16s.html")