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

Enhance relabel_from_file to work with any column pair in mapping file #19022

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

wm75
Copy link
Contributor

@wm75 wm75 commented Oct 17, 2024

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

This can save a cut step in WFs.
Will provide tests if you think it's useful.

@github-actions github-actions bot added this to the 24.2 milestone Oct 17, 2024
@jmchilton
Copy link
Member

I don't use Galaxy or follow the latest trends in tool design - so feel free to just dismiss this suggestion if it doesn't reflect how tools are actually used. My gut is though I would implement this as changing:

                <option value="txt">Using lines in a simple text file.</option>
                <option value="tabular">Map original identifiers to new ones using a two column table.</option>

to:

                <option value="txt">Using lines in a simple text file.</option>
                <option value="tabular">Map original identifiers to new ones using the first two columns of a simple table.</option>
                <option value="tabular_configured">Map original identifiers to new ones using arbitrary columns from a table.</option>

And then adding more advanced option in that new selection when - including like comment line skipping and table type options (stuff like break on commas instead of tabs). But that might be overkill.

Either way though - this seems solid and I'm a +1 on it after it has tests and the linting issue is fixed.

@wm75
Copy link
Contributor Author

wm75 commented Oct 21, 2024

And then adding more advanced option in that new selection when - including like comment line skipping and table type options (stuff like break on commas instead of tabs). But that might be overkill.

I hadn't considered such advanced options because, so far, I've only encountered the column issue during WF development.
Now your comment made me think of https://github.com/galaxyproject/iwc/tree/main/workflows/data-fetching/sra-manifest-to-concatenated-fastqs. @lldelisle I seem to remember there was an issue with that one initially about the SRA run data file being csv instead of tab-separated? I think the current patch would already allow simplification of the current WF, but maybe check if there is a missed opportunity for even more here.

@lldelisle
Copy link
Contributor

Hi everyone,
Not sure this would help in this workflow as I need to create a new column anyway...
But this is generally speaking a really good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants