Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions tools/tiara/tiara.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy1" profile="21.05">
<tool id="tiara" name="tiara" version="@TOOL_VERSION@+galaxy2" profile="21.05">
<description>Deep-learning-based approach for identification of eukaryotic sequences in the metagenomic data </description>
<macros>
<import>macros.xml</import>
Expand Down Expand Up @@ -33,8 +33,7 @@
$tf
#end for
#for $tf in $taxonomy_filter
&& ls -l ./results/
&& mv ./results/${tf}*.dat ./results/${tf}.fasta
&& find ./results/ -name ${tf}*.dat -exec mv {} ./results/${tf}.fasta ';'
Copy link
Owner

Choose a reason for hiding this comment

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

can you maybe here move your fasta files into a separate folder?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi! Just a thought based on the earlier comment about organizing outputs — maybe it could be useful to replace:
mkdir -p ./results &&
with:
mkdir -p ./txt &&
mkdir -p ./fasta &&

Then update the rest of the paths accordingly. For example:
use -o ./txt/... instead of -o ./results/...

For moving fasta files:
find ./txt/ -name ${tf}*.dat -exec mv {} ./fasta/${tf}.fasta ';'

And in the outputs section :
set directory="fasta" for the output_fasta collection,
and directory="txt" for the output_txt collection.

#end for
#end if

Expand Down Expand Up @@ -78,38 +77,47 @@
</section>
</inputs>
<outputs>
<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="results" />
Copy link
Owner

Choose a reason for hiding this comment

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

Do we really want mixed collections? Or should those be two collections, each for its own filetype?

Copy link
Contributor

Choose a reason for hiding this comment

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

The txt file just provides general information about the results, like sequence ID, first-stage classification, and second-stage classification. I think it should be fine to have them in the same collection.

Copy link
Owner

Choose a reason for hiding this comment

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

But then you can not resue the collection. You can not just feed them into a fasta-tool. You would need to filter this collection before.

Is that what you want?

Copy link
Author

Choose a reason for hiding this comment

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

I think it would be more practical to have two separate collections with their own type.

</collection>
<collection name="output_txt" type="list" label="${tool.name} on ${on_string}: Classified sequences in txt">
<discover_datasets pattern="__name_and_ext__" ext="txt" directory="results" />
Copy link
Owner

Choose a reason for hiding this comment

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

__name_and_ext__ will collect all files and use for the name the filename and for the extension the .txt or .fasta. It will not filter the folder I think. You can test this in your tests.

I think what you need to do it to move all fasta files into a separate dir and just collect them, this is IMHO the easiest way as you already move the fasta file with your find step.

</collection>
</outputs>
<tests>
<test expect_num_outputs="1">
<test expect_num_outputs="2">
<param name="input" value="plast_fr.fasta.gz"/>
<param name="taxonomy_filter" value="pla"/>
<output_collection name="output" type="list">
<element name="main_result" file="main_result01.txt" ftype="txt"/>
<output_collection name="output_fasta" type="list">
Copy link
Owner

Choose a reason for hiding this comment

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

you can count here the number of expected elements.

I think it will fail then, because you still collect all the elements.

<element name="pla" file="pla" ftype="fasta" />
</output_collection>
<output_collection name="output_txt" type="list">
<element name="main_result" file="main_result01.txt" ftype="txt"/>
</output_collection>
</test>
<test expect_num_outputs="1">
<test expect_num_outputs="2">
<param name="input" value="sample_all.fasta"/>
<param name="taxonomy_filter" value="euk,bac,arc"/>
<output_collection name="output" type="list">
<output_collection name="output_fasta" type="list">
<element name="arc" file="arc" ftype="fasta" />
<element name="bac" file="bac" ftype="fasta" />
<element name="euk" file="euk" ftype="fasta" />
</output_collection>
<output_collection name="output_txt" type="list">
<element name="main_result" file="main_result02.txt" ftype="txt" />
</output_collection>
</test>
<test expect_num_outputs="1">
<test expect_num_outputs="2">
<param name="input" value="eukarya_fr.fasta"/>
<param name="taxonomy_filter" value="euk"/>
<param name="min_len" value="5000"/>
<param name="cutoff_stage1" value="0.65"/>
<param name="cutoff_stage2" value="0.60"/>
<param name="probabilities" value="true"/>
<output_collection name="output" type="list">
<output_collection name="output_fasta" type="list">
<element name="euk" file="euk" ftype="fasta" />
</output_collection>
<output_collection name="output_txt" type="list">
<element name="main_result" file="main_result03.txt" ftype="txt" />
</output_collection>
</test>
Expand Down