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

Adding new generation of table manipulation tools #610

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

hechth
Copy link
Member

@hechth hechth commented Nov 14, 2024

This PR introduces a set of new tabular file handling tools which are a bit more modern than what is available in the core galaxy tools.

The tools are based on pandas and/or scipy and all have a python CLI using argparse and should support parquet, csv, tsv and tabular files.

  • arithmetic operations
  • interpolate
  • rename columns
  • transform on columns - log, ld, ln, sqrt, e, abs, floor, ceil - basically anything that is of the form f(x) = y
  • compute masks
  • scale column subset
  • summary

@bgruening and @bernt-matthias and @mvdbeek please give some feedback if you think this design works well or whether it should be done differently. I'm planning to add few more tools to this to cover many use-cases in various -omics disciplines.

Also @KristinaGomoryova please try the tools locally to see if this is roughly what you had in mind.

Also, please let me know whether you would see these tools rather in tools-iuc and if you have a better idea for naming this collection of tools, I'm open to suggestions.

@bgruening
Copy link
Collaborator

@hechth
Copy link
Member Author

hechth commented Nov 18, 2024

Yes I do ... but the tool is too complex in the form for what it can do and not very flexible. You can't choose specific columns etc. and overall I think it doesn't really cover the use cases. We actually adopted this schema from KNIME which provides very nice tools and operations to perform over tables.

Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I share the concerns of @bgruening and think that (in particular in case of the arithmetics and rename tool) it might be better to extend/improve existing tools.

tools/tables/.shed.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,55 @@
<tool id="pandas_arithmetics" name="pandas arithmetics" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this tool I would think that an extension for table compute is more appropriate. The possibility to select specific columns / rows for arithmetic operations would definitely make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the multi select for the rows works, but it would probably have to provide both options

tools/tables/table_scipy_interpolate.xml Show resolved Hide resolved
@bernt-matthias
Copy link
Contributor

It could be an option to create 1-tool workflows for the tasks where we all the complexity of the the underlying tool gets hidden.

@hechth
Copy link
Member Author

hechth commented Nov 19, 2024

@bernt-matthias yes, that is possible - though workflows don't support the column select input type properly, so you can't dynamically select the columns, which massively reduces user friendliness.

@bernt-matthias
Copy link
Contributor

@bernt-matthias yes, that is possible - though workflows don't support the column select input type properly, so you can't dynamically select the columns, which massively reduces user friendliness.

Got it.

We actually adopted this schema from KNIME which provides very nice tools and operations to perform over tables.

This is a point I totally support :)

@hechth
Copy link
Member Author

hechth commented Jan 22, 2025

@bernt-matthias and @bgruening I would like to move this forward but I'm afraid there won't be a community consensus any time soon. I would recommend that we will pilot the tools locally, moving them to the toolshed but keeping them out of usegalaxy.* until we have some more experience with what is really needed and if the usability and everything is how we expected it.

@hechth hechth marked this pull request as ready for review January 22, 2025 09:58
@bernt-matthias
Copy link
Contributor

I asked @rmassei to have a look here. He has a KNIME history and could give us some feedback in this direction. I will also try to have another look on the tools.

@hechth
Copy link
Member Author

hechth commented Jan 23, 2025

@bernt-matthias thanks a lot, that would be very helpful!

@rmassei
Copy link

rmassei commented Jan 23, 2025

Hi @bernt-matthias and @hechth!
After reviewing the PR, I have a few comments:

  • The behavior of table_pandas_arithmetics.xml and tools/tables/table_pandas_transform.xml can already be replicated using the existing table compute tool. While it would require additional steps (e.g., performing the operation on a single column via cut and replace), the output would be identical. Since this operation is likely to be frequently performed by users, it might make more sense to enhance the existing table compute tool to include this functionality, especially since it is also based on pandas.

  • A similar comment applies to tools/tables/table_pandas_rename_column.xml. This functionality can already be achieved using a simple workflow or by extending the table compute tool (or even the add_column_headers tool) to include this feature.

By design, KNIME offers a broader selection of data wrangling tools, which might indeed feel more user-friendly. However, if a tool with similar functionality already exists in Galaxy (such as the table compute tool) and is likely already integrated into some workflows, wouldn't it be more practical to enhance the functionality of the existing tool and provide more user-friendly documentation in its help section?

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

Successfully merging this pull request may close these issues.

4 participants