-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Replace Text replaces intentionally left open "Replace with" with "[Object object]" #18545
Comments
Reproducing/debugging this is made more complicated by #18546 but I think this gets "fixed" by viewing the empty param on the WF run form. |
While this is a bug, I would strongly encourage you to use a workflow parameter for this usecase. https://training.galaxyproject.org/training-material/topics/galaxy-interface/tutorials/workflow-parameters/tutorial.html#add-an-integer-workflow-parameter shows how to do this for integer parameters but it works the same way for text parameters. |
Thanks for pointing this out @mvdbeek. I checked the tutorial, but could you quickly explain the benefits of the workflow parameter here? That was not clear to me from the tutorial. Do you mean by using the parameter and setting it to text, I can likely avoid getting the error? And: Is this a best practice to use in general or rather a workaround limited to this case? |
It worked in this workflow, where I got the cleaner text out. However, if I add the next steps of cleaning my text and want to remove the punctuation mark with the same tool, it again adds gibberish. See history here: Wondering if it's me or a bug... |
Now that is not a bug (and certainly not WF-related) but just a consequence of the regex flavor used by the |
Sure, the main one is that we use the modern workflow run form, which doesn't let users alter the workflow, potentially in ways that are not valid. There's many ways in which the old workflow run form is broken (beyond the bug you found). Think of workflows like a program you write, you wouldn't want users to change things in the source code, instead you want to clearly show and describe what the valid parameters are. This is what workflow parameters do. They're also recorded for posterity and you can see them under the inputs tab of the executed workflow. If users change a parameter right inside the workflow it's kind of complicated to find out if and what they changed. |
Hi all, Workflow: History: Here, I filled in the inputs without expanding the workflow and in step 21, I wanted to remove punctuation, leaving "replace with" blank, which is automatically filled with |
Can you narrow this down to a smaller example and share an invocation id with us ? I've created a smaller example workflow with just step 21 in https://usegalaxy.org/workflows/invocations/4c9a7b1e8376b2f0?from_panel=true and that works fine. |
We could be referring to two different steps: I meant step 21 in the history, which included REPLACE TEXT. Here is a shorter version of the history: If this is still too long, I will minimise it again tomorrow. Thanks for checking |
I think I understand the problem now. You've added an input connection to step 9 Is https://usegalaxy.eu/u/m.vandenbeek/w/minimal-example-comparing-differences-in-two-texts-word-based-imported-from-uploaded-file what you want to do ? Step 7 Step 9 Note that steps are workflow steps, items in the history are history items. I do see multiple things that could be considered bugs:
|
Yes, https://usegalaxy.eu/u/m.vandenbeek/w/minimal-example-comparing-differences-in-two-texts-word-based-imported-from-uploaded-file is what I want to do. The aim is to clean and unify text for later comparison. This part of the workflow aims to be open to the users' needs, depending on what text they want to compare later. (Those parts are deleted in this minimal example) If the text is already pre-processed, those steps are irrelevant and, therefore, not filled. I managed to break down the workflow further and hope that helps narrow down the issue. the error occurs here, when the replacement I want to make is, for example [[:punct:]], to remove punctuation: However, it works smoothly when I input [[:punct:]] in the fully expanded workflow form Do you see what I mean? |
Sorry, those histories don't help, could you let me know which steps in the workflow I would need to look at ? Do you confirm that you've removed the runtime parameters ? |
Please take a look at Step 4 "clean text one", which is to replace text. |
See my screenshot of step 7, the caret controls whether something is a runtime parameter. |
Describe the bug
When running the "Replace Text" Tool (toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_replace_in_line/9.3+galaxy1) in a workflow, the intentionally left blank "replace with" part is unintentionally filled with "[object Object]". It runs smoothly outside of a workflow.
I am trying to use the "Replace Text" Tool to clean my text and delete some unnecessary passages. As I wanted to delete text, I did not fill the "Replace with" box. It works and gives a clean output when I run the tool alone.
When it is part of a workflow, the "Replace with" that I intentionally left blank seems to be automatically filled with "[object Object]", resulting in a rather useless file.
Galaxy Version and/or server at which you observed the bug
Galaxy Version:
version_major | "24.1"
version_minor | "2.dev0"
Browser and Operating System
Operating System: Windows
Browser: Firefox
To Reproduce
Steps to reproduce the behavior:
https://openbible.com/textfiles/akjv.txt
and
https://openbible.com/textfiles/kjv.txt
in steps 5 + 6 of the workflow, pre-processing of text 1 and 2, I wanted to remove some text.
For "find pattern" I inserted:
^(.*?)\t
The Replace, I left open. But when checking again after running, it was replaced by [Object object]
Expected behavior
Cleaning of text, removal of a part of the input, as shown here. This works when running alone - but somehow not in the workfow.
Screenshots
this is the outcome if run independently
what it actually looks like in the workflow
Thanks for looking into it!
The text was updated successfully, but these errors were encountered: