samestr DB builder: probe for the mOTUs db_mOTU directory (+galaxy4) - #8346
Draft
mvdbeek wants to merge 1 commit into
Draft
samestr DB builder: probe for the mOTUs db_mOTU directory (+galaxy4)#8346mvdbeek wants to merge 1 commit into
mvdbeek wants to merge 1 commit into
Conversation
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.
5 tasks
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.
What
The SameStr mOTUs data manager assumes
motus_db_versioned.fields.pathis the parent ofdb_mOTU(it hard-codes$path/db_mOTU/...). But thatpathis ambiguous: the mOTUs DM'svalue_translationtargets${GALAXY_DATA_MANAGER_DATA_PATH}/motus_database/${value}/db_mOTUand the.loc.sampledocumentspath = .../db_mOTU, i.e.pathis thedb_mOTUfolder itself. So the hard-coded$path/db_mOTU/...doubles and fails (cp: can't stat .../db_mOTU/db_mOTU_versions) wheneverpathalready is thedb_mOTUdir — including when consuming an mOTUs data-manager bundle in a workflow (the files sit directly underpath).Fix
Adopt the same robust probe the mOTUs profiler wrapper just added in bgruening/galaxytools#1869: normalize the dir to
$path/db_mOTUwhen that subdir exists, else use$pathdirectly, then read the markers from the normalized dir. This works for both conventions (parent-with-db_mOTU/, andpath-is-db_mOTU) and for bundle consumption. Bump to+galaxy4.The existing test fixture (
path = ${__HERE__}/with adb_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 folderthe canonical convention going forward?). Opening as a draft so the concrete change is visible alongside that discussion. cc @SaimMomin12 @Minamehr @bernt-matthiasFound while building an mOTUs-derived SameStr database as a reference-data bundle for idc.