Skip to content

Fix Tiara wrapper when outputs are missing#1846

Open
Minamehr wants to merge 3 commits intobgruening:masterfrom
Minamehr:tiara-error-fix
Open

Fix Tiara wrapper when outputs are missing#1846
Minamehr wants to merge 3 commits intobgruening:masterfrom
Minamehr:tiara-error-fix

Conversation

@Minamehr
Copy link
Copy Markdown
Contributor

@wm75 @bgruening following the #1808.

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

There are two labels that allow to ignore specific (false positive) tool linter errors:

  • skip-version-check: Use it if only a subset of the tools has been updated in a suite.
  • skip-url-check: Use it if github CI sees 403 errors, but the URLs work.

Comment thread tools/tiara/tiara.xml Outdated
@@ -1,16 +1,18 @@
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy1" profile="21.05">
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy2" profile="21.05">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy2" profile="21.05">
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy@VERSION_SUFFiX@" profile="@PROFILE@">

Can we introduce a VERSION_SUFFIX token in macros and bump the PROFILE to more recent version 25.1?

Comment thread tools/tiara/tiara.xml Outdated
<collection name="output" type="list" label="${tool.name} on ${on_string}: classified sequences in txt and Fasta Output">
<discover_datasets pattern="__name_and_ext__" ext="fasta,txt" directory="results" />
<collection name="output_fasta" type="list" label="${tool.name} on ${on_string}: Fasta Output">
<discover_datasets pattern="__name_and_ext__" ext="fasta" directory="fasta" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is the find business in the command section really necessary?

Would sth like:

Suggested change
<discover_datasets pattern="__name_and_ext__" ext="fasta" directory="fasta" />
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.dat$" directory="txt" format="fasta"/>

not work directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tested this, but it failed. It works in principle, but due to how tiara names the outputs, it breaks the expected identifiers, so I kept the current approach for now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you be a bit more specific on this?
What are the names of the outputs, what would you like the identifiers to be and what are you getting instead. I feel this really should be solvable with the framework instead of via the command section.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You’re right, my bad. The issue was Tiara’s output naming. Fixed now and updated tests.

Copy link
Copy Markdown
Collaborator

@wm75 wm75 left a comment

Choose a reason for hiding this comment

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

Much better already, thanks!

Comment thread tools/tiara/tiara.xml
Comment on lines +82 to 84
<collection name="output_txt" type="list" label="${tool.name} on ${on_string}: Classified sequences in txt">
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.txt$" format="txt" directory="txt" />
</collection>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are there ever more txt files than the:

  • main results and the
  • log output

?

If not, then I don't think this is a good use of a collection and both outputs should just be added as individual datatsets. You can also discover them with from_work_dir and their known names.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also a more specific output format for the main results is tabular.

Comment thread tools/tiara/macros.xml
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">tiara</requirement>
<requirement type="package" version="3.8">python</requirement>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is there a Python requirement here? When I'm installing the bioconda package I'm getting Python 3.8 anyway.

Am I missing sth here or is this just some historic artifact?

Comment thread tools/tiara/tiara.xml
<inputs>
<param name="input" type="data" format="fasta" label="input fasta,fasta.gz file"/>
<param name="taxonomy_filter" type="select" multiple="true" optional="true" label="Write sequences to fasta,fasta.gz files specified in the arguments to this option." help="all refers to all classes present in input fasta (to separate fasta files).">
<param name="taxonomy_filter" type="select" multiple="true" optional="true" label="Write sequences to fasta,fasta.gz files specified in the arguments to this option." help="Select one or more target types of sequences to write to separate FASTA files.">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of making this param optional (and producing an empty collection if the user selects nothing), I would rather make the param required, but put it inside a conditional and after a choice param that asks whether split fasta output should be produced at all.
Then, in outputs, you'd create the collection only if the user selected Yes.

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