-
Notifications
You must be signed in to change notification settings - Fork 481
Add regex switch expression tool #7314
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
Add regex switch expression tool #7314
Conversation
|
Other regex tools and other expression tools are located in the category "Text Manipulation", so I changed "Expression tools" to that. |
|
I don't see why it fails.. |
|
Is it because the tool doesn't generate a real output (only booleans?)? @mvdbeek |
tools/regex_switch/regex_switch.xml
Outdated
| <help><![CDATA[ | ||
| **Regex switch** | ||
| Matches a regular expression against an element name. It emits two booleans: |
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.
Guess "element name" needs better explanation. I guess you assume that the tool is mapped over a collection.
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.
It's the name of the dict element (job["input"]["name"]) of cwl (?), which looks like that:
"engineConfig": [],
"job": {
"input": {
"file_ext": "tabular",
"file_size": 14,
"name": "table.tsv",
"metadata": {
"dbkey": "?",
"data_lines": 2,
"comment_lines": 0,
"columns": 2,
"column_types": [
"int",
"int"
],
"column_names": [],
"delimiter": "__tc__"
},
"src": {
"src": "hda",
"id": 4
}
},
"pattern": "\.csv$"
},
"context": null,
"outdir": null,
"tmpdir": null,
Not sure if this name comes either of the element identifier or the element name (I guessed the latter).
|
@bernt-matthias any idea why the testing fails? |
|
@bernt-matthias looks like tests are green now :) |
tools/regex_switch/regex_switch.xml
Outdated
| var matched = false; | ||
| try { | ||
| if (pat !== "") { |
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.
Should we add a empty_field validator instead to the param?
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.
Thanks! Added!
|
Testing fails again with the same cryptic error as before (..which turned green at some point :) ) |
|
Let me use the opportunity to debug the failure. I guess the problem is due to #7293 |
4587f8e to
e4dfb0c
Compare
|
Fix is coming #7348 (I hope) |
|
sorry for bump, but looks like it worked :) thank you @bernt-matthias |
As discussed here galaxyproject/galaxy#20966 I added the regex switch module as an expression tool.
Workflow example:

Workflow route 1:

Workflow route 2:

@mvdbeek mentioned there is a Galaxy bug regarding the workflow invocation. Tool works but "Attempting to schedule workflow invocation" takes 5 min to pipe the boolean to the target tools.
FOR CONTRIBUTOR: