This repository contains scripts and data associated to the work described in of "Discovering Hidden Plastic-Degrading Enzymes: A Combined Multi-Omics and Machine Learning Strategy", Agostini et al, 2026.
The whole content of the repository is mentioned below, where each section describes a specific procedure applied in the present study, addressing the corresponding scripts and data.
In the data folder relevant files are stored. Not strictly necessary files were omitted to respect github upload limits but can be calculated from the starting files using the provided code.
Code was run on conda environment with the following versions installed, unless specifically specified:
python 3.13.2
pandas 2.2.3
scikit-learn 1.6.1
torch 2.6.0
matplotlib 3.10.1
numpy 2.2.2
biopython 1.85
seaborn 0.13.2
In this notebook there is the code necessary to sample proteins from the swiss-prot alpha fold database (https://ftp.ebi.ac.uk/pub/databases/alphafold/latest/swissprot_pdb_v4.tar) and to generate structural as well as sequence embeddings. The notebook is divided in 4 parts, with different dependencies.
For the first standard environment was used. Download NCBI taxdump (we used april 2025 version https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump_archive/taxdmp_2025-04-01.zip). The code performs a depth first search
to find bacterial IDs. We will use these later to filter the swiss-prot database, and remove eukarya and archea. This is performed with "find_bacteria.sh" bash script.
In the second part sequence embeddings are generated. Data for this part is in:
data/bacteria_pdb_models_examples -> some pdb structures to test the code. For the rest of the dataset, embeddings are provided directly
data/sequences/train -> sequences and already calculated embeddings for negative and unlabelled training examples
data/sequences/validation -> sequences and already calculated embeddings for positive PET examples
data/PU_data/sequences -> sequences and already calculated embeddings for positive PU examples
Specialized environment with versions:
python 3.9.*
torch 2.6.0
In the third part structure embeddings are generated. Data for this part is in:
data/validation_set_structures -> pdb structures for PET and PU positive sets
data/structure_embeddings -> structure embeddings for negative and unlabelled examples, as well as positive PET examples (concatenated in "with_negative_examples_10000.pkl" file) and PU examples
Structures for negative and unlabelled examples are not provided since their size does not fit github limits. They can be downloaded from https://ftp.ebi.ac.uk/pub/databases/alphafold/latest/swissprot_pdb_v4.tar and processed following step 1.
Specialized environment with versions:
python 3.10.17
networkx 2.6.3
karateclub 1.3.3
The last part requires a python environment with: bioservices 1.12.1
In this notebook the models are validated with 10 fold cross validation and different gamma parameters are explored. A random bootstrap model is also computed for performance benchmarking. ROC curves are computed and visualized. Finally, the final models are computed and stored.
You can find the final models in "data/models"
Versions used: see standard environment.
At the start of this notebook there is the possibility to select the organism name (rhodococcus, ferruginibacter, alicycliphilus) and model (PU or PET) to use. Relevant embeddings as well as the label propagation model will be loaded and predictions calculated. At the end of te file there is the code to generate a PCA plot for embeddings, corresponding to Figure S2.
Data for this notebook is in data/plastic_degrading_candidates
This folder contains fasta files corresponding to the organism's proteome, both complete and filtered (see manuscript); Final model predictions and indexes of top 200 predictions for downstream use; sequence and structure embeddings; results of tm-align used to compare top 200 results with positive set sequences.
Again, pdb structures were too heavy to be uploaded in git. They can be obtained starting from the fasta files using localcolabfold as detailed in the manuscript.
Versions used: see standard environment.
In this notebook data coming from MAGs coverage and taxonomy is integrated to obtain the relative abundance heatmaps corresponding to Figure 2.
Versions used: see standard environment.
Binning metrics computed with checkm2 are used to generate the visualization in Figure S1.
Versions used: see standard environment.
This code uses: a manually curated list of plastic-degradation related enzymes (see publication's supplementary data); a spreadsheet with species abundances for each sample (created in step 4); functional annotation from eggNOG; BLAST hits obtained querying MAGs against plasticDB. The final output are visualizations corresponding to Figures S3-5 and Figure 3, as well as gene copy number matrixes.
In this repository only a few functional annotation examples are present because of upload restraints.
Versions used: see standard environment.
This is a simple script to parse through tm-align results. For each query protein the best tm-alignment score against the positive set is stored.
In /data/plastic_degrading_candidates/{organism}/{PET/PU}/selected structures I left some example pdb model in case you want to try to align them using TM-align to the validation sets.
In /data/plastic_degrading_candidates/{organism}/{PET/PU}/results I left TM-align results for the first 5 proteins
The unfilered results are in /data/plastic_degrading_candidates/tmalign_results
Versions used: see standard environment.
This script uses: prodigal gene annotations to calculate gene length; read count tables obtained from htseq starting from alignment of Transcriptomics reads to the final MAGs; Gene copy number matrix from step 6; model predictions; TM-align results. This data is integrated to obtain the visualization correspondint to Figure 5.
Versions used: see standard environment.