Repository navigation
Signal EDAM load failure and widen the extension map - #4469
Open
TilakSharma07 wants to merge 1 commit into
Open
TilakSharma07 wants to merge 1 commit into
TilakSharma07 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
load_edam() keeps its original contract (returns dict, callable with no arguments) so existing callers and tests are unaffected. The new load_edam_with_status() returns (formats, ok) and the module linter uses it to skip writing the ontologies key when the ontology could not be loaded, instead of silently emitting an empty annotation. The extension map is widened from 156 to 653 annotatable file elements across 184 modules. Adds tests/modules/test_load_edam.py covering the parser, the public API contract and the failure path.
TilakSharma07
force-pushed
the
fix-edam-coverage-and-failure-signalling
branch
from
September 12, 2026 11:46
8c07d58 to
65b5c95
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4468.
What was wrong
load_edam()returned a baredict, so a failed download and "nomatching term 8000 " were the same value.
_add_edam_ontologiesthen setsection["ontologies"] = []regardless, which records "this file has noontology" on the strength of a
requestsexception.Separately the map was keyed only on column 14 of EDAM.tsv ("File
extension"), which EDAM 1.25 populates for 61 of 728
format_*concepts. The formats nf-core modules mostly emit were absent:
What changed
load_edam(cache_dir)returns(mapping, ok). The caller unpacks it andpasses
edam_okdown, so the empty-list write is skipped when theontology did not load. Keying additionally on the lowercased preferred
label and single-token exact synonyms takes the map from 67 to 798 keys;
tokens claimed by more than one concept are dropped rather than guessed.
Measured impact
Across the 184 modules used by nf-core/rnaseq and nf-core/sarek, 1538
file channel elements currently receive no ontology; 513 of them become
annotatable.
Tests
tests/modules/test_load_edam.py— 14 cases: the failure signal(connection error, unreadable cache), the success signal, caching of a
download, the widened keys, the curated column still winning on a
conflict, ambiguous tokens being dropped, and non-format concepts being
ignored.
The fixture is a hand-cut slice of EDAM 1.25 — 11 real rows, with URIs,
labels, synonyms and "File extension" values copied verbatim — so the
tests need no network access and add no large blob to the repository. On
that same fixture the current code yields 3 keys (
fq,fastq,xlsx), withbam,fasta,vcf,bedandcramall absent;the patched code yields 12, with those five resolving.
They are in a separate file so the diff stays reviewable — happy to fold
them into
tests/modules/test_modules_utils.pyif you prefer.