-
Notifications
You must be signed in to change notification settings - Fork 485
bakta, fix for local DB usage #7241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lsterck
wants to merge
1
commit into
galaxyproject:main
Choose a base branch
from
lsterck:update_bakta
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this failing the test?
Is the path in the datatable a directory (please add this info to the loc file)? I guess so. If then
should be the right thing to do, or?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bernt-matthias ,
Not sure why it's not failing the test ? (I understand from your reply it should apparently :/ ). You mean the for loop itself or the use of the quotes + /* ?
Well the full issue is that when you use a local version of the bakta DBs, it already has that amrfinderplus-db subdirectory in it as well (otherwise the local cmdline version of bakta is not working as it needs that subdir in the path specified with the --database parameter) .
And the link cmd fails because the 'file' amrfinderplus-db already exists (==created in the step before) and blocks the making of a link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are hinting to just linking one dir to another, right?
I'll do some tests but I assume you'll end up in the same issue
(If you're using it via the data-managers from galaxy it needs to 2-step approach as then you 'll need to add-in the amrfinder subdir to the database_path (to get the required subdir in the main folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'$(input_option.bakta_db_select.fields.path) is a directory indeed but you need to link on each individual files as simply linking the dirs does not work apparently.
Another dir needs to be included in the main dir database_path/ and therefore simply making a link to main dir does not work because then you'll try to make the amrfinderplus-db dir in the target dir (which not allowed obviously) .
the above technically works but then you can't link the amrfinder-db directory in it (because database_path is already a link itself)
and if you execute the above when database_path is already created you'll link to the a new subdir (database_path/new_dir/ ) and thus not to simply database_path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lsterck. I'm sorry, but I still do not understand the problem that you are trying to solve here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bernt-matthias ,
no worries, it is a bit of a complicated (or rather edge-case situation?) and my explanations are perhaps not super accurate either ;-)
It is failing for me because I want to use the local version of the bakta-DB we have already.
Bakta needs 2 DBs, it's own bakta-db and the amrfinderplus-db, but they need to specified via a single database parameter, so the amrfinderplus-db is included, as a subdir, in the bakta-db location.
This particular setup is achieved with that 2-step procedure in the beginning of the command block in the wrapper (lines 12-14).
However, when I want to use our local version DB, the location of the bakta-db already includes the amrfinderplus-db subdir (otherwise our local, non-galaxy version of bakta is not working).
the error I get is: "ln: failed to create symbolic link './database_path/amrfinderplus-db': File exists"
Because they don't use locally installed bakta-db that is configured for non-galaxy usage. It uses a bakta-db version that does NOT has the subdir amrfinderplus-db in it (it links in that amrfinderplus-db from a different location.
(I can copy that situation locally here as well, but than I have to make a local copy and remove the amrfinderplus-db from it, and link that in from a separate amrfinderplus-db version/location using the wrapper).
An additional level of added by linux/bash itself: you can't make a link where the link name is an existing file/dir . As such you need to use that syntax that is in the wrapper now ( '<some db location<'/* ): that will link each individual file rather than linking the directories to each other