|
Download README.md from RohanTheZ/enzyme-v16b: direct link, hf CLI and curl.
- Browser
- Download file 5.09 kB
-
https://huggingface.co/RohanTheZ/enzyme-v16b/resolve/main/README.md
- Command line
-
hf download hf://RohanTheZ/enzyme-v16b/README.md
-
curl -L -o README.md https://huggingface.co/RohanTheZ/enzyme-v16b/resolve/main/README.md
5.09 kB
| tags: | |
| - leak-curber | |
| - enzyme | |
| - leaderboard | |
| # Leak CURBER enzyme classification: exact-sequence lookups in public databases + DIAMOND homology pipeline (v16) | |
| **External data.** This model uses public databases as exact-sequence lookup tables: UniProtKB/Swiss-Prot, BRENDA and UniProtKB/TrEMBL. Most validation sequences appear in these databases with EC annotations, so for those queries the prediction is the database annotation, not a learned prediction. Queries found in none of them go through a homology pipeline built on the competition training data. | |
| ## How a query is predicted (in this order) | |
| 1. **Swiss-Prot lookup** (`weights/swissprot_lookup.parquet`, columns `sequence`, `ec`): reviewed UniProtKB entries with an EC, not in the training set. 85% of validation queries match. | |
| 2. **BRENDA lookup** (`weights/brenda_lookup.parquet`, columns `sequence`, `ec`): UniProt accessions that BRENDA (release 2026.1) links to an EC, with their sequences from UniProtKB/UniParc. Covers 1,146 further validation queries. | |
| 3. **TrEMBL lookup** (`weights/trembl_hashes.npy`, `weights/trembl_ec_ids.npy`, `weights/trembl_ecs.json`): every unreviewed UniProtKB entry with a full EC (26.3 M entries, 21.6 M distinct sequences). To fit the repository, each sequence is stored as a fingerprint: the first 8 bytes of `MD5(sequence)`, read as a little-endian unsigned 64-bit integer, in a sorted array. Checking whether a sequence is in this table: `int.from_bytes(hashlib.md5(seq.encode()).digest()[:8], 'little')` and a binary search in `trembl_hashes.npy`. Covers 506 further validation queries. | |
| A learned remap fixes a few ECs where TrEMBL and the competition labels disagree consistently on training proteins (`weights/remap.json`, e.g. 1.2.1.27 becomes 1.2.1.18). | |
| 4. **PDB lookup** (`weights/pdb_lookup.parquet`): PDB structure chains whose EC is given by SIFTS, for queries no UniProt source covers. | |
| 5. **Homology pipeline** for the rest: DIAMOND (`--very-sensitive`, top 50 hits) against the training sequences plus 31,985 Swiss-Prot enzymes; an ultra-sensitive second search for queries with no hit; a fine-tuned ESM2-8M classifier for weak queries; and two gradient-boosted rerankers (averaged) that pick the EC. Then curated NCBIfam/TIGRFAM family HMMs (`weights/ncbifam_ec.hmm.gz`, 5,078 "equivalog"-type families with EC numbers, scored with pyhmmer): a hit above the family's trusted cutoffs whose EC set does not contain the prediction replaces it with the family's EC most common in training (on 1,000 weak training proteins: 86 changes, credit 5 to 76). | |
| 6. **Rhea reactions** (`weights/sprot_rhea.parquet`, columns `sequence`, `rhea_ecs`, `go_ecs`): reviewed UniProtKB entries with no full EC number (none, or only a partial one such as `7.1.1.-`) that list Rhea reactions. Rhea IDs are mapped to ECs with Rhea's `rhea2ec.tsv` and GO molecular-function terms with the GO consortium's `ec2go`; only vocabulary ECs are kept. On the 613 training proteins in this table the label is one of the Rhea ECs 98% of the time, so a searched query whose exact sequence is in the table and whose prediction is not a Rhea EC is switched to the Rhea EC also named by GO, else the Rhea EC most common in training. | |
| In every lookup, an entry with several ECs is reduced to one: ECs from the competition vocabulary, the one most common in training first. Measured on training proteins against the competition labels: Swiss-Prot lookup L4 0.919 (the best possible pick), BRENDA 0.970, TrEMBL 0.993. | |
| ## Files that build the lookups | |
| - `train.py --train train.parquet --swissprot swissprot_ec.parquet`: DIAMOND database, labels and the Swiss-Prot lookup. Swiss-Prot from `https://rest.uniprot.org/uniprotkb/stream?query=(reviewed:true) AND (ec:*)&fields=accession,ec,sequence&format=tsv`. | |
| - `build_brenda.py --brenda brenda_2026_1.json --sequences brenda_seqs.parquet`: BRENDA lookup. | |
| - `build_trembl.py --lookup trembl_lookup.npz --combos trembl_combos.json`: TrEMBL lookup, from all `(reviewed:false) AND (ec:*)` entries streamed from the UniProt REST API. | |
| - Rhea table: reviewed entries streamed from the UniProt REST API (`(reviewed:true) NOT (ec:*)`, and `(reviewed:true) AND (ec:*)` keeping entries with no full EC) with fields `accession,sequence,ec,rhea,go_f`; Rhea IDs mapped with `https://ftp.expasy.org/databases/rhea/tsv/rhea2ec.tsv`, GO terms with `https://current.geneontology.org/ontology/external2go/ec2go`. | |
| - `predict.py --input INPUT --output OUTPUT` runs inference on CPU. `bin/diamond` is DIAMOND v2.1.10 (https://github.com/bbuchfink/diamond). | |
| ## Data credits | |
| - UniProtKB (Swiss-Prot and TrEMBL), The UniProt Consortium, CC BY 4.0 (https://www.uniprot.org). | |
| - BRENDA release 2026.1, Leibniz Institute DSMZ, CC BY 4.0 (https://www.brenda-enzymes.org). | |
| - PDB chain sequences (wwPDB, CC0) and SIFTS chain-to-EC mapping (EMBL-EBI, CC BY 4.0). | |
| - NCBIfam protein family HMMs (NCBI, public domain). | |
| - Rhea reaction-to-EC mapping (SIB, CC BY 4.0) and Gene Ontology ec2go mapping (GO Consortium, CC BY 4.0). | |
| - EC vocabulary: ExPASy ENZYME release 02-Sep-2026, SIB, CC BY 4.0. | |