CompTox: EPA ToxCast bioactivity + chemical registry: sample notebook

A worked notebook for CompTox: EPA ToxCast bioactivity + chemical registry, with 3 code cells and the output each one printed. On Scigantic it opens in a hosted JupyterLab with the dataset already mounted, so nothing is downloaded first.

Provider
U.S. Environmental Protection Agency (EPA CCTE)
License
CC0 (bulk bioactivity mirror); live Chemical/Hazard/Exposure API requires a separate EPA-issued key
Format
Parquet (in sampled files)
Stored at
Amazon S3, s3://scigantic-comptox (us-east-1)
Access
Free and public. No account with the data provider is needed.

The notebook

CompTox: EPA ToxCast bioactivity

EPA's ToxCast program ran ~3.5 million (chemical, assay-endpoint) high-throughput screening measurements. This notebook queries the winning dose-response model per pair -- AC50, potency, and the active/inactive hit-call -- straight off the mounted mirror, no download, no key needed for any of this.

One chemical's active hit-calls

import scigantic_comptox as comptox

hits = comptox.bioactivity(dtxsid="DTXSID7020182", hitc=1.0)
print(f"{len(hits)} active hit-calls")
hits.head(10)

Batch lookups

The mirror isn't sorted by chemical id, so looping single lookups pays for a near-full scan each time -- measured directly, 50 chemicals one at a time took 61.9 seconds versus 4.8 seconds batched. Always batch more than one chemical.

dtxsids = ["DTXSID7020182", "DTXSID2021868", "DTXSID3021805"]
df = comptox.bioactivity_many(dtxsids)
print(f"{len(df)} rows across {len(dtxsids)} chemicals")

structures = comptox.structures_many(dtxsids)   # SMILES/InChIKey via PubChem
structures

Filter assays by biology, not by string-matching names

cyp_assays = comptox.assay_annotations(intended_target_family="cyp")
print(f"{len(cyp_assays)} CYP-related assay endpoints")

cyp2d6 = comptox.assay_target_mappings(official_symbol="CYP2D6")
cyp2d6

Ask Scigantic AI

Open the panel (top right) and try:

> *"Pull all CYP2D6 assay results for these three chemicals and tell me which one looks like the strongest inhibitor."*

Run it

Open this notebook to run it, see the dataset page for the full description, or browse the full catalog.