Skip to content
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

Apply rules: replacing a text string doesn't seem possible? #19103

Open
hexylena opened this issue Nov 4, 2024 · 1 comment
Open

Apply rules: replacing a text string doesn't seem possible? #19103

hexylena opened this issue Nov 4, 2024 · 1 comment

Comments

@hexylena
Copy link
Member

hexylena commented Nov 4, 2024

Describe the bug

I want to use "create column from regex replacement" to delete a substring (retaining the rest)

Galaxy Version and/or server at which you observed the bug
Browser and Operating System
same as #19102

To Reproduce
Steps to reproduce the behavior:

  1. Create a collection with asdf.fa and bsdf and a second collection with asdf.fa and bsdf.fa
  2. Apply rules
  3. Column
  4. Using a regular expression
  5. Create column from expression replacement
  6. Regex: .fa
  7. Replacement: `` (nothing)

What happens

The regex fails, failing to match some datasets.

If every dataset ends in .fa, instead it fails by creating a column with just .fa, because the rule sees the empty replacement and decides I actually meant to do "create column matching expression".

Expected behavior

I expect this to behave like cat | sed 's/a/b/g but it isn't. I expect it to be providing the entire identifier as input, and then doing the requested replacement (.fa with nothing) which shouldn't fail.

@hexylena
Copy link
Member Author

hexylena commented Nov 4, 2024

For others encountering the same I'm using the following workflow as a workaround. It is not ideal but it works. Maybe it is useful as inspiration.

Galaxy-Workflow-Sanitize_Filename.ga.txt

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

No branches or pull requests

1 participant