Tox21 - Multi-Endpoint Toxicity
7,831 compoundschemistrytoxicologyfiltering
A TMAP of 7,831 compounds from the Tox21 challenge dataset, built from Morgan fingerprints (Jaccard metric). Each of the 12 toxicity endpoints (NR-AR, NR-AR-LBD, NR-AhR, NR-Aromatase, NR-ER, NR-ER-LBD, NR-PPAR-gamma, SR-ARE, SR-ATAD5, SR-HSE, SR-MMP, SR-p53) is a separate color layer that can be toggled in the side panel: active (toxic), inactive, or untested. Additional layers include molecular weight, LogP, QED drug-likeness, and Murcko scaffolds. SMILES structures render as tooltips. This example demonstrates TMAP as an analysis tool - switch between endpoints to see how toxicity patterns distribute across chemical space.
Tox21 - Multi-Endpoint ToxicityOpen full page
Loading interactive demo…
How it was made
generate.pypython
from tmap import TMAP
from tmap.utils.chemistry import fingerprints_from_smiles, molecular_properties
from tmap.graph.analysis import boundary_edges
fps = fingerprints_from_smiles(smiles, fp_type="morgan", radius=2, n_bits=2048)
model = TMAP(metric="jaccard", n_neighbors=20, seed=42).fit(fps)
viz = model.to_tmapviz()
viz.add_smiles(smiles)
# Add each toxicity endpoint as a filterable color layer
for target in ["NR-AR", "NR-AhR", "SR-MMP", "SR-p53", ...]:
labels = ["active" if v == 1 else "inactive" if v == 0 else "untested"
for v in df[target]]
viz.add_color_layout(target, labels, categorical=True, color="Set1")
viz.add_color_layout("MW", mw, color="viridis")
viz.add_color_layout("QED", qed, color="magma")
viz.write_html("tox21.html")