VERDY
Part of VERDANT: Vocabulary Enrichment & Resolution of Diversity Annotations via Neural Technology (BioHackathon Europe 2026).
Meet VERDY, your warrior for ontology matching. Give it your ENA IDs or free-text terms, choose the ontologies, and it predicts the matching terms in each.
- Input: a file (or Python list) of ENA IDs and/or free text. The IDs can be samples, runs or projects. The free text can be species, habitats, parameters or measurement names.
- ENA lookup: each ENA ID is looked up in ENA for its sample's organism and environment fields (
scientific_name,broad_scale_environmental_context,local_environmental_context,environmental_medium, ...). Free text is used as it is. - Search: every name is searched in each ontology you choose (for example
natura2000,gold,envo). - Output: a file with the exact match, or the most closely related terms, per name and ontology.
import verdy
matches = verdy.match("my_input.csv", ontologies=["natura2000", "gold", "envo", "ncbitaxon"])
verdy.save(matches, "my_input.matches.csv") # .csv .tsv .sssom.tsv .json .xlsx
verdy my_input.csv -o natura2000,gold,envo --out my_input.matches.csv
Install
pip install verdy
pip install "verdy[excel]" # to read and write Excel
pip install "verdy[embeddings]" # to also compare by embedding similarity (SentenceTransformers, cosine)
pip install git+https://github.com/dobrevajovana/verdy.git # the latest, unreleased version
Python 3.10 or newer; the only dependency is requests.
Input
verdy.match takes a CSV / TSV / Excel file, a text file with one value per line, a Python list or a pandas DataFrame.
The column is found by its header (name, term, parameter, species, ..., or id, accession, sample_accession, run_accession)
or given with column="...". One file can mix both kinds of value:
| value | what happens |
|---|---|
SAMD00132352, SAMEA..., SAMN..., ERS... |
an ENA sample: its fields are looked up in ENA and each value is searched |
ERR9966617, SRR..., ERX... |
a run or experiment: its sample, as above |
PRJEB54740, PRJNA... |
a project: all its samples, each row under the sample's own accession |
| anything else | free text, searched as it is (units in brackets, underscores and a leading code are set aside) |
fields= chooses other ENA sample fields to search (see ENA's returnFields?result=sample).
After a run, verdy.match.unresolved lists the IDs ENA did not know.
The ontologies
verdy.ONTOLOGIES (or verdy --list):
| ID | What | For |
|---|---|---|
natura2000 |
Natura 2000 habitat types and species (EEA Article 17 lists, fetched live) | habitats by name or code, protected species |
envo |
Environment Ontology | habitats, environments, materials, environmental measurements |
gold |
GOLD ecosystem classification | sample ecosystems |
ncbitaxon |
NCBI Taxonomy | organisms |
gbif |
GBIF Backbone Taxonomy | organisms |
pato |
Phenotype And Trait Ontology | qualities: temperature, salinity, humidity, ... |
oba |
Ontology of Biological Attributes | traits and measurable attributes |
cf |
CF Standard Names | climate, weather and ocean variables |
uo |
Units of measurement | units |
chebi |
Chemical Entities of Biological Interest | chemicals |
obi |
Ontology for Biomedical Investigations | assays, instruments, protocols |
uberon, po, go |
anatomy, plants, biological processes | |
wikidata |
Wikidata | anything with a name |
Any other ontology in OLS4 works as well: pass its ID
(for example foodon, pco or ms).
What comes out
One row per match:
| column | |
|---|---|
term_id, term, category |
your term |
match_type |
skos:exactMatch: a label or synonym is the term (plurals and sp. aside) · skos:closeMatch: most words shared · skos:relatedMatch: some words shared |
ontology, match_curie, match_id, match_label |
the matched term |
confidence |
1.0 exact as written, 0.95 exact up to plurals, then by word overlap |
cosine |
embedding similarity (0..1) with verdy[embeddings] installed; empty otherwise. A match is kept on it from min_cosine (default 0.60); from 0.80 it is a closeMatch |
word_overlap, rank |
how many words they share (0..1), and the place among this term's matches |
definition |
the term's definition (units first, for CF) |
searched_for |
the term after cleaning |
verdy.unmatched(terms, matches, ontologies) lists, per ontology, the terms it found nothing for.
Example
python examples/predict.py runs examples/input.csv, which has three ENA accessions and four free-text terms, against
Natura 2000, GOLD, ENVO, NCBITaxon, PATO and CF. It writes examples/input.matches.csv. Part of the result:
| input | name searched (from) | ontology | match |
|---|---|---|---|
| SAMD00132352 | urban biome (broad_scale_environmental_context) | ENVO | exactMatch ENVO:01000249 urban biome |
| SAMD00132352 | air (local_environmental_context, environmental_medium) | ENVO · GOLD | exactMatch ENVO:00002005 air · GOLD:Air |
| SAMD00132352 | air metagenome (scientific_name) | NCBITaxon | exactMatch NCBITaxon:655179 |
| ERR9966617 | temperate forest | ENVO | exactMatch ENVO:01001805 temperate forest |
| ERR9966617 | mountain | ENVO | exactMatch ENVO:00000081 mountain |
| SAMEA110429224 | Human (host_scientific_name) | NCBITaxon | exactMatch NCBITaxon:9606 Homo sapiens |
| Lynx lynx | Natura 2000 · NCBITaxon | exactMatch n2k:1361 · NCBITaxon:13125 | |
| Atlantic salt meadows | Natura 2000 | exactMatch n2k:1330 | |
| air_temperature | CF · ENVO | exactMatch CF:air_temperature · ENVO:09200001 temperature of air | |
| salinity | PATO | exactMatch PATO:0085001 |
One term at a time
verdy.search("cloud liquid water content", "cf") # the source's best terms, best first
verdy.resolve("SAMD00132352") # what ENA says about an ID
verdy.read_terms("my_input.csv") # what VERDY read from your file
verdy.to_dataframe(matches) # pandas
Tests
pip install -e ".[test]" && python -m pytest -q
The tests stub every web service, so they run offline.
Licence
MIT, see LICENSE.
Metadata
Release files for verdy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| verdy-0.1.1.tar.gz | 27.0 kB | With provenance | Details for verdy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| verdy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for verdy-0.1.1-py3-none-any.whl |
Total release size: 50.8 kB
Release files / verdy-0.1.1.tar.gz
| Download URL | verdy-0.1.1.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
344113b112c49939a82cbc2cdfad6a53dbfdf1bf00b18eb8892fb484c6f5646a
|
|
BLAKE2b-256 checksum How to use checksums |
f7cf6873d979576823cb798feb5bc71f92305363ec0a441fe4aa88a98e8c5015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / verdy-0.1.1-py3-none-any.whl
| Download URL | verdy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
012bc24ef8c9f0321bf4d903139c19af955ecdaa6cad4b71889a324eb58dfe1f
|
|
BLAKE2b-256 checksum How to use checksums |
5e0477920c2b5f145f943a745a834e2239c05d4c857a9690dff849834bdd80f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for verdy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for verdy-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.