qiime2 / galaxy-tools

Official QIIME 2 tools for Galaxy
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

Automated re-render of Galaxy Tools #32

Closed q2d2 closed 1 year ago

q2d2 commented 1 year ago

Results of make render on main

bernt-matthias commented 1 year ago

Really cool. Btw. is there somewhere a list of command lines that could be used to auto generate tests for the Galaxy wrappers in the future?

bernt-matthias commented 1 year ago

The number of threads should not be set by the user: https://github.com/qiime2/galaxy-tools/blob/06171b2e13d9eba061b21ff45f3d117d4d541202/tools/suite_qiime2__alignment/qiime2__alignment__mafft.xml#L32. Also automatic (I guess all available cores would be used) is not a good idea.

Galaxy sets a environment variable $GALAXY_SLOTS which should be used.

ebolyen commented 1 year ago

Thanks @bernt-matthias! Re: tests, yes we just need to add more usage examples to our plugins and those automatically become tests. There's a handful in https://github.com/qiime2/galaxy-tools/tree/main/tools/suite_qiime2__diversity_lib but it's something we're looking to improve soon! (Also the wrapper generation is already quite well tested by q2-mystery-stew, which exists to test interfaces such as these. I'm happy to report that 500+ test cases are all succeeding there.)

Re: n_threads/n_jobs/etc, definitely, unfortunately we don't have explicit types for those kinds of parameters yet, so there's not a consistent way to identify that those parameters have that particular purpose. As we work towards adding internal parallel support, this should start to clear up since we'll want the same kinds of things Galaxy does anyhow. That said, I will mention we are pretty strict about making sure the default is always 1, so there shouldn't be situations where a user doesn't realize they've over-allocated, but I realize there's probably not a way for the user to easily match the arguments here with what the admin has set up in the job_config.

One question I do have about parallelism generally in Galaxy is if the user has any input over that at all, or if it exclusively the admin who sets that up? How would a user adapt the requirements based on the size of their data? Perhaps a job takes 16gb and 6 threads on one small dataset, but 128gb and 32 threads on another?

ebolyen commented 1 year ago

Here's where the tests/examples are defined in the plugin: https://github.com/qiime2/q2-diversity-lib/blob/master/q2_diversity_lib/examples.py

We're pretty much copying the idea from Galaxy here :)

Also, we're transitioning our documentation to use that same API, so that we can show examples in each interface, you can see a really good example of it here (default interface is already galaxy, but each page has a dropdown to change the examples):

https://docs.qiime2.org/jupyterbooks/cancer-microbiome-intervention-tutorial/

bernt-matthias commented 1 year ago

Yes, resource allocation is entirely made by the admin. But this can be configured dynamically (eg depending on input size). See here https://docs.galaxyproject.org/en/latest/admin/jobs.html#dynamic-destination-mapping