view tooldistillator.xml @ 0:6e868bf6c38e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tooldistillator commit 491c6fc94851aab68cb7529dd6b6fbc6caa84bf2
author iuc
date Tue, 30 Apr 2024 08:42:33 +0000
parents
children 65a69de1e294
line wrap: on
line source

<tool id="tooldistillator" name="ToolDistillator" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>
        Extract information from output files of specific tools and expose it as JSON files
    </description>
    <macros>
        <import>macro.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
#import re
mkdir "tooldistillator_folder" &&

#set $counter = len($tool_section.tools)-1
    #for $i, $tool in enumerate( $tool_section.tools )
tooldistillator
        $tool.select_tool.tool_list
        --hid '$tool.select_tool.input.hid'
        '$tool.select_tool.input'
        --analysis_software_version '$tool.select_tool.analysis_software_version'
        --reference_database_version '$tool.select_tool.reference_database_version'
        #if $tool.select_tool.tool_list == 'bakta'
            #if $tool.select_tool.annotation_tabular_path
                --annotation_tabular_path '$tool.select_tool.annotation_tabular_path'
                --annotation_tabular_hid '$tool.select_tool.annotation_tabular_path.hid'
            #end if
            #if $tool.select_tool.annotation_genbank_path
                --annotation_genbank_path '$tool.select_tool.annotation_genbank_path'
                --annotation_genbank_hid '$tool.select_tool.annotation_genbank_path.hid'
            #end if
            #if $tool.select_tool.annotation_embl_path
                --annotation_embl_path '$tool.select_tool.annotation_embl_path'
                --annotation_embl_hid '$tool.select_tool.annotation_embl_path.hid'
            #end if
            #if $tool.select_tool.contig_sequences_path
                --contig_sequences_path '$tool.select_tool.contig_sequences_path'
                --contig_sequences_hid '$tool.select_tool.contig_sequences_path.hid'
            #end if
            #if $tool.select_tool.nucleotide_annotation_path
                --nucleotide_annotation_path '$tool.select_tool.nucleotide_annotation_path'
                --nucleotide_annotation_hid '$tool.select_tool.nucleotide_annotation_path.hid'
            #end if
            #if $tool.select_tool.amino_acid_annotation_path
                --amino_acid_annotation_path '$tool.select_tool.amino_acid_annotation_path'
                --amino_acid_annotation_hid '$tool.select_tool.amino_acid_annotation_path.hid'
            #end if
            #if $tool.select_tool.summary_result_path
                --summary_result_path '$tool.select_tool.summary_result_path'
                --summary_result_hid '$tool.select_tool.summary_result_path.hid'
            #end if
            #if $tool.select_tool.gff_file_path
                --gff_file_path '$tool.select_tool.gff_file_path'
                --gff_file_hid '$tool.select_tool.gff_file_path.hid'
            #end if
            #if $tool.select_tool.hypothetical_protein_path
                --hypothetical_protein_path '$tool.select_tool.hypothetical_protein_path'
                --hypothetical_protein_hid '$tool.select_tool.hypothetical_protein_path.hid'
            #end if
            #if $tool.select_tool.hypothetical_tabular_path
                --hypothetical_tabular_path '$tool.select_tool.hypothetical_tabular_path'
                --hypothetical_tabular_hid '$tool.select_tool.hypothetical_tabular_path.hid'
            #end if
            #if $tool.select_tool.plot_file_path
                --plot_file_path '$tool.select_tool.plot_file_path'
                --plot_file_hid '$tool.select_tool.plot_file_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'bandage':
            #if $tool.select_tool.bandage_plot_path
                --bandage_plot_path '$tool.select_tool.bandage_plot_path'
                --bandage_plot_hid '$tool.select_tool.bandage_plot_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'bracken':
            #if $tool.select_tool.kraken_report_path
                --kraken_report_path '$tool.select_tool.kraken_report_path'
                --kraken_report_hid '$tool.select_tool.kraken_report_path.hid'
            #end if
                --threshold '$tool.select_tool.threshold'
                --read_len '$tool.select_tool.read_len'
                --level '$tool.select_tool.level'
        #elif $tool.select_tool.tool_list == 'fastp':
            #if $tool.select_tool.trimmed_forward_R1_path
                --trimmed_forward_R1_path '$tool.select_tool.trimmed_forward_R1_path'
                --trimmed_forward_R1_hid '$tool.select_tool.trimmed_forward_R1_path.hid'
            #end if
            #if $tool.select_tool.trimmed_reverse_R2_path
                --trimmed_reverse_R2_path '$tool.select_tool.trimmed_reverse_R2_path'
                --trimmed_reverse_R2_hid '$tool.select_tool.trimmed_reverse_R2_path.hid'
            #end if
            #if $tool.select_tool.html_report_path
                --html_report_path '$tool.select_tool.html_report_path'
                --html_report_hid '$tool.select_tool.html_report_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'integronfinder2':
            #if $tool.select_tool.summary_file_path
                --summary_file_path '$tool.select_tool.summary_file_path'
                --summary_file_hid '$tool.select_tool.summary_file_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'isescan':
            #if $tool.select_tool.summary_path
                --summary_path '$tool.select_tool.summary_path'
                --summary_hid '$tool.select_tool.summary_path.hid'
            #end if
            #if $tool.select_tool.annotation_path
                --annotation_path '$tool.select_tool.annotation_path'
                --annotation_hid '$tool.select_tool.annotation_path.hid'
            #end if
            #if $tool.select_tool.orf_fna_path
                --orf_fna_path '$tool.select_tool.orf_fna_path'
                --orf_fna_hid '$tool.select_tool.orf_fna_path.hid'
            #end if
            #if $tool.select_tool.orf_faa_path
                --orf_faa_path '$tool.select_tool.orf_faa_path'
                --orf_faa_hid '$tool.select_tool.orf_faa_path.hid'
            #end if
            #if $tool.select_tool.is_fna_path
                --is_fna_path '$tool.select_tool.is_fna_path'
                --is_fna_hid '$tool.select_tool.is_fna_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'kraken2':
            #if $tool.select_tool.seq_classification_file_path
                --seq_classification_file_path '$tool.select_tool.seq_classification_file_path'
                --seq_classification_file_hid '$tool.select_tool.seq_classification_file_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'plasmidfinder':
            #if $tool.select_tool.plasmid_result_tabular_path
                --plasmid_result_tabular_path '$tool.select_tool.plasmid_result_tabular_path'
                --plasmid_result_tabular_hid '$tool.select_tool.plasmid_result_tabular_path.hid'
            #end if
            #if $tool.select_tool.genome_hit_path
                --genome_hit_path '$tool.select_tool.genome_hit_path'
                --genome_hit_hid '$tool.select_tool.genome_hit_path.hid'
            #end if
            #if $tool.select_tool.plasmid_hit_path
                --plasmid_hit_path '$tool.select_tool.plasmid_hit_path'
                --plasmid_hit_hid '$tool.select_tool.plasmid_hit_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'quast':
            #if $tool.select_tool.quast_html_path
                --quast_html_path '$tool.select_tool.quast_html_path'
                --quast_html_hid '$tool.select_tool.quast_html_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'recentrifuge':
            #if $tool.select_tool.rcf_stat_path
                --rcf_stat_path '$tool.select_tool.rcf_stat_path'
                --rcf_stat_hid '$tool.select_tool.rcf_stat_path.hid'
            #end if
            #if $tool.select_tool.rcf_html_path
                --rcf_html_path '$tool.select_tool.rcf_html_path'
                --rcf_html_hid '$tool.select_tool.rcf_html_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'shovill':
            #if $tool.select_tool.contig_graph_path
                --contig_graph_path '$tool.select_tool.contig_graph_path'
                --contig_graph_hid '$tool.select_tool.contig_graph_path.hid'
            #end if
            #if $tool.select_tool.bam_file_path
                --bam_file_path '$tool.select_tool.bam_file_path'
                --bam_file_hid '$tool.select_tool.bam_file_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'staramr':
            #if $tool.select_tool.mlst_file_path
                --mlst_file_path '$tool.select_tool.mlst_file_path'
                --mlst_file_hid '$tool.select_tool.mlst_file_path.hid'
            #end if
            #if $tool.select_tool.plasmidfinder_file_path
                --plasmidfinder_file_path '$tool.select_tool.plasmidfinder_file_path'
                --plasmidfinder_file_hid '$tool.select_tool.plasmidfinder_file_path.hid'
            #end if
            #if $tool.select_tool.pointfinder_file_path
                --pointfinder_file_path '$tool.select_tool.pointfinder_file_path'
                --pointfinder_file_hid '$tool.select_tool.pointfinder_file_path.hid'
            #end if
            #if $tool.select_tool.setting_file_path
                --setting_file_path '$tool.select_tool.setting_file_path'
                --setting_file_hid '$tool.select_tool.setting_file_path.hid'
            #end if
        #elif $tool.select_tool.tool_list == 'tabular_file':
                --analysis_software_name '$tool.select_tool.analysis_software_name'
        #end if
        -o 'tooldistillator_folder/$($tool.select_tool.tool_list)_$(i)_output.json'
        | tee '$logfile'
        #if $i < $counter
            &&
        #end if
    #end for
        ]]>
    </command>
    <inputs>
        <section name="tool_section" title="Available tools" expanded="true">
            <repeat name="tools" title="Tool" min="0">
                <conditional name="select_tool">
                    <param name="tool_list" type="select" label="Available tools">
                        <option value="abricate">abricate</option>
                        <option value="bakta">bakta</option>
                        <option value="bandage">bandage</option>
                        <option value="bracken">bracken</option>
                        <option value="fastp">fastp</option>
                        <option value="integronfinder2">integronfinder2</option>
                        <option value="isescan">isescan</option>
                        <option value="kraken2">kraken2</option>
                        <option value="multiqc">MultiQC</option>
                        <option value="plasmidfinder">plasmidfinder</option>
                        <option value="quast">quast</option>
                        <option value="recentrifuge">recentrifuge</option>
                        <option value="refseqmasher">refseqmasher</option>
                        <option value="shovill">shovill</option>
                        <option value="staramr">staramr</option>
                        <option value="tabular_file">tabular_generic_file</option>
                    </param>
                    <when value="abricate">
                        <param name="input" type="data" format="tabular" multiple="false" label="Abricate report file" help="Tabular file from abricate output"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="bakta">
                        <param name="input" type="data" format="json" multiple="false" label="Bakta report file" help="Json file from bakta output"/>
                        <param argument="--annotation_tabular_path" type="data" format="tabular" multiple="false" optional="true" label="Bakta annotation file" help="Tabular annotation file"/>
                        <param argument="--annotation_genbank_path" type="data" format="txt" multiple="false" optional="true" label="Bakta genbank file" help="Genbank annotation file"/>
                        <param argument="--annotation_embl_path" type="data" format="txt" multiple="false" optional="true" label="Bakta embl file" help="EMBL annotation file"/>
                        <param argument="--contig_sequences_path" type="data" format="fasta" multiple="false" optional="true" label="Contig sequences" help="Contig sequences files"/>
                        <param argument="--hypothetical_protein_path" type="data" format="fasta" multiple="false" optional="true" label="Hypothetical protein" help="Hypothetical protein fasta file"/>
                        <param argument="--hypothetical_tabular_path" type="data" format="tabular" multiple="false" optional="true" label="Hypothetical annotation" help="Hypothetical protein annotation"/>
                        <param argument="--plot_file_path" type="data" format="svg" multiple="false" optional="true" label="Plot file" help="Plot of the annotation in svg format"/>
                        <param argument="--summary_result_path" type="data" format="txt" multiple="false" optional="true" label="Bakta summary file" help="Summary file from bakta output"/>
                        <param argument="--nucleotide_annotation_path" type="data" format="fasta" multiple="false" optional="true" label="Bakta nucleotide annotation" help="Nucleotide sequence annotation file"/>
                        <param argument="--amino_acid_annotation_path" type="data" format="fasta" multiple="false" optional="true" label="Bakta protein annotation" help="Amino acid sequence annotation file"/>
                        <param argument="--gff_file_path" type="data" format="gff3" multiple="false" optional="true" label="Bakta annotation file" help="Annotation file in gff"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="bandage">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Bandage report file" help="Tabular file from bandage output"/>
                        <param argument="--bandage_plot_path" type="data" format="svg" multiple="false" optional="true" label="Bandage plot" help="Bandage visualisation file"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="bracken">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Bracken report file" help="Tabular file from bracken output"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                        <param argument="--kraken_report_path" type="data" format="txt,tabular" multiple="false" optional="true" label="Kraken re-estimated report" help="New kraken report from bracken tool"/>
                        <param argument="--threshold" type="integer" min="0" optional="true" label="PRIOR on read numbers" help="Prior of read for estimation, default is 0"/>
                        <param argument="--read_len" type="integer" min="0" optional="true" label="Read length"/>
                        <param argument="--level" type="select" label="Taxonomic level estimation" optional="true" help="Level of final abundance (from Domain to subspecies, default on species)">
                            <option value="D">Domain</option>
                            <option value="P">Phylum</option>
                            <option value="C">Class</option>
                            <option value="O">Order</option>
                            <option value="F">Family</option>
                            <option value="G">Genus</option>
                            <option value="S">Species</option>
                            <option value="S+">Subspecies</option>
                        </param>
                    </when>
                    <when value="fastp">
                        <param name="input" type="data" format="json" multiple="false" label="Fastp report file" help="Fastp result in json format"/>
                        <param argument="--trimmed_forward_R1_path" type="data" format="fastq,fastq.gz" optional="true" multiple="false" label="Fastp trimmed R1" help="trimmed file R1"/>
                        <param argument="--trimmed_reverse_R2_path" type="data" format="fastq,fastq.gz" optional="true" multiple="false" label="Fastp trimmed R2" help="trimmed file R2"/>
                        <param argument="--html_report_path" type="data" format="html" multiple="false" optional="true" label="Fastp report html" help="Fastp result in html format"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="integronfinder2">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Integronfinder report" help="Integron file from integronfinder2"/>
                        <param argument="--summary_file_path" type="data" format="txt,tabular" multiple="false" optional="true" label="Summary report" help="Summary file from integronfinder2"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="isescan">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Isescan report" help="IseScan file from integronfinder2"/>
                        <param argument="--summary_path" type="data" format="tabular" optional="true" multiple="false" label="summary file" help="ISEscan summary"/>
                        <param argument="--annotation_path" type="data" format="gff" optional="true" multiple="false" label="annotation results" help="Annotation in gff file format"/>
                        <param argument="--orf_fna_path" type="data" format="fasta" optional="true" multiple="false" label="ORF fna file" help="Nuleotide sequence to the ORFs"/>
                        <param argument="--orf_faa_path" type="data" format="fasta" optional="true" multiple="false" label="ORF faa file" help="Amino acid sequence to the ORFs"/>
                        <param argument="--is_fna_path" type="data" format="fasta" optional="true" multiple="false" label="IS fna file" help="Nuleotide sequence to the inserted elements"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="kraken2">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="kraken report" help="Taxonomic assignation file from kraken2"/>
                        <param argument="--seq_classification_file_path" type="data" format="txt,tabular" optional="true" multiple="false" label="Sequence assignation" help="Reads assignation file"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="multiqc">
                        <param name="input" type="data" format="html" multiple="false" label="MultiQC report" help="Html report from MultiQC"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="plasmidfinder">
                        <param name="input" type="data" format="json" multiple="false" label="Json report" help="Plasmidfinder result from json file"/>
                        <param argument="--plasmid_result_tabular_path" type="data" format="tabular" optional="true" multiple="false" label="Result in tabular format" help="Plasmid result in tabular format"/>
                        <param argument="--genome_hit_path" type="data" format="fasta" optional="true" multiple="false" label="Genome hits" help="Sequence hit in the analyzed genome"/>
                        <param argument="--plasmid_hit_path" type="data" format="fasta" optional="true" multiple="false" label="Plasmid hits" help="Plasmid sequence identified"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="quast">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Quast report" help="Tabular Quast report"/>
                        <param argument="--quast_html_path" type="data" format="html" multiple="false" optional="true" label="Quast html report" help="Quast html report"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="recentrifuge">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Recentrifuge data file"/>
                        <param argument="--rcf_stat_path" type="data" format="txt,tabular" optional="true" multiple="false" label="Recentrifuge stat file"/>
                        <param argument="--rcf_html_path" type="data" format="html" optional="true" multiple="false" label="Recentrifuge html report file"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="refseqmasher">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="RefsesMasher results"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="shovill">
                        <param name="input" type="data" format="fasta" multiple="false" label="Contigs file" help="Contig fasta file from assembly"/>
                        <param argument="--contig_graph_path" type="data" format="txt" optional="true" multiple="false" label="Contig graph file" help="Graphic file assembly"/>
                        <param argument="--bam_file_path" type="data" format="bam" optional="true" multiple="false" label="Bam file" help="Alignemnt file in bam format"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="staramr">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Resfinder report" help="Resfinder result from starAMR"/>
                        <param argument="--mlst_file_path" type="data" format="txt,tabular" optional="true" multiple="false" label="MLST results" help="mlst scheme file result from starAMR"/>
                        <param argument="--plasmidfinder_file_path" type="data" optional="true" format="txt,tabular" multiple="false" label="Plasmid results" help="Plasmidfinder result from starAMR"/>
                        <param argument="--pointfinder_file_path" type="data" optional="true" format="txt,tabular" multiple="false" label="Pointfinder results" help="PointFinder result from starAMR"/>
                        <param argument="--setting_file_path" type="data" optional="true" format="txt,tabular" multiple="false" label="Setting informations" help="Settings file from starAMR"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                    <when value="tabular_file">
                        <param name="input" type="data" format="txt,tabular" multiple="false" label="Tabular file type" help="Generic result file in tabular format with header"/>
                        <param argument="--analysis_software_name" type="text" multiple="false" optional="true" label="Tool name" help="Tool name which generated the result file"/>
                        <expand macro="analysis_software_version"/>
                        <expand macro="reference_database_version"/>
                    </when>
                </conditional>
            </repeat>
        </section>
        <param name="log" type="boolean" truevalue="true"  falsevalue="" label="Add log" help="Activate/Deactivate the log"/>
    </inputs>
    <outputs>
        <collection name="output_json" type="list" label="${tool.name} on ${on_string}: JSON">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.json" format="json" directory="tooldistillator_folder" />
        </collection>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: Log">
            <filter> log == True </filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="2"> <!-- TEST_1 abricate with logfile -->
            <section name="tool_section">
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="abricate"/>
                        <param name="input" value="abricate/report.tsv" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="2.0" />
                    </conditional>
                </repeat>
            </section>
            <param name="log" value="true"/>
            <output_collection name="output_json" type="list">
                <expand macro="element_assert" name="abricate_0_output" text="Enterococcus faecalis V583"/>
            </output_collection>
            <output name="logfile" compare="sim_size" > 
                <assert_contents><has_size value="0"/></assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1"> <!-- TEST_2 bakta all files -->
            <section name="tool_section">
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="bakta"/>
                        <param name="input" value="bakta/bakta.json" ftype="json"/>
                        <param name="annotation_tabular_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="annotation_genbank_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="annotation_embl_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="contig_sequences_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="hypothetical_protein_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="hypothetical_tabular_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="summary_result_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="nucleotide_annotation_path" value="bakta/bakta_nucleotide_annotation.ffn" ftype="fasta"/>
                        <param name="amino_acid_annotation_path" value="bakta/bakta_aminoacid.faa" ftype="fasta"/>
                        <param name="gff_file_path" value="bakta/bakta_annotation.gff3" ftype="gff3"/>
                        <param name="analysis_software_version" value="1.8.1"/>
                        <param name="reference_database_version" value="5.0"/>
                    </conditional>
                </repeat>
            </section>
            <output_collection name="output_json" type="list" count="1">
                <expand macro="element_assert" name="bakta_0_output" text="hypothetical protein"/>
            </output_collection>
        </test>
        <test expect_num_outputs="1"> <!-- TEST_3 bakta with no files -->
            <section name="tool_section">
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="bakta"/>
                        <param name="input" value="bakta/bakta.json" ftype="json"/>
                    </conditional>
                </repeat>
            </section>
            <output_collection name="output_json" type="list" count="1">
                <expand macro="element_assert" name="bakta_0_output" text="hypothetical protein"/>
            </output_collection>
        </test>
        <test expect_num_outputs="1"> <!-- TEST_4 All tool in repeat -->
            <section name="tool_section">
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="abricate"/>
                        <param name="input" value="abricate/report.tsv" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="2.0" />
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="bakta"/>
                        <param name="input" value="bakta/bakta.json" ftype="json"/>
                        <param name="annotation_tabular_path" value="bakta/bakta_annotation.tsv" ftype="tabular"/>
                        <param name="annotation_genbank_path" value="bakta/bakta_gbff.gbff"/>
                        <param name="annotation_embl_path" value="bakta/bakta_embl.embl"/>
                        <param name="contig_sequences_path" value="bakta/bakta_contigs_sequences.fna" ftype="fasta"/>
                        <param name="hypothetical_protein_path" value="bakta/bakta_hypothetical.faa" ftype="fasta"/>
                        <param name="hypothetical_tabular_path" value="bakta/bakta_hypothetical.tsv" ftype="tabular"/>
                        <param name="plot_file_path" value="bakta/bakta_plot.svg"/>
                        <param name="summary_result_path" value="bakta/bakta_summary.txt" ftype="txt"/>
                        <param name="nucleotide_annotation_path" value="bakta/bakta_nucleotide_annotation.ffn" ftype="fasta"/>
                        <param name="amino_acid_annotation_path" value="bakta/bakta_aminoacid.faa" ftype="fasta"/>
                        <param name="gff_file_path" value="bakta/bakta_annotation.gff3" ftype="gff3"/>
                        <param name="analysis_software_version" value="1.8.1"/>
                        <param name="reference_database_version" value="5.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="bandage"/>
                        <param name="input" value="bandage/bandage_info.txt" ftype="txt"/>
                        <param name="bandage_plot_path" value="bandage/bandage_plot.svg"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="bracken"/>
                        <param name="input" value="bracken/bracken_report.tsv" ftype="tabular"/>
                        <param name="kraken_report_path" value="bracken/bracken_kraken_report.tsv"/>
                        <param name="read_len" value="100"/>
                        <param name="level" value="S"/>
                        <param name="threshold" value="1"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="fastp"/>
                        <param name="input" value="fastp/fastp_report.json" ftype="json"/>
                        <param name="trimmed_forward_R1_path" value="fastp/trimmed_R1.fastq.gz"/>
                        <param name="trimmed_reverse_R2_path" value="fastp/trimmed_R2.fastq.gz"/>
                        <param name="html_report_path" value="fastp/fastp_report.html"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="integronfinder2"/>
                        <param name="input" value="integronfinder2/results.integrons" ftype="tabular"/>
                        <param name="summary_file_path" value="integronfinder2/results.summary" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="isescan"/>
                        <param name="input" value="isescan/results.tsv" ftype="tabular"/>
                        <param name="summary_path" value="isescan/summary.tsv"/>
                        <param name="annotation_path" value="isescan/annotation.gff"/>
                        <param name="orf_fna_path" value="isescan/orf.fna"/>
                        <param name="orf_faa_path" value="isescan/orf.faa"/>
                        <param name="is_fna_path" value="isescan/is.fna"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="kraken2"/>
                        <param name="input" value="kraken2/taxonomy_report.tsv" ftype="tabular"/>
                        <param name="seq_classification_file_path" value="kraken2/taxonomy_result.tsv" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="plasmidfinder"/>
                        <param name="input" value="plasmidfinder/plasmidfinder_result.json" ftype="json"/>
                        <param name="genome_hit_path" value="plasmidfinder/genome_hit.fasta" ftype="fasta"/>
                        <param name="plasmid_hit_path" value="plasmidfinder/plasmid_hit.fasta" ftype="fasta"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="quast"/>
                        <param name="input" value="quast/quast_result.tsv" ftype="tabular"/>
                        <param name="quast_html_path" value="quast/quast_report.html"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="recentrifuge"/>
                        <param name="input" value="recentrifuge/rcf_data.tsv" ftype="tabular"/>
                        <param name="rcf_stat_path" value="recentrifuge/rcf_stat.tsv" ftype="tabular"/>
                        <param name="rcf_html_path" value="recentrifuge/rcf_report.html"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="refseqmasher"/>
                        <param name="input" value="refseqmasher/refsesqmasher.tsv" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="shovill"/>
                        <param name="input" value="shovill/contigs.fa" ftype="fasta"/>
                        <param name="contig_graph_path" value="shovill/contigs.gfa" ftype="txt"/>
                        <param name="bam_file_path" value="shovill/alignment.bam" ftype="bam"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="staramr"/>
                        <param name="input" value="staramr/resfinder.tsv" ftype="tabular"/>
                        <param name="mlst_file_path" value="staramr/mlst.tsv" ftype="tabular"/>
                        <param name="plasmidfinder_file_path" value="staramr/plasmidfinder.tsv" ftype="tabular"/>
                        <param name="pointfinder_file_path" value="staramr/pointfinder.tsv" ftype="tabular"/>
                        <param name="setting_file_path" value="staramr/settings.txt" ftype="tabular"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
                <repeat name="tools">
                    <conditional name="select_tool">
                        <param name="tool_list" value="tabular_file"/>
                        <param name="input" value="tabular_file/report.tsv" ftype="tabular"/>
                        <param name="analysis_software_name" value="test_galaxy"/>
                        <param name="analysis_software_version" value="1.0"/>
                        <param name="reference_database_version" value="1.0"/>
                    </conditional>
                </repeat>
            </section>
            <output_collection name="output_json" type="list" count="15">
                <expand macro="element_assert" name="abricate_0_output" text="Enterococcus faecalis V583"/>
                <expand macro="element_assert" name="bakta_1_output" text="hypothetical protein"/>
                <expand macro="element_assert" name="bandage_2_output" text="3042326"/>
                <expand macro="element_assert" name="bracken_3_output" text="Staphylococcus_aureus"/>
                <expand macro="element_assert" name="fastp_4_output" text="705053822"/>
                <expand macro="element_assert" name="integronfinder2_5_output" text="2353.0"/>
                <expand macro="element_assert" name="isescan_6_output" text="IS200/IS605"/>
                <expand macro="element_assert" name="kraken2_7_output" text="Enterococcus_faecalis"/>
                <expand macro="element_assert" name="plasmidfinder_8_output" text="repUS40_1_repB"/>
                <expand macro="element_assert" name="quast_9_output" text="2944723"/>
                <expand macro="element_assert" name="recentrifuge_10_output" text="6.4917947578"/>
                <expand macro="element_assert" name="refseqmasher_11_output" text="GCF_000519925.1"/>
                <expand macro="element_assert" name="shovill_12_output" text="436224"/>
                <expand macro="element_assert" name="staramr_13_output" text="10_Enterococcus_faecalis_S17_L001"/>
                <expand macro="element_assert" name="tabular_file_14_output" text="NP_814691"/>
            </output_collection>
        </test>

    </tests>
    <help><![CDATA[
**What it does**

ToolDistillator is a tool to extract information from output files of specific tools, expose it as JSON files, and aggregate over several tools.

This tool here is extracting information from output files of specific tools and exposing it as JSON files
** Tool input**

ToolDistillator can use several input type from at least 14 different tools :

+----------------+----------------+-------------------+------------------------------------------------------------+
| Tools          | Version        | Default input file| Optional files                                             |
| Abricate       | 1.0.1          |  output.tsv       |                                                            |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Bakta          | 1.7.0          |  output.json      | protein.faa, nucleotide.fna, annotation.gff3, summary.txt  |
+----------------+----------------+-------------------+------------------------------------------------------------+        
| Bandage        | 0.8.1          |  info.txt         |                                                            |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Bracken        | 2.8            |  output.tsv       | taxonomy.tsv                                               |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Fastp          | 0.23.2         |  output.json      |                                                            |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Integronfinder2| 2.0.2          |  output.integrons | output.summary                                             |
+----------------+----------------+-------------------+------------------------------------------------------------+
| ISEScan        | 1.7.2.3        |  output.tsv       | is.fna, orf.faa, orf.fna                                   |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Kraken2        | 2.1.2          |  taxonomy.tsv     | reads_assignation.txt                                      |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Plasmidfinder  | 2.1.6          |  output.json      | genome_hits.fasta, plasmid_hits.fasta                      |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Quast          | 5.2.0          |  output.tsv       |                                                            |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Recentrifuge   | 1.10.0         |  data.tsv         | report.html, stat.tsv                                      |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Refseqmasher   | 0.1.2          |  output.tsv       |                                                            |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Shovill        | 1.1.0          |  contigs.fasta    | alignment.bam, contigs.gfa                                 |
+----------------+----------------+-------------------+------------------------------------------------------------+
| Staramr        | 0.9.1          |  resfinder.tsv    | mlst.tsv, pointfinder.tsv, plasmidfinder.tsv, settings.tsv |
+----------------+----------------+-------------------+------------------------------------------------------------+
| tabular_file   |  0             |  output.tsv       | no optional files                                          |
+----------------+----------------+-------------------+------------------------------------------------------------+

** Options **

You can add a tool version and a database version for related tools.
For some tools you can add optional files previously produced by the tool

            ]]></help>
    <expand macro="citations"/>
</tool>