Skip to content

RepeatMasker: update to 4.2.4 and add cached Dfam (FamDB) library support - #8215

Open
mvdbeek wants to merge 6 commits into
galaxyproject:mainfrom
mvdbeek:repeatmasker-4.2.4-cached
Open

RepeatMasker: update to 4.2.4 and add cached Dfam (FamDB) library support#8215
mvdbeek wants to merge 6 commits into
galaxyproject:mainfrom
mvdbeek:repeatmasker-4.2.4-cached

Conversation

@mvdbeek

@mvdbeek mvdbeek commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

Updates RepeatMasker 4.1.5 → 4.2.4 and reworks its repeat-library handling for the partitioned FamDB (v3) format.

Why

RepeatMasker 4.2.4 uses the partitioned FamDB (v3) library format, no longer bundles a repeat library, and drops the -libdir option. The tool's previous dfam (bundled curated) and dfam_up (single .h5) source types therefore no longer work: the bundled library is gone, and the single-file .h5 format is obsolete.

How

  • Bump to RepeatMasker 4.2.4; add a famdb 3.0.0 requirement.
  • Replace dfam / dfam_up with a cached source type that reads a Dfam library from the new repeatmasker_famdb data table (populated by data_manager_repeatmasker, companion PR Add data_manager_repeatmasker #8214). Families for the requested clade are exported with famdb.py -i <lib> families -a -d -f fasta_name --include-class-in-name '<species>' and passed to RepeatMasker as a custom -lib. The custom-FASTA library source is unchanged.
  • Add the repeatmasker_famdb tool data table (tool_data_table_conf.xml.sample + .test, tool-data/*.loc.sample).
  • Replace the dfam/dfam_up tests with a cached test backed by a tiny FamDB v3 fixture (root + curated-consensus, ~70 KB) whose families carry the repeats.fasta sequences on clade Genus, so the cached path masks the same positions as the library test.

Notes for review

  • Depends on Add data_manager_repeatmasker #8214 (the data manager that defines/populates repeatmasker_famdb).
  • The FamDB test fixture was generated with FamDB's own FamDBRoot/FamDBLeaf classes + build_pruned_tree; I verified locally that the exact wrapper famdb.py export command returns all families with RepeatMasker-style headers, byte-identical in sequence to repeats.fasta.
  • Because this is a major RepeatMasker version bump, the expected test outputs (.masked/.stats/.cat/.log, generated under 4.1.5) likely need regeneration against 4.2.4 in CI — the cached test uses lines_diff tolerances in the meantime.

…port

RepeatMasker 4.2.4 uses the partitioned FamDB (v3) library format, no longer
bundles a repeat library, and drops the -libdir option, so the previous
"DFam (bundled)" and "DFam (full/specific version, single .h5)" source types no
longer work.

- Bump the tool to RepeatMasker 4.2.4 and add a famdb 3.0.0 requirement.
- Replace the dfam / dfam_up source types with a "cached" source that reads a
  Dfam library from the new repeatmasker_famdb data table (populated by
  data_manager_repeatmasker). Families for the requested clade are exported with
  `famdb.py ... families -a -d -f fasta_name --include-class-in-name` and passed
  to RepeatMasker as a custom -lib. The custom-FASTA "library" source is
  unchanged.
- Add the repeatmasker_famdb tool data table (sample + test configs, loc sample).
- Replace the dfam/dfam_up tests with a cached test backed by a tiny FamDB v3
  fixture whose curated-consensus families carry the repeats.fasta sequences on
  clade 'Genus', so the cached path masks the same positions as the library test.
mvdbeek added 3 commits July 22, 2026 18:16
…dled famdb.py)

The two-requirement (repeatmasker + famdb) tool forced a mulled multi-package
biocontainer that is not built, so no container resolved and every test failed
with exit 127 (RepeatMasker not found). The repeatmasker package already depends
on famdb, so famdb.py is present in the single-package repeatmasker biocontainer.
… outputs

RepeatMasker 4.2.4 probes its configured FamDB at startup even in -lib mode, and
the Conda package's FamDB has no library data, so masking died with
"FamDB data directory not found". Clearing FAMDB_DIR for the RepeatMasker
invocation skips that probe (the cached source already ran famdb.py directly
via -i to build the -lib FASTA).

Also regenerate the expected test outputs against the repeatmasker 4.2.4
biocontainer: masked/log/align/poly/gff are unchanged from 4.1.5; stats and cat
differ only in version strings. Add dedicated expected files for the cached test
(same masked positions as the library test, but families are classified via the
FamDB export).

Verified by running famdb.py + RepeatMasker in the quay.io repeatmasker:4.2.4
biocontainer.
…sker -v)

The 4.2.4 biocontainer ships only 'RepeatMasker' (capital), not a lowercase
'repeatmasker', so the old version_command 'repeatmasker --version' failed with
exit 127 and aborted every job. 'RepeatMasker -v' prints the version and exits 0.

Verified the full job (version command + famdb.py export + masking) end to end
in the quay.io repeatmasker:4.2.4 biocontainer as uid 1001 under set -e.
Comment thread tools/repeatmasker/repeatmasker.xml
Comment thread tools/repeatmasker/repeatmasker.xml Outdated
mvdbeek added 2 commits August 1, 2026 20:58
…names

Both repeat library sources now run RepeatMasker with -lib, so -cutoff
applies to the cached Dfam export as well; move it out of the 'library'
branch to a top-level parameter.

Add common taxon suggestions to the cached species field. The valid
values are every taxon name in the installed FamDB partition, so a
select is not possible, but a text parameter with options offers the
common ones while still accepting any name.
The data manager now records which FamDB components were installed and
which search engines they support. Track the extra columns, and offer
only libraries usable with rmblast, since that is the engine this tool
searches with -- an HMM-only library would otherwise be selectable and
then fail.
@bernt-matthias

Copy link
Copy Markdown
Contributor

This looks ready to me. I would merge after: #8214 (comment) is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage/Discuss

Development

Successfully merging this pull request may close these issues.

2 participants