Skip to content

samestr DB builder: probe for the mOTUs db_mOTU directory (+galaxy4) - #8346

Draft
mvdbeek wants to merge 1 commit into
galaxyproject:mainfrom
mvdbeek:samestr-motus-db-mOTU-probe
Draft

samestr DB builder: probe for the mOTUs db_mOTU directory (+galaxy4)#8346
mvdbeek wants to merge 1 commit into
galaxyproject:mainfrom
mvdbeek:samestr-motus-db-mOTU-probe

Conversation

@mvdbeek

@mvdbeek mvdbeek commented Aug 24, 2026

Copy link
Copy Markdown
Member

What

The SameStr mOTUs data manager assumes motus_db_versioned.fields.path is the parent of db_mOTU (it hard-codes $path/db_mOTU/...). But that path is ambiguous: the mOTUs DM's value_translation targets ${GALAXY_DATA_MANAGER_DATA_PATH}/motus_database/${value}/db_mOTU and the .loc.sample documents path = .../db_mOTU, i.e. path is the db_mOTU folder itself. So the hard-coded $path/db_mOTU/... doubles and fails (cp: can't stat .../db_mOTU/db_mOTU_versions) whenever path already is the db_mOTU dir — including when consuming an mOTUs data-manager bundle in a workflow (the files sit directly under path).

Fix

Adopt the same robust probe the mOTUs profiler wrapper just added in bgruening/galaxytools#1869: normalize the dir to $path/db_mOTU when that subdir exists, else use $path directly, then read the markers from the normalized dir. This works for both conventions (parent-with-db_mOTU/, and path-is-db_mOTU) and for bundle consumption. Bump to +galaxy4.

The existing test fixture (path = ${__HERE__}/ with a db_mOTU/ subdir) exercises the parent case and is unchanged.

Context / discussion

Draft pending the convention question raised on bgruening/galaxytools#1869 (is path = the db_mOTU folder the canonical convention going forward?). Opening as a draft so the concrete change is visible alongside that discussion. cc @SaimMomin12 @Minamehr @bernt-matthias

Found while building an mOTUs-derived SameStr database as a reference-data bundle for idc.

The motus_db_versioned 'path' is ambiguous: it can point at the db_mOTU
directory itself (the mOTUs DM value_translation targets
motus_database/<value>/db_mOTU, and the .loc.sample documents that) or at
its parent. The motus branch hard-coded '$path/db_mOTU/...', which only
works when path is the parent and fails otherwise (e.g. cp: can't stat
.../db_mOTU/db_mOTU_versions when path already IS the db_mOTU dir, or when
consuming a data-manager bundle where the files sit directly under path).

Adopt the same robust probe the mOTUs profiler uses
(bgruening/galaxytools#1869): normalize the dir to $path/db_mOTU when that
subdir exists, else use $path directly, then read the markers from there.
Bump to +galaxy4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant