update raxml-ng to 2.0.0 + UI refactor#7829
update raxml-ng to 2.0.0 + UI refactor#7829amkozlov wants to merge 17 commits intogalaxyproject:mainfrom
Conversation
| </param> | ||
| <param name="infile" argument="--msa" type="data" format="fasta,phylip" label="Source file with aligned sequences" | ||
| help="At least four aligned genomes are needed for RAxML-NG." /> | ||
| <macros> |
There was a problem hiding this comment.
can you maybe move that into a separate file, that makes it more comprehensible / reviewable I think.
Thanks @amkozlov
| --model '$model.auto_seq_type' | ||
| #elif $model.model_type == 'single_gui': | ||
| #if $model.seq_type == 'multistate': | ||
| #set model_matrix = '""'.join(["MULTI", str($model.single_model.multi_state_count),"_",str($model.single_model.subst_matrix)]) |
There was a problem hiding this comment.
I have difficulty to understand what '""'.join(...) is doing..
There was a problem hiding this comment.
for multi-state models, model name contains the number of states, eg. MULTI8_GTR for 8 states.
the might be a more elegant way to build this string, but IIRC + didn't work so I used join() instead
There was a problem hiding this comment.
But this will produce a string with lots of additional " characters in it (two quote characters in between each array element will be added), e.g. '""'.join(["MULTI", "8", "_", "COUNT"]) = 'MULTI""8""_""COUNT'.
What you probably want is ''.join(["MULTI", str($model.single_model.multi_state_count),"_",str($model.single_model.subst_matrix)]).
But also "MULTI" + str($model.single_model.multi_state_count) + "_" + str($model.single_model.subst_matrix) should work.
There was a problem hiding this comment.
ok I changed it as you suggested and it works - thanks for the hint!
bernt-matthias
left a comment
There was a problem hiding this comment.
We could definitely need a better test coverage for this tool? In particular for such a larger restructuring?
| </xrefs> | ||
| <requirements> | ||
| <requirement type="package" version="@TOOL_VERSION@">raxml-ng</requirement> | ||
| <requirement type="package" version="@TOOL_VERSION@">raxml-ng</requirement> |
There was a problem hiding this comment.
Please restore the old correct indentation.
| </data> | ||
| <data format="nhx" name="startTree" from_work_dir="galaxy.raxml.startTree" label="${tool.name} on ${on_string}: Starting trees"> | ||
| <filter>general_opts['command'] in ["--search", "--search1", "--all", "--start"] </filter> | ||
| <expand macro="m_raxmlng_nofiles_filter"/> |
There was a problem hiding this comment.
the filetype token needs to be used here, or? Maybe also in other outputs?
There was a problem hiding this comment.
I guess I will rather remove this token and move the respective logic out of the macros,
I'm trying to do some (pretty convoluted) output filtering, consider this example:
<data format="nhx" name="startTree" from_work_dir="galaxy.raxml.startTree" label="${tool.name} on ${on_string}: Starting trees">
<filter>
general_opts['cmdtype']['command'] == "--start" or
(general_opts['cmdtype']['command'] in ["--search", "--fast", "--all", "--allfast"] and output_opts['keep_interim_files'] and "startTree" in output_opts['keep_interim_files'])
</filter>
</data>Intended behavior:
startTreefile is primary result for one command (--start), but rarely used intermediate results for others- so for those other commands,
startTreefile will be ignored by default - unless user sets a respective checkbox (inoutput_opts['keep_interim_files']) to indicate that they do want to see this file in the output
There was a problem hiding this comment.
btw I noticed a weird thing:
if no checkboxes are set and output_opts['keep_interim_files'] is empty (undefined?), then "startTree" in output_opts['keep_interim_files']evaluates to true.
is this intended behavior or was I hallucinating like with join()? :)
There was a problem hiding this comment.
"startTree" in output_opts['keep_interim_files'] will trigger an Exception (TypeError) if output_opts['keep_interim_files'] unchecked (then it is None).
If a filter triggers an exception the file will be included. Therefore you need to check for
output_opts['keep_interim_files'] and "startTree" in output_opts['keep_interim_files']
| <expand macro="m_raxmlng_nofiles_filter"/> | ||
| <filter>general_opts['cmdtype']['command'] in ["--all", "--support", "--bsref"] and "fbp" in general_opts['cmdtype']['bs_metric']</filter> | ||
| </data> | ||
| <data format="nhx" name="supportTreeTBE" from_work_dir="galaxy.raxml.supportTBE" label="${tool.name} on ${on_string}: ML Tree with branch support values (TBE)"> |
There was a problem hiding this comment.
Please cover new outputs in tests?
There was a problem hiding this comment.
Sure, will do.
I have a related question:
I have some output files which are optional and depend on the input file content (not input parameters). E.g. a raxml.collapsedBestTree is only created when final tree has short branches that has been collapsed.
How do I define such outputs in XML? Basically, I want the following:
- if the file exists, it should appear in history
- if the file doesn't exist, it's not an error but there should be no respective history entry
There was a problem hiding this comment.
I think this is not possible. If its 1 or more files this might be an option: https://planemo.readthedocs.io/en/latest/writing_advanced.html#examples
Alternatively but such files in a collection, i.e. all such optional outputs in one collection. Then users can extract them from the collection by the name.
There was a problem hiding this comment.
ok thanks, I'll look into it!
I added some more tests, please have a look. |
| <token name="@TOOL_VERSION@">2.0.0</token> | ||
| <token name="@VERSION_SUFFIX@">0</token> | ||
| <xml name="m_raxmlng_msa"> | ||
| <param name="infile" argument="--msa" type="data" format="fasta,phylip" label="Input file with aligned sequences (FASTA/PHYLIP)" |
There was a problem hiding this comment.
You could add a validator here and ask for fasta and phylip files with sequences >= 4
There was a problem hiding this comment.
done, thanks for the hint!
FOR CONTRIBUTOR: