plasticdb¶
Python client and command-line tool for PlasticDB: a curated database of microorganisms and proteins linked to plastic biodegradation, and the evidence behind each link (paper, experiment, measured value).
- Typed. Every record is a pydantic model; lists are lazy collections you can turn into pandas or polars tables, FASTA files or Biopython records.
- Reproducible. Pin a dataset release and every read
comes from that frozen snapshot.
client.cite()andclient.provenance()say what you used. - Analyses. Run DIAMOND annotation, genome comparison, pathway analysis, HMM screens and taxonomy trees as jobs, with provenance on the results.
- A command line.
plasticdb proteins list --plastic PET --format fasta, usable from Snakemake and Nextflow.
Install¶
pip install plasticdb
pip install "plasticdb[pandas]" # or polars, bio, cli, all
pip install "plasticdb[cli]" # the `plasticdb` command
Python 3.10 or newer. The core install needs only httpx and pydantic.
to_pandas(), to_polars() and to_biopython() need the matching extra and
say which one when it is missing.
Where next¶
| I want to... | Go to |
|---|---|
| Fetch a table of PET enzymes in five minutes | Quick start |
| Get the same answer next year | Reproducibility |
Know what each client.<namespace> does |
Data guide |
| Annotate a genome | Jobs guide |
| Script it from a shell or a pipeline | Command line, Workflows |
| Handle an exception | Errors |
| Look up a signature | API reference |
Citation and data licence¶
The code is MIT-licensed. The PlasticDB data is licensed CC BY 4.0: cite the dataset release you used and the PlasticDB paper.
Gambarini V, Pantos O, Kingsbury JM, Weaver L, Handley KM, Lear G (2022). PlasticDB: a database of microorganisms and proteins linked to plastic biodegradation. Database, 2022:baac008. https://doi.org/10.1093/database/baac008
import plasticdb
print(plasticdb.Client(release="2026.50").cite()) # dataset release (with its DOI), paper, licence
On the command line: plasticdb cite --release 2026.50 --format bibtex.
To cite this software itself (e.g. in a methods section), use its Zenodo DOI
10.5281/zenodo.24352328 (all versions;
each release also has its own DOI on Zenodo) or GitHub's "Cite this repository",
which reads CITATION.cff.
To cite the software itself, use the repository's
CITATION.cff
(GitHub's "Cite this repository" button).
Pre-alpha
The package has not been released to PyPI yet; the API may still change.