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

Draft
wants to merge 10 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.

@@ -0,0 +1,16 @@
name: tables
owner: recetox
remote_repository_url: "https://github.com/RECETOX/galaxytools/tree/master/tools/analysis"
Copy link
Contributor

Choose a reason for hiding this comment

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

The URLs would need fixes

@@ -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.

<param argument="--reference_dataset" type="data" format="tabular,csv,tsv,parquet" label="Reference data" help="Reference dataset to use fopr the interpolation" />
<param name="x_col" type="data_column" data_ref="reference_dataset" use_header_names="true" label="x (reference)" help="Column from the reference dataset to use as X axis for the interpolator."/>
<param name="y_col" type="data_column" data_ref="reference_dataset" use_header_names="true" label="y (reference)" help="Column from the reference dataset to use as Y axis for the interpolator."/>
<param argument="--query_dataset" type="data" format="tabular,csv,tsv,parquet" label="Query dataset" help="Query dataset for which to interpolate the values." />
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any constraints regarding the range of the x values of the reference and the query?

@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 :)

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.

3 participants