changeset 24:f7e2f1eb3a16 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/multiqc commit dffbb5d421a5a5773bcb7f05933b12c45461bb58
author iuc
date Mon, 02 Sep 2024 14:22:54 +0000
parents abfd8a6544d7
children
files bamtools_plugin.xml bcftools_plugin.xml bismark_plugin.xml bowtie2_plugin.xml busco_plugin.xml cutadapt_plugin.xml deeptools_plugin.xml fastp_plugin.xml fastqc_plugin.xml featurecounts_plugin.xml flexbar_plugin.xml gatk_plugin.xml macros.xml multiqc.xml picard_plugin.xml pycoqc_plugin.xml qualimap_plugin.xml rseqc_plugin.xml salmon_plugin.xml samtools_plugin.xml star_plugin.xml template_plugin.xml test-data/mqc_fastqc_per_base_sequence_quality_plot_1.txt trimmomatic_plugin.xml vcftools_plugin.xml
diffstat 25 files changed, 2054 insertions(+), 1114 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamtools_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,39 @@
+<macros>
+    <token name="@BAMTOOLS_COMMAND@"><![CDATA[
+        #set $pattern = "Stats for BAM file(s)"
+        @LN_FILES@
+    ]]></token>
+    <xml name="bamtools_form">
+        <param name="input" type="data" format="txt" multiple="true" label="Output of BAMtools" help="It should contain 'This file was produced by bcftools stats'"/>
+    </xml>
+    <xml name="bamtools_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bamtools"/>
+                    <param name="input" value="bamtools.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="bamtools-stats"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="bamtools_txt"/>
+                    <has_text text="Bamtools"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="3"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,42 @@
+<macros>
+    <token name="@BCFTOOLS_COMMAND@"><![CDATA[
+        #set $pattern = "This file was produced by bcftools stats"
+        @LN_FILES@
+    ]]></token>
+    <xml name="bcftools_form">
+        <param name="input" type="data" format="txt" multiple="true" label="Output of BCFtools" help="It should contain 'This file was produced by bcftools stats'"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="bcftools_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bcftools"/>
+                    <param name="input" value="bcftools.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="bcftools_stats_indel-lengths"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="Stats_mqc_generalstats_bcftools_stats_number_of_records"/>
+                    <has_text text="Stats_mqc_generalstats_bcftools_stats_number_of_SNPs"/>
+                    <has_text text="Test1"/>
+                    <has_text text="72330"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="8"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="0"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bismark_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,83 @@
+<macros>
+    <token name="@BISMARK_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_1@
+            #if str($repeat2.type) == "align"
+                #for $file in $repeat2.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_SE_report.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "dedup"
+                #for $file in $repeat2.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_deduplication_report.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "meth_extract"
+                #for $file in $repeat2.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_splitting_report.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "m_bias"
+                #for $file in $repeat2.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_M-bias.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "bam2nuc"
+                #for $file in $repeat2.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.nucleotide_stats.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="bismark_form">
+        <repeat name="output" title="Bismark output" min="1">
+            <param name="type" type="select" label="Type of Bismark output?">
+                <option value="align">Alignment file</option>
+                <option value="dedup">Deduplication file</option>
+                <option value="meth_extract">Methylation file</option>
+                <option value="m_bias">m_bias file</option>
+                <option value="bam2nuc">bam2nuc file</option>
+            </param>
+            <param name="input" type="data" format="txt" multiple="true" label="Bismark output"/>
+        </repeat>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="bismark_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bismark"/>
+                    <repeat name="output">
+                        <param name="type" value="align"/>
+                        <param name="input" value="bismark.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="bismark-alignment"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="bismark_txt_SE_report"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="3"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="0"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bowtie2_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,40 @@
+<macros>
+    <token name="@BOWTIE2_COMMAND@"><![CDATA[
+        #set $pattern = "% overall alignment rate"
+        @LN_FILES@
+    ]]></token>
+    <xml name="bowtie2_form">
+        <param name="input" type="data" format="txt" multiple="true" label="Output of Bowtie 2" help="It should contain 'reads; of these:'"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="bowtie2_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bowtie2"/>
+                    <param name="input" value="bowtie2_1.txt,bowtie2_2.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="bowtie2_se_plot"/>
+                    <has_text text="mqc-module-section-bowtie2"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="bowtie2_1_txt"/>
+                    <has_n_lines n="3"/>
+                    <has_n_columns n="2"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/busco_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,48 @@
+<macros>
+    <token name="@BUSCO_COMMAND@"><![CDATA[
+        ## Searches for files "short_summary_[samplename].txt"
+        #for $file in $repeat.software_cond.input
+            @ESCAPE_IDENTIFIER@
+            #set file_path = os.path.join($software_dir, 'short_summary_' + str($identifier))
+            ln -s '$file' '$file_path' &&
+        #end for
+    ]]></token>
+    <xml name="busco_form">
+        <param name="input" type="data" format="txt" multiple="true" label="Output of BUSCO"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="busco_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="busco"/>
+                    <param name="input" value="busco.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="busco-lineage-fungi_odb9"/>
+                </assert_contents>
+            </output>
+            <!-- Not sure why this is empty 
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="R1_fq"/>
+                    <has_text text="result_right"/>
+                    <has_text text="25839_merged"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="11"/>
+                    <has_n_columns n="22"/>
+                </assert_contents>
+            </output>
+            -->
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cutadapt_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,48 @@
+<macros>
+    <token name="@CUTADAPT_COMMAND@"><![CDATA[
+        #set $pattern = "This is cutadapt"
+        #for $file in $repeat.software_cond.input
+            @ESCAPE_IDENTIFIER@
+            #set file_path = os.path.join($software_dir, str($identifier) + '.txt')
+            ln -s '$file' '$file_path' &&
+            ## replace header for old cutadapt release
+            sed -i.old 's/You are running/This is/' '$file_path' &&
+            grep -q "$pattern" '$file_path' || die "'$pattern' or 'You are running cutadapt' not found in the file" &&
+        #end for
+    ]]></token>
+    <xml name="cutadapt_form">
+        <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Cutadapt" help="It should contain 'This is cutadapt' or 'You are running cutadapt'"/>
+    </xml>
+    <xml name="cutadapt_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="cutadapt"/>
+                    <param name="input" value="cutadapt.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="cutadapt_trimmed_sequences_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="Cutadapt"/>
+                    <has_text text="Cutadapt_mqc_generalstats_cutadapt_percent_trimmed"/>
+                    <has_text text="10"/>
+                    <has_text text="Cutadapt_mqc_generalstats_cutadapt_percent_trimmed"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="2"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="2"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deeptools_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,39 @@
+<macros>
+    <token name="@DEEPTOOLS_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            #if str($repeat2.type) == "bamPEFragmentSize"
+                #set $pattern = "Frag."
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "estimateReadFiltering"
+                #set $pattern = "Internally-determined Duplicate"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "plotCoverageStdout"
+                #set $pattern = "sample"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "plotCoverageOutRawCounts"
+                #set $pattern = "#plotCoverage --outRawCounts"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "plotEnrichment"
+                #set $pattern = "featureReadCount"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "plotFingerprintOutRawCounts"
+                #set $pattern = "#plotFingerprint --outRawCounts"
+                @LN_2_FILES@
+            #end if
+        #end for
+    ]]></token>
+    <xml name="deeptools_form">
+        <repeat name="output" title="deepTools output" min="1">
+            <param name="type" type="select" label="deepTool used to generate the output?">
+                <option value="bamPEFragmentSize">bamPEFragmentSize</option>
+                <option value="estimateReadFiltering">estimateReadFiltering</option>
+                <option value="plotCoverageStdout">plotCoverageStdout</option>
+                <option value="plotCoverageOutRawCounts">plotCoverageOutRawCounts</option>
+                <option value="plotEnrichment">plotEnrichment</option>
+                <option value="plotFingerprintOutRawCounts">plotFingerprintOutRawCounts</option>
+                <option value="plotFingerprintOutQualityMetrics">plotFingerprintOutQualityMetrics</option>
+            </param>
+            <param name="input" type="data" format="txt" label="Bismark output" multiple="true"/>
+        </repeat>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fastp_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,47 @@
+<macros>
+    <token name="@FASTP_COMMAND@"><![CDATA[
+        #set $pattern = "report_title"
+        #for $file in $repeat.software_cond.input
+            @ESCAPE_IDENTIFIER@
+            #set file_path = os.path.join($software_dir, str($identifier) + 'fastp.json')
+            ln -s '$file' '$file_path' &&
+            grep -q "$pattern" '$file_path' || die "'$pattern' or 'report_title' not found in the file" &&
+        #end for
+    ]]></token>
+    <xml name="fastp_form">
+        <param name="input" type="data" format="json" label="Output of fastp" help="It should be the json report from fastp containing 'report_title" multiple="true"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="fastp_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="fastp"/>
+                    <param name="input" value="fastp1.json.txt,fastp2.json.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="All-in-one FASTQ preprocessor"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="fastp_mqc_generalstats_fastp_pct_duplication"/>
+                    <has_text text="R1_fq"/>
+                    <has_text text="fastp_mqc_generalstats_fastp_after_filtering_q30_rate"/>
+                    <has_text text="bwa-mem-fastq1_fq"/>
+                    <has_n_lines n="3"/>
+                    <has_n_columns n="8"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="15"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fastqc_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,71 @@
+<macros>
+<token name="@FASTQC_COMMAND@"><![CDATA[
+    #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+        @CREATE_REPEAT_DIR_1@
+        #if str($repeat2.type) == "data"
+            #for $k, $file in enumerate($repeat2.input)
+                #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
+                #set file_path = os.path.join($file_dir, 'fastqc_data.txt')
+                mkdir '$file_dir' &&
+                ln -s '$file' '$file_path' &&
+            #end for
+        #elif str($repeat2.type) == "theoretical_gc"
+            #for $file in $repeat2.input
+                @ESCAPE_IDENTIFIER@
+                #set file_path = os.path.join($repeat_dir, str($identifier) + '_fastqc_theoretical_gc')
+                ln -s '$file' '$file_path' &&
+            #end for
+        #end if
+    #end for
+]]></token>
+
+<xml name="fastqc_form">
+    <repeat name="output" title="FastQC output" min="1">
+        <param name="type" type="select" label="Type of FastQC output?">
+            <option value="data">Raw data</option>
+            <option value="theoretical_gc">Theorectical GC</option>
+        </param>
+        <param name="input" type="data" format="txt" multiple="true" label="FastQC output">
+            <validator type="expression" message="MultiQC does not accept the HTML report generated by FastQC, only the Raw Data">value is not None and value.extension != "html"</validator>
+        </param>
+    </repeat>
+</xml>
+
+<!-- add here your test files and tests, the more stringent the better -->
+<xml name="fastqc_test">
+    <test expect_num_outputs="3">
+        <repeat name="results">
+            <conditional name="software_cond">
+                <param name="software" value="fastqc" />
+                <repeat name="output">
+                    <param name="type" value="data"/>
+                    <param name="input" value="fastqc_1.txt,fastqc_2.txt"/>
+                </repeat>
+            </conditional>
+        </repeat>
+        <param name="title" value="Title of the report"/>
+        <param name="comment" value="Commment for the report"/>
+        <param name="flat" value="true"/>
+        <param name="export" value="true"/>
+        <output name="html_report">
+            <assert_contents>
+                <has_text text="Title of the report" />
+                <has_text text="Commment for the report" />
+                <has_text text="fastqc_seq_heatmap_key_t" />
+            </assert_contents>
+        </output>
+        <output name="stats">
+            <assert_contents>
+                <has_text text="poulet5_1"/>
+                <has_text text="poulet5_2"/>
+                <has_text text="FastQC_mqc_generalstats_fastqc_median_sequence_length"/>
+                <has_n_lines n="3"/>
+                <has_n_columns n="7"/>
+            </assert_contents>
+        </output>
+        <output_collection name="plots" type="list" count="7"/>
+    </test>
+</xml>
+
+
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/featurecounts_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,50 @@
+<macros>
+    <token name="@FEATURECOUNTS_COMMAND@"><![CDATA[
+        #for $file in $repeat.software_cond.input
+            @ESCAPE_IDENTIFIER@
+            #set file_prefix = os.path.join($software_dir, str($identifier))
+            if grep -qw Status '$file'; then
+                ln -s '$file' '${file_prefix}.summary';
+            else
+                echo -e 'Status\t${identifier}' > '${file_prefix}.summary';
+                cat '$file' >> '${file_prefix}.summary';
+            fi &&
+        #end for
+    ]]></token>
+    <xml name="featurecounts_form">
+        <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of FeatureCounts"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="featurecounts_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="featureCounts"/>
+                    <param name="input" value="featureCounts.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="featureCounts_assignment_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="featureCounts_mqc_generalstats_featurecounts_Assigned"/>
+                    <has_text text="accepted_hits"/>
+                    <has_text text="TopHat"/>
+                    <has_text text="featureCounts_mqc_generalstats_featurecounts_percent_assigned"/>
+                    <has_n_lines n="7"/>
+                    <has_n_columns n="3"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flexbar_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,40 @@
+<macros>
+    <token name="@FLEXBAR_COMMAND@"><![CDATA[
+        #set $pattern = "flexible barcode and adapter removal"
+        @LN_FILES@
+    ]]></token>
+    <xml name="flexbar_form">
+        <param name="input" type="data" format="txt,tabular,tsv,csv" label="Output of Flexbar" help="It should contain 'Flexbar - flexible barcode and adapter removal" multiple="true"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="flexbar_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="flexbar"/>
+                    <param name="input" value="flexbar.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="flexbar_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="Flexbar_mqc_generalstats_flexbar_removed_bases_pct"/>
+                    <has_text text="result_right"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="2"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gatk_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,59 @@
+<macros>
+    <token name="@GATK_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            #if str($repeat2.type) == "varianteval"
+                #set $pattern = "#:GATKTable:TiTvVariantEvaluator"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "base_recalibrator"
+                #set $pattern = "#:GATKTable:Arguments:Recalibration"
+                @LN_2_FILES@
+            #end if
+        #end for
+    ]]></token>
+    <xml name="gatk_form">
+        <repeat name="output" title="GATK output" min="1">
+            <param name="type" type="select" label="Type of GATK output?">
+                <option value="varianteval">Variant eval file</option>
+                <option value="base_recalibrator">Base recalibrator file</option>
+            </param>
+            <param name="input" type="data" format="txt" multiple="true" label="GATK output"/>
+        </repeat>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="gatk_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="gatk"/>
+                    <repeat name="output">
+                        <param name="type" value="base_recalibrator"/>
+                        <param name="input" value="gatk_BaseRecalibrator.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="varianteval"/>
+                        <param name="input" value="gatk_varianteval.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="gatk_varianteval_variant_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="gatk_varianteval_txt"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="3"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="4"/>
+        </test>
+    </xml>
+</macros>
--- a/macros.xml	Sat Dec 10 11:22:18 2022 +0000
+++ b/macros.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -1,6 +1,6 @@
 <macros>
-    <token name="@TOOL_VERSION@">1.11</token>
-    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@TOOL_VERSION@">1.24.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
     <xml name="bio_tools">
         <xrefs>
             <xref type="bio.tools">multiqc</xref>
@@ -9,14 +9,46 @@
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">multiqc</requirement>
-         </requirements>
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1101/gr.244293.118</citation>
+        </citations>
     </xml>
-
+    <xml name="configfile">
+        <configfiles>
+            <configfile name="multiqc_config">
+<![CDATA[
+custom_data:
+#for $i, $repeat in enumerate( $results )
+    #if str($repeat.software_cond.software) == "custom_content"
+    section_$i:
+        file_format: 'tsv'
+        section_name: '$repeat.software_cond.section_name'
+        title: '$repeat.software_cond.title'
+        description: '$repeat.software_cond.description'
+        plot_type: '$repeat.software_cond.plot_type'
+        pconfig:
+            id: 'section_${i}_${repeat.software_cond.plot_type}'
+            ylab: '$repeat.software_cond.ylab'
+            xlab: '$repeat.software_cond.xlab'
+    #end if
+#end for
+sp:
+#for $i, $repeat in enumerate( $results )
+    #if str($repeat.software_cond.software) == "custom_content"
+    section_$i:
+        fn: 'file_${i}_*'
+    #end if
+#end for
+        ]]></configfile>
+        </configfiles>
+    </xml>
     <token name="@ESCAPE_IDENTIFIER@">
         <![CDATA[
         #set identifier = re.sub('[^\s\w\-]', '_', str($file.element_identifier))
     ]]></token>
-
     <token name="@CHECK_LN_FILE@">
         <![CDATA[
         #if $file_path in $file_paths
@@ -26,33 +58,25 @@
         grep -q '$pattern' $file || die "Module '${repeat.software_cond.software}: '$pattern' not found in the file '$identifier'" &&
         ln -s '$file' '$file_path'  &&
     ]]></token>
-        
     <token name="@CREATE_REPEAT_DIR_1@">
         <![CDATA[
         #set repeat_dir = os.path.join($software_dir, str($repeat2.type) + '_' + str($j))
         mkdir '$repeat_dir' &&
     ]]></token>
-
-    <token name="@CREATE_REPEAT_DIR_1@">
-        <![CDATA[
-        #set repeat_dir = os.path.join($software_dir, str($repeat2.type) + '_' + str($j))
-        mkdir '$repeat_dir' &&
-                ]]></token>
-                <token name="@CREATE_REPEAT_DIR_2@">
+    <token name="@CREATE_REPEAT_DIR_2@">
         <![CDATA[
         #set repeat_dir = os.path.join($software_dir, str($repeat2.type.type) + '_' + str($j))
         mkdir '$repeat_dir' &&
-                ]]></token>
-                <token name="@LN_FILES@">
+    ]]></token>
+    <token name="@LN_FILES@">
         <![CDATA[
         #set file_paths = []
-        #for $file in $repeat.software_cond.input
+        #for $file in $repeat.software_cond.input:
             @ESCAPE_IDENTIFIER@
             #set file_path = os.path.join($software_dir, str($identifier))
             @CHECK_LN_FILE@
         #end for
     ]]></token>
-
     <token name="@LN_2_FILES@">
         <![CDATA[
         #set file_paths = []
@@ -63,7 +87,6 @@
             @CHECK_LN_FILE@
         #end for
     ]]></token>
-
     <token name="@LN_3_FILES@">
         <![CDATA[
         #set file_paths = []
@@ -73,293 +96,7 @@
             @CHECK_LN_FILE@
         #end for
     ]]></token>
-
-    <token name="@BISMARK_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_1@
-            #if str($repeat2.type) == "align"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_SE_report.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "dedup"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_deduplication_report.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "meth_extract"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_splitting_report.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "m_bias"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_M-bias.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "bam2nuc"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.nucleotide_stats.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@DEEPTOOLS_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            #if str($repeat2.type) == "bamPEFragmentSize"
-                #set $pattern = "Frag."
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "estimateReadFiltering"
-                #set $pattern = "Internally-determined Duplicate"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "plotCoverageStdout"
-                #set $pattern = "sample"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "plotCoverageOutRawCounts"
-                #set $pattern = "#plotCoverage --outRawCounts"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "plotEnrichment"
-                #set $pattern = "featureReadCount"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "plotFingerprintOutRawCounts"
-                #set $pattern = "#plotFingerprint --outRawCounts"
-                @LN_2_FILES@
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@PICCARD_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            #if str($repeat2.type) == "alignment_metrics"
-                #set $pattern = "picard.analysis.AlignmentSummaryMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "basedistributionbycycle"
-                #set $pattern = "picard.analysis.BaseDistributionByCycleMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "gcbias"
-                #set $pattern = "picard.analysis.GcBias"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "hsmetrics"
-                #set $pattern = "picard.analysis.directed.HsMetrics"
-                @   @
-            #elif str($repeat2.type) == "insertsize"
-                #set $pattern = "picard.analysis.InsertSizeMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "markdups"
-                #set $pattern = "MarkDuplicates"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "oxogmetrics"
-                #set $pattern = "picard.analysis.CollectOxoGMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "pcr_metrics"
-                #set $pattern = "picard.analysis.directed.TargetedPcrMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "rnaseqmetrics"
-                #set $pattern = "Collect"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "rrbs_metrics"
-                #set $pattern = "picard.analysis.RrbsSummaryMetrics"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "wgs_metrics"
-                #set $pattern = "picard.analysis.CollectWgsMetrics$WgsMetrics"
-                @LN_2_FILES@
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@FASTQC_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_1@
-            #if str($repeat2.type) == "data"
-                #for $k, $file in enumerate($repeat2.input)
-                    #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
-                    #set file_path = os.path.join($file_dir, 'fastqc_data.txt')
-                    mkdir '$file_dir' &&
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "theoretical_gc"
-                #for $file in $repeat2.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_fastqc_theoretical_gc')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@RSEQ_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_2@
-            #if str($repeat2.type.type) == "bam_stat"
-                #set $pattern = "Proper-paired reads map to different chrom:"
-                @LN_3_FILES@
-            #elif str($repeat2.type.type) == "gene_body_coverage"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.geneBodyCoverage.txt')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "inner_distance"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.inner_distance_freq.txt')
-                    ln -s '${file}' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "junction_annotation"
-                #set $pattern = "Partial Novel Splicing Junctions:"
-                @LN_3_FILES@
-            #elif str($repeat2.type.type) == "read_gc"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.GC.xls')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "junction_saturation"
-                #for $k, $file in enumerate($repeat2.type.input)
-                #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.junctionSaturation_plot.r')
-                    ln -s '${file}' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "read_distribution"
-                #set $pattern = "Group               Total_bases         Tag_count           Tags/Kb"
-                @LN_3_FILES@
-            #elif str($repeat2.type.type) == "read_duplication_pos"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.pos.DupRate.xls')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "infer_experiment"
-                #set $pattern = "Fraction of reads explained by"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier))
-                    grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@VCFTOOLS_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_2@
-            #if str($repeat2.type.type) == "relatedness2"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.relatedness2')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "tstv_by_count"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.count')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "tstv_by_qual"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.qual')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type) == "tstv_summary"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.summary')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-    
-    <token name="@QUALIMAP_INPUT@"><![CDATA[
-        #for $file in $repeat.software_cond.input
-            #if re.search("genome_results", str($file.element_identifier))
-                sample="\$(grep 'bam file = ' $file | sed 's/bam file = //g' | sed 's: ::g')" &&
-                dir_name="$software_dir/\${sample}" &&
-                mkdir -p \${dir_name} &&
-                filepath_1="\${dir_name}/genome_results.txt" &&
-                ln -sf '$file' \${filepath_1} &&
-            #elif re.search("coverage_histogram", str($file.element_identifier))
-                nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
-                mkdir -p \${nested_dir_name} &&
-                filepath_2="\${nested_dir_name}/coverage_histogram.txt" &&
-                ln -sf '$file' \${filepath_2} &&
-            #elif re.search("gc-content_distribution", str($file.element_identifier))
-                nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
-                mkdir -p \${nested_dir_name} &&
-                filepath_3="\${nested_dir_name}/mapped_reads_gc-content_distribution.txt" &&
-                ln -sf '$file' \${filepath_3} &&
-            #else
-                #pass
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@SALMON_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_2@
-            #if str($repeat2.type.type) == "meta"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
-                    #set file_path = os.path.join($file_dir, 'meta_info.json')
-                    mkdir '$file_dir' &&
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "fld"
-                #for $k, $file in enumerate($repeat2.type.input)
-                    #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
-                    #set file_path = os.path.join($file_dir,'flenDist.txt')
-                    mkdir '$file_dir' &&
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@SAMTOOLS_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_2@
-            #if str($repeat2.type.type) == "stats"
-                #set $pattern = "This file was produced by samtools stats"
-                @LN_3_FILES@
-            #elif str($repeat2.type.type) == "flagstat"
-                #set $pattern = "in total (QC-passed reads + QC-failed reads)"
-                @LN_3_FILES@
-            #elif str($repeat2.type.type) == "idxstats"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_idxstat')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "rmdup"
-                #set $pattern = "[bam_rmdup"
-                @LN_3_FILES@
-            #end if
-        #end for
-    ]]></token>
-
-    <token name="@STAR_INPUT@"><![CDATA[
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            @CREATE_REPEAT_DIR_2@
-            #if str($repeat2.type.type) == "log"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_Log.final.out')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #elif str($repeat2.type.type) == "genecounts"
-                #for $file in $repeat2.type.input
-                    @ESCAPE_IDENTIFIER@
-                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_ReadsPerGene.out.tab')
-                    ln -s '$file' '$file_path' &&
-                #end for
-            #end if
-        #end for
-    ]]></token>
-
+    <!-- is currently not used -->
     <xml name="element_assert" token_name="" token_lines="" token_columns="" token_text="">
         <element name="@NAME@">
             <assert_contents>
@@ -370,10 +107,499 @@
             </assert_contents>
         </element>
     </xml>
-
-    <xml name="citations">
-        <citations>
-            <citation type="doi">10.1101/gr.244293.118</citation>
-        </citations>
+    <xml name="general_tests">
+        <!--Test 01-->
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="cutadapt"/>
+                    <param name="input" value="cutadapt.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="fastp"/>
+                    <param name="input" value="fastp1.json.txt,fastp2.json.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="fastqc"/>
+                    <repeat name="output">
+                        <param name="type" value="data"/>
+                        <param name="input" value="fastqc_1.txt,fastqc_2.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="flexbar"/>
+                    <param name="input" value="flexbar.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="slamdunk"/>
+                    <param name="input" value="slamdunk_summary.txt,slamdunk_reads1_overallrates.csv,slamdunk_reads2_overallrates.csv"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="sortmerna"/>
+                    <param name="input" value="sortmerna.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="trimmomatic"/>
+                    <param name="input" value="trimmomatic.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="cutadapt_trimmed_sequences_plot"/>
+                    <has_text text="All-in-one FASTQ preprocessor"/>
+                    <has_text text="fastqc_seq_heatmap_key_t"/>
+                    <has_text text="flexbar_plot"/>
+                    <has_text text="Slamdunk"/>
+                    <has_text text="sortmerna-detailed-plot"/>
+                    <has_text text="trimmomatic_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="dataset_33"/>
+                    <has_text text="R1_fq"/>
+                    <has_text text="poulet5_1"/>
+                    <has_text text="result_right"/>
+                    <has_text text="bwa-mem-fastq1_fq"/>
+                    <has_text text="25839_merged"/>
+                    <has_text text="Slamdunk_mqc_generalstats_slamdunk_retained"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="11"/>
+                    <has_n_columns n="22"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="29"/>
+        </test>
+        <!--Test 02-->
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bismark"/>
+                    <repeat name="output">
+                        <param name="type" value="align"/>
+                        <param name="input" value="bismark.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bowtie2"/>
+                    <param name="input" value="bowtie2_1.txt,bowtie2_2.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="hisat2"/>
+                    <param name="input" value="hisat2_1.txt,hisat2_2.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="hicexplorer"/>
+                    <param name="input" value="hicexplorer1.log,hicexplorer1.log,hicexplorer2.log"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="kallisto"/>
+                    <param name="input" value="kallisto_1.txt,kallisto_2.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="macs2"/>
+                    <param name="input" value="macs_1.txt,macs_2.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="star"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="log"/>
+                            <param name="input" value="star_log.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="genecounts"/>
+                            <param name="input" value="star_counts.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="tophat"/>
+                    <param name="input" value="tophat.txt"/>
+                </conditional>
+            </repeat>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="bismark-alignment"/>
+                    <has_text text="bowtie2_se_plot"/>
+                    <has_text text="mqc-module-section-bowtie2"/>
+                    <has_text text="hisat2_se_plot"/>
+                    <has_text text="MACS2"/>
+                    <has_text text="star_alignment_plot"/>
+                    <has_text text="tophat_alignment"/>
+                    <has_text text="hicexplorer"/>
+                    <has_text text="hicexplorer1_log_1"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="bismark_txt_SE_report"/>
+                    <has_text text="bowtie2_1_txt"/>
+                    <has_text text="HS002-PE-R00059_BD0U5YACXX.RHM067_CAGATC_L002_R2"/>
+                    <has_text text="treat2"/>
+                    <has_text text="hicexplorer_3_hicexplorer2_log_small_test_rf"/>
+                    <has_text text="hisat2_2_txt"/>
+                    <has_text text="HS002-PE-R00059_BD0U5YACXX.RHM067_CAGATC_L002_R1"/>
+                    <has_text text="treat2"/>
+                    <has_text text="Cutadapt"/>
+                    <has_text text="star_log_txt"/>
+                    <has_text text="tophat_txtalign"/>
+                    <has_n_lines n="17"/>
+                    <has_n_columns n="23"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!--Test 03-->
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bamtools"/>
+                    <param name="input" value="bamtools.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="bcftools"/>
+                    <param name="input" value="bcftools.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="busco"/>
+                    <param name="input" value="busco.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="deeptools"/>
+                    <repeat name="output">
+                        <param name="type" value="bamPEFragmentSize"/>
+                        <param name="input" value="deeptools_bamPEFragmentSize.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="estimateReadFiltering"/>
+                        <param name="input" value="deeptools_estimateReadFiltering.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="plotCoverageStdout"/>
+                        <param name="input" value="deeptools_plotCoverageStdout.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="plotCoverageOutRawCounts"/>
+                        <param name="input" value="deeptools_plotCoverageOutRawCounts.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="plotEnrichment"/>
+                        <param name="input" value="deeptools_plotEnrichment.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="plotFingerprintOutRawCounts"/>
+                        <param name="input" value="deeptools_plotFingerprintOutRawCounts.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="featureCounts"/>
+                    <param name="input" value="featureCounts.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="gatk"/>
+                    <repeat name="output">
+                        <param name="type" value="base_recalibrator"/>
+                        <param name="input" value="gatk_BaseRecalibrator.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="varianteval"/>
+                        <param name="input" value="gatk_varianteval.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="htseq"/>
+                    <param name="input" value="htseq.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="picard"/>
+                    <repeat name="output">
+                        <param name="type" value="gcbias"/>
+                        <param name="input" value="picard_collectGcBias.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="insertsize"/>
+                        <param name="input" value="picard_CollectInsertSizeMetrics.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="markdups"/>
+                        <param name="input" value="picard_MarkDuplicates.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="basedistributionbycycle"/>
+                        <param name="input" value="picard_CollectBaseDistributionByCycle.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="rnaseqmetrics"/>
+                        <param name="input" value="picard_CollectRnaSeqMetrics.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="alignment_metrics"/>
+                        <param name="input" value="picard_CollectAlignmentSummaryMetrics.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="prokka"/>
+                    <param name="input" value="prokka_1.txt,prokka_2.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="qualimap"/>
+                    <param name="input" value="genome_results.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="quast"/>
+                    <param name="input" value="quast.tsv"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="rseqc"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="read_gc"/>
+                            <param name="input" value="rseqc.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="samblaster"/>
+                    <param name="input" value="samblaster.txt"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="samtools"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="stats"/>
+                            <param name="input" value="samtools_stats.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="flagstat"/>
+                            <param name="input" value="samtools_flagstat.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="idxstats"/>
+                            <param name="input" value="samtools_idxstats.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="snpeff"/>
+                    <param name="input" value="snpeff.csv" ftype="csv"/>
+                </conditional>
+            </repeat>
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="vcftools"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="tstv_by_qual"/>
+                            <param name="input" value="vcftools.txt"/>
+                        </conditional>
+                    </repeat>
+                    <param name="input" value="vcftools.txt"/>
+                </conditional>
+            </repeat>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="bamtools-stats"/>
+                    <has_text text="bcftools_stats_indel-lengths"/>
+                    <has_text text="busco-lineage-fungi_odb9"/>
+                    <has_text text="deeptools"/>
+                    <has_text text="featureCounts_assignment_plot"/>
+                    <has_text text="gatk_varianteval_variant_plot"/>
+                    <has_text text="htseq_assignment_plot"/>
+                    <has_text text="picard_alignment_readlength"/>
+                    <has_text text="picard-rna-assignment"/>
+                    <has_text text="picard-markduplicates"/>
+                    <has_text text="picard-insertsize"/>
+                    <has_text text="picard-gcbias"/>
+                    <has_text text="prokka_plot"/>
+                    <has_text text="qualimap"/>
+                    <has_text text="samblaster_duplicates"/>
+                    <has_text text="quast-stats"/>
+                    <has_text text="samtools-flagstat-dp"/>
+                    <has_text text="snpeff"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="bamtools_txt"/>
+                    <has_text text="Test1"/>
+                    <has_text text="Prokka_mqc_generalstats_prokka_contigs"/>
+                    <has_text text="5: TopHat on data 1, data 14, and data 13"/>
+                    <has_text text="gatk_varianteval_txt"/>
+                    <has_text text="x_bam"/>
+                    <has_text text="htseq_txt"/>
+                    <has_text text="picard_CollectRnaSeqMetrics_bam"/>
+                    <has_text text="dataset_114"/>
+                    <has_text text="Helicobacter pylori"/>
+                    <has_text text="Sample2"/>
+                    <has_text text="14892_1#15"/>
+                    <has_text text="samtools_flagstat_txt"/>
+                    <has_text text="mapped_passed"/>
+                    <has_text text="stats_mqc_generalstats_samtools_stats_error_rate"/>
+                    <has_text text="samtools_stats_txt"/>
+                    <has_text text="snpeff_csv"/>
+                    <has_text text="Bamtools"/>
+                    <has_n_lines n="22"/>
+                    <has_n_columns n="46"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!--Test 04-->
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="custom_content"/>
+                    <param name="cc_select" value="manual"/>
+                    <param name="plot_type" value="linegraph"/>
+                    <param name="section_name" value="BPC"/>
+                    <param name="description" value="Sum of intensity (Y) of the most intense peaks at each retention time(X)"/>
+                    <param name="xlab" value="Retention Time"/>
+                    <param name="ylab" value="Base Peak Intensity"/>
+                    <param name="input" value="cc_ko15.bpc.tab,cc_wt15.bpc.tab"/>
+                </conditional>
+            </repeat>
+            <output name="html_report" ftype="html">
+                <assert_contents>
+                    <has_size value="4594258" delta="500"/>
+                </assert_contents>
+            </output>
+            <!--output name="stats" ftype="tabular">
+                Not created anymore. Proper test needed.
+                <assert_contents>
+                    <has_n_lines n="2" />
+                </assert_contents>
+            </output-->
+        </test>
+        <!--Test 05-->
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="fastqc"/>
+                    <repeat name="output">
+                        <param name="type" value="data"/>
+                        <param name="input" value="fastqc_1.txt,fastqc_2.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="fastqc_seq_heatmap_key_t"/>
+                </assert_contents>
+            </output>
+            <output name="stats" ftype="tabular">
+                <assert_contents>
+                    <has_text text="poulet5_2"/>
+                    <has_text text="FastQC"/>
+                    <has_n_lines n="3"/>
+                    <has_n_columns n="7"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="7">
+                <element name="fastqc_per_base_sequence_quality_plot" file="mqc_fastqc_per_base_sequence_quality_plot_1.txt">
+                    <assert_contents>
+                        <has_size size="2877" delta="200"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
+        <!--Test 06-->
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="pycoqc"/>
+                    <param name="input" value="pycoqc.json"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <!-- <param name="flat" value="true"/> -->
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="General Statistics"/>
+                    <has_text text="pycoqc_count_plot"/>
+                    <has_text text="pycoqc_read_len_plot"/>
+                    <has_text text="pycoqc_read_qual_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats" ftype="tabular">
+                <assert_contents>
+                    <has_text text="pycoQC_mqc_generalstats_pycoqc_passed_median_read_length"/>
+                    <has_text text="pycoqc_json"/>
+                </assert_contents>
+            </output>
+        </test>
     </xml>
 </macros>
--- a/multiqc.xml	Sat Dec 10 11:22:18 2022 +0000
+++ b/multiqc.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -1,11 +1,31 @@
 <tool id="multiqc" name="MultiQC" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
     <description>aggregate results from bioinformatics analyses into a single report</description>
-
     <macros>
         <import>macros.xml</import>
+        <import>bamtools_plugin.xml</import>
+        <import>bcftools_plugin.xml</import>
+        <import>bismark_plugin.xml</import>
+        <import>bowtie2_plugin.xml</import>
+        <import>busco_plugin.xml</import>
+        <import>cutadapt_plugin.xml</import>
+        <import>deeptools_plugin.xml</import>
+        <import>fastqc_plugin.xml</import>
+        <import>fastp_plugin.xml</import>
+        <import>featurecounts_plugin.xml</import>
+        <import>flexbar_plugin.xml</import>
+        <import>gatk_plugin.xml</import>
+        <import>picard_plugin.xml</import>
+        <import>pycoqc_plugin.xml</import>
+        <import>qualimap_plugin.xml</import>
+        <import>rseqc_plugin.xml</import>
+        <import>salmon_plugin.xml</import>
+        <import>samtools_plugin.xml</import>
+        <import>star_plugin.xml</import>
+        <import>trimmomatic_plugin.xml</import>
+        <import>vcftools_plugin.xml</import>
     </macros>
     <expand macro="bio_tools"/>
-    <expand macro='requirements' />
+    <expand macro="requirements"/>
     <version_command>multiqc --version</version_command>
     <command detect_errors="aggressive">
 <![CDATA[
@@ -22,69 +42,29 @@
     #set software_dir = os.path.join('multiqc_WDir', str($repeat.software_cond.software) + '_' + str($i))
     mkdir $software_dir &&
     #if str($repeat.software_cond.software) == "bamtools"
-        #set $pattern = "Stats for BAM file(s)"
-        @LN_FILES@
+        @BAMTOOLS_COMMAND@
     #elif str($repeat.software_cond.software) == "bcftools"
-        #set $pattern = "This file was produced by bcftools stats"
-        @LN_FILES@
+        @BCFTOOLS_COMMAND@
     #elif str($repeat.software_cond.software) == "bismark"
-        @BISMARK_INPUT@
+        @BISMARK_COMMAND@
     #elif str($repeat.software_cond.software) == "bowtie2"
-        #set $pattern = "% overall alignment rate"
-        @LN_FILES@
+        @BOWTIE2_COMMAND@
     #elif str($repeat.software_cond.software) == "busco"
-        ## Searches for files "short_summary_[samplename].txt"
-        #for $file in $repeat.software_cond.input
-            @ESCAPE_IDENTIFIER@
-            #set file_path = os.path.join($software_dir, 'short_summary_' + str($identifier))
-            ln -s '$file' '$file_path' &&
-        #end for
+        @BUSCO_COMMAND@
     #elif str($repeat.software_cond.software) == "cutadapt"
-        #set $pattern = "This is cutadapt"
-        #for $file in $repeat.software_cond.input
-            @ESCAPE_IDENTIFIER@
-            #set file_path = os.path.join($software_dir, str($identifier) + '.txt')
-            ln -s '$file' '$file_path' &&
-            ## replace header for old cutadapt release
-            sed -i.old 's/You are running/This is/' '$file_path' &&
-            grep -q "$pattern" '$file_path' || die "'$pattern' or 'You are running cutadapt' not found in the file" &&
-        #end for
+        @CUTADAPT_COMMAND@
     #elif str($repeat.software_cond.software) == "deeptools"
-      @DEEPTOOLS_INPUT@
+        @DEEPTOOLS_COMMAND@
     #elif str($repeat.software_cond.software) == "fastp"
-        #set $pattern = "report_title"
-        #for $file in $repeat.software_cond.input
-            @ESCAPE_IDENTIFIER@
-            #set file_path = os.path.join($software_dir, str($identifier) + 'fastp.json')
-            ln -s '$file' '$file_path' &&
-            grep -q "$pattern" '$file_path' || die "'$pattern' or 'report_title' not found in the file" &&
-        #end for
+        @FASTP_COMMAND@
     #elif str($repeat.software_cond.software) == "fastqc"
-        @FASTQC_INPUT@
+        @FASTQC_COMMAND@
     #elif str($repeat.software_cond.software) == "featureCounts"
-        #for $file in $repeat.software_cond.input
-            @ESCAPE_IDENTIFIER@
-            #set file_prefix = os.path.join($software_dir, str($identifier))
-            if grep -qw Status '$file'; then
-                ln -s '$file' '${file_prefix}.summary';
-            else
-                echo -e 'Status\t${identifier}' > '${file_prefix}.summary';
-                cat '$file' >> '${file_prefix}.summary';
-            fi &&
-        #end for
+        @FEATURECOUNTS_COMMAND@
     #elif str($repeat.software_cond.software) == "flexbar"
-        #set $pattern = "flexible barcode and adapter removal"
-        @LN_FILES@
+        @FLEXBAR_COMMAND@
     #elif str($repeat.software_cond.software) == "gatk"
-        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
-            #if str($repeat2.type) == "varianteval"
-                #set $pattern = "#:GATKTable:TiTvVariantEvaluator"
-                @LN_2_FILES@
-            #elif str($repeat2.type) == "base_recalibrator"
-                #set $pattern = "#:GATKTable:Arguments:Recalibration"
-                @LN_2_FILES@
-            #end if
-        #end for
+        @GATK_COMMAND@
     #elif str($repeat.software_cond.software) == "hicup"
         #for $file in $repeat.software_cond.input
             @ESCAPE_IDENTIFIER@
@@ -112,15 +92,14 @@
             ln -s '$file' '$file_path' &&
         #end for
     #elif str($repeat.software_cond.software) == "picard"
-        @PICCARD_INPUT@
+        @PICARD_COMMAND@
     #elif str($repeat.software_cond.software) == "prokka"
         #set $pattern = "contigs:"
         @LN_FILES@
     #elif str($repeat.software_cond.software) == "pycoqc"
-        #set $pattern = "\"pycoqc\":"
-        @LN_FILES@
+        @PYCOQC_COMMAND@
     #elif str($repeat.software_cond.software) == "qualimap"
-        @QUALIMAP_INPUT@
+        @QUALIMAP_COMMAND@
     #elif str($repeat.software_cond.software) == "quast"
         #for $k, $file in enumerate($repeat.software_cond.input)
             #set file_dir = os.path.join($software_dir, 'file_' + str($k))
@@ -135,14 +114,14 @@
             ln -s '$file' '$file_path' &&
         #end for
     #elif str($repeat.software_cond.software) == "rseqc"
-        @RSEQ_INPUT@
+        @RSEQC_COMMAND@
     #elif str($repeat.software_cond.software) == "salmon"
-        @SALMON_INPUT@
+        @SALMON_COMMAND@
     #elif str($repeat.software_cond.software) == "samblaster"
         #set $pattern = "samblaster: Version"
         @LN_FILES@
     #elif str($repeat.software_cond.software) == "samtools"
-        @SAMTOOLS_INPUT@
+        @SAMTOOLS_COMMAND@
     #elif str($repeat.software_cond.software) == "slamdunk"
         #set $pattern = "# slamdunk"
         @LN_FILES@
@@ -153,7 +132,7 @@
         #set $pattern = "Minimal SW score based on E-value"
         @LN_FILES@
     #else if str($repeat.software_cond.software) == "star":
-        @STAR_INPUT@
+        @STAR_COMMAND@
     #elif str($repeat.software_cond.software) == "tophat"
         #for $file in $repeat.software_cond.input
             @ESCAPE_IDENTIFIER@
@@ -161,10 +140,9 @@
             ln -s '$file' '$file_path' &&
         #end for
     #elif str($repeat.software_cond.software) == "trimmomatic"
-        #set $pattern = "Trimmomatic"
-        @LN_FILES@
+        @TRIMMOMATIC_COMMAND@
     #elif str($repeat.software_cond.software) == "vcftools"
-        @VCFTOOLS_INPUT@
+        @VCFTOOLS_COMMAND@
     #else if str($repeat.software_cond.software) == "custom_content":
         #set $configfile = "T"
         #for $j, $file in enumerate( $repeat.software_cond.input )
@@ -191,34 +169,15 @@
 #if $configfile == "T"
     --config '$multiqc_config'
 #end if
+
+&&
+mkdir -p ./plots &&
+ls -l ./report_data/ &&
+##cat ./report_data/multiqc_busco.txt &&
+cp ./report_data/*plot*.txt ./plots/ | true ## don't fail if no plot files are generated
+
     ]]></command>
-    <configfiles>
-        <configfile name="multiqc_config">
-<![CDATA[
-custom_data:
-#for $i, $repeat in enumerate( $results )
-    #if str($repeat.software_cond.software) == "custom_content"
-    section_$i:
-        file_format: 'tsv'
-        section_name: '$repeat.software_cond.section_name'
-        title: '$repeat.software_cond.title'
-        description: '$repeat.software_cond.description'
-        plot_type: '$repeat.software_cond.plot_type'
-        pconfig:
-            id: 'section_${i}_${repeat.software_cond.plot_type}'
-            ylab: '$repeat.software_cond.ylab'
-            xlab: '$repeat.software_cond.xlab'
-    #end if
-#end for
-sp:
-#for $i, $repeat in enumerate( $results )
-    #if str($repeat.software_cond.software) == "custom_content"
-    section_$i:
-        fn: 'file_${i}_*'
-    #end if
-#end for
-        ]]></configfile>
-    </configfiles>
+    <expand macro="configfile"/>
     <inputs>
         <repeat name="results" title="Results" min="1">
             <conditional name="software_cond">
@@ -287,7 +246,7 @@
                     <option value="star">STAR</option>
                     <!--<option value="supernova">Supernova</option>-->
                     <!--<option value="theta2">THeTA2</option>-->
-                    <option value="tophat">TopHat2</option>
+                    <option value="tophat">TopHat2 (TopHat2 is deprecated you should not use it)</option>
                     <option value="trimmomatic">Trimmomatic</option>
                     <option value="vcftools">VCFTools</option>
                     <!--<option value="verifybamid">VerifyBAMID</option>-->
@@ -295,74 +254,40 @@
                     <option value="custom_content">Custom Content</option>
                 </param>
                 <when value="bamtools">
-                    <param name="input" type="data" format="txt" multiple="true" label="Output of BAMtools" help="It should contain 'Stats for BAM file(s)'"/>
+                    <expand macro="bamtools_form"/>
                 </when>
                 <when value="bcftools">
-                    <param name="input" type="data" format="txt" multiple="true" label="Output of BAMtools" help="It should contain 'This file was produced by bcftools stats'"/>
+                    <expand macro="bcftools_form"/>
                 </when>
                 <when value="bismark">
-                    <repeat name="output" title="Bismark output" min="1">
-                        <param name="type" type="select" label="Type of Bismark output?">
-                            <option value="align">Alignment file</option>
-                            <option value="dedup">Deduplication file</option>
-                            <option value="meth_extract">Methylation file</option>
-                            <option value="m_bias">m_bias file</option>
-                            <option value="bam2nuc">bam2nuc file</option>
-                        </param>
-                        <param name="input" type="data" format="txt" multiple="true" label="Bismark output"/>
-                    </repeat>
+                    <expand macro="bismark_form"/>
                 </when>
                 <when value="bowtie2">
-                    <param name="input" type="data" format="txt" multiple="true" label="Output of Bowtie 2" help="It should contain 'reads; of these:'"/>
+                    <expand macro="bowtie2_form"/>
                 </when>
                 <when value="busco">
-                    <param name="input" type="data" format="txt" multiple="true" label="Output of BUSCO"/>
+                    <expand macro="busco_form"/>
                 </when>
                 <when value="cutadapt">
-                    <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Cutadapt" help="It should contain 'This is cutadapt' or 'You are running cutadapt'"/>
+                    <expand macro="cutadapt_form"/>
                 </when>
                 <when value="deeptools">
-                    <repeat name="output" title="deepTools output" min="1">
-                        <param name="type" type="select" label="deepTool used to generate the output?">
-                            <option value="bamPEFragmentSize">bamPEFragmentSize</option>
-                            <option value="estimateReadFiltering">estimateReadFiltering</option>
-                            <option value="plotCoverageStdout">plotCoverageStdout</option>
-                            <option value="plotCoverageOutRawCounts">plotCoverageOutRawCounts</option>
-                            <option value="plotEnrichment">plotEnrichment</option>
-                            <option value="plotFingerprintOutRawCounts">plotFingerprintOutRawCounts</option>
-                            <option value="plotFingerprintOutQualityMetrics">plotFingerprintOutQualityMetrics</option>
-                        </param>
-                        <param name="input" type="data" format="txt" multiple="true" label="Bismark output"/>
-                    </repeat>
+                    <expand macro="deeptools_form"/>
                 </when>
                 <when value="fastp">
-                    <param name="input" type="data" format="json" multiple="true" label="Output of fastp" help="It should be the json report from fastp containing 'report_title'"/>
+                    <expand macro="fastp_form"/>
                 </when>
                 <when value="fastqc">
-                    <repeat name="output" title="FastQC output" min="1">
-                        <param name="type" type="select" label="Type of FastQC output?">
-                            <option value="data">Raw data</option>
-                            <option value="theoretical_gc">Theorectical GC</option>
-                        </param>
-                        <param name="input" type="data" format="txt" multiple="true" label="FastQC output">
-                            <validator type="expression" message="MultiQC does not accept the HTML report generated by FastQC, only the Raw Data">value is not None and value.extension != "html"</validator>
-                        </param>
-                    </repeat>
+                    <expand macro="fastqc_form"/>
                 </when>
                 <when value="featureCounts">
-                    <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of FeatureCounts"/>
+                    <expand macro="featurecounts_form"/>
                 </when>
                 <when value="flexbar">
-                    <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Flexbar" help="It should contain 'Flexbar - flexible barcode and adapter removal'"/>
+                    <expand macro="flexbar_form"/>
                 </when>
                 <when value="gatk">
-                    <repeat name="output" title="GATK output" min="1">
-                        <param name="type" type="select" label="Type of GATK output?">
-                            <option value="varianteval">Variant eval file</option>
-                            <option value="base_recalibrator">Base recalibrator file</option>
-                        </param>
-                        <param name="input" type="data" format="txt" multiple="true" label="GATK output"/>
-                    </repeat>
+                    <expand macro="gatk_form"/>
                 </when>
                 <when value="hicexplorer">
                     <param name="input" type="data" format="txt,tabular" multiple="true" label="Output of HiCExplorer" help="It should contain 'Min rest. site distance'"/>
@@ -380,105 +305,28 @@
                     <param name="input" type="data" format="txt,tabular,tsv" multiple="true" label="Output of MACS2" help="It should be a tabular file containing '# This file is generated by MACS'"/>
                 </when>
                 <when value="picard">
-                    <repeat name="output" title="Picard output" min="1">
-                        <param name="type" type="select" label="Type of Picard output?">
-                            <option value="alignment_metrics">Alignment metrics</option>
-                            <option value="basedistributionbycycle">Base distribution by cycle</option>
-                            <option value="gcbias">GC bias</option>
-                            <option value="hsmetrics">HS Metrics</option>
-                            <option value="insertsize">Insert size</option>
-                            <option value="markdups">Markdups</option>
-                            <option value="oxogmetrics">Oxog metrics</option>
-                            <option value="pcr_metrics">PCR metrics</option>
-                            <option value="rnaseqmetrics">RNA Seq metrics</option>
-                            <option value="rrbs_metrics">RRBS metrics</option>
-                            <option value="wgs_metrics">WGS metrics</option>
-                        </param>
-                        <param name="input" type="data" format="txt" multiple="true" label="Picard output"/>
-                    </repeat>
+                    <expand macro="picard_form"/>
                 </when>
                 <when value="prokka">
                     <param name="input" type="data" format="txt" multiple="true" label="Output of Prokka" help="It should contain 'contigs:'"/>
                 </when>
                 <when value="pycoqc">
-                    <param name="input" type="data" format="txt,json" multiple="true" label="Output of PycoQC"/>
+                    <expand macro="pycoqc_form"/>
                 </when>
                 <when value="qualimap">
-                    <param name="input" type="data" format="txt,tabular,tsv" multiple="true" label="Output of Qualimap BamQC" help="First result input should be genome_coverage (default from tool output). Run the Flatten Collection tool to keep all output in one report" />
+                    <expand macro="qualimap_form"/>
                 </when>
                 <when value="quast">
                     <param name="input" type="data" format="tabular,tsv" multiple="true" label="Output of Quast"/>
                 </when>
                 <when value="rseqc">
-                    <repeat name="output" title="RSeQC output" min="1">
-                        <conditional name="type">
-                            <param name="type" type="select" label="Type of RSeQC output?">
-                                <option value="bam_stat">BAM/SAM mapping stats</option>
-                                <option value="gene_body_coverage">Gene body coverage</option>
-                                <option value="infer_experiment">Infer experiment</option>
-                                <option value="inner_distance">Inner distance</option>
-                                <option value="junction_annotation">Junction annotation</option>
-                                <option value="junction_saturation">Junction saturation</option>
-                                <option value="read_distribution">Read distribution</option>
-                                <option value="read_duplication_pos">Read duplication</option>
-                                <option value="read_gc">Read GC</option>
-                            </param>
-                            <when value="bam_stat">
-                                <param name="input" type="data" format="txt,tabular" multiple="true" label="RSeQC BAM stat: output file" help="It should contain 'Proper-paired reads map to different chrom:'"/>
-                            </when>
-                            <when value="gene_body_coverage">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC gene body coverage:  stats file"/>
-                            </when>
-                            <when value="infer_experiment">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC infer experiment: configuration output" help="It should contain 'Fraction of reads explained by'"/>
-                            </when>
-                            <when value="inner_distance">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC inner distance: frequency file"/>
-                            </when>
-                            <when value="junction_annotation">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC junction annotation: stats file" help="It should contain 'Partial Novel Splicing Junctions:'"/>
-                            </when>
-                            <when value="junction_saturation">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC junction saturation: junction saturation plot Rscript file"/>
-                            </when>
-                            <when value="read_distribution">
-                                <param name="input" type="data" format="txt" multiple="true" label="RSeQC read distribution: stats output" help="It should contain 'Group               Total_bases         Tag_count           Tags/Kb'"/>
-                            </when>
-                            <when value="read_duplication_pos">
-                                <param name="input" type="data" format="xls" multiple="true" label="RSeQC read duplication: positions XLS file"/>
-                            </when>
-                            <when value="read_gc">
-                                <param name="input" type="data" format="csv,xls,tabular" multiple="true" label="RSeQC read GC output"/>
-                            </when>
-                        </conditional>
-                    </repeat>
+                    <expand macro="rseqc_form"/>
                 </when>
                 <when value="samblaster">
                     <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Samblaster" help="It should contain 'samblaster: Version'"/>
                 </when>
                 <when value="samtools">
-                    <repeat name="output" title="Samtools output" min="1">
-                        <conditional name="type">
-                            <param name="type" type="select" label="Type of Samtools output?">
-                                <option value="stats">stats</option>
-                                <option value="flagstat">flagstat</option>
-                                <option value="idxstats">idxstats</option>
-                                <option value="rmdup">rmdup</option>
-                            </param>
-                            <when value="stats">
-                                <param name="input" type="data" format="txt" multiple="true" label="Samtools stats output" help="It should contain 'This file was produced by samtools stats'"/>
-                            </when>
-                            <when value="flagstat">
-                                <param name="input" type="data" format="txt" multiple="true" label="Samtools flagstat output" help="It should contain 'in total (QC-passed reads + QC-failed reads)'"/>
-                            </when>
-                            <when value="idxstats">
-                                <param name="input" type="data" format="txt" multiple="true" label="Samtools idxstats output"/>
-                            </when>
-                            <when value="rmdup">
-                                <param name="input" type="data" format="txt" multiple="true" label="Samtools rmdup output" help="It should contain '[bam_rmdup'"/>
-                            </when>
-                        </conditional>
-                    </repeat>
+                    <expand macro="samtools_form"/>
                 </when>
                 <when value="slamdunk">
                     <param name="input" type="data" format="txt,tabular" multiple="true" label="Output of Slamdunk Alleyoop" help="It should contain '# slamdunk'"/>
@@ -490,50 +338,16 @@
                     <param name="input" type="data" format="txt" multiple="true" label="Log file of SortMeRNA" help="It should contain 'Minimal SW score based on E-value'"/>
                 </when>
                 <when value="star">
-                    <repeat name="output" title="STAR output" min="1">
-                        <conditional name="type">
-                            <param name="type" type="select" label="Type of STAR output?">
-                                <option value="log">Log</option>
-                                <option value="genecounts">Gene counts</option>
-                            </param>
-                            <when value="log">
-                                <param name="input" type="data" format="txt" multiple="true" label="STAR log output"/>
-                            </when>
-                            <when value="genecounts">
-                                <param name="input" type="data" format="tabular,tsv" multiple="true" label="STAR gene count output"/>
-                            </when>
-                        </conditional>
-                    </repeat>
+                    <expand macro="star_form"/>
                 </when>
                 <when value="tophat">
                     <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of TopHat2"/>
                 </when>
                 <when value="trimmomatic">
-                    <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Trimmomatic" help="It should contain 'TTrimmomatic'"/>
+                    <expand macro="trimmomatic_form"/>
                 </when>
                 <when value="vcftools">
-                    <repeat name="output" title="VCFTools output" min="1">
-                        <conditional name="type">
-                            <param name="type" type="select" label="Type of VCFTools output?">
-                                <option value="relatedness2">relatedness2</option>
-                                <option value="tstv_by_count">tstv_by_count</option>
-                                <option value="tstv_by_qual">tstv_by_qual</option>
-                                <option value="tstv_summary">tstv_summary</option>
-                            </param>
-                            <when value="relatedness2">
-                                <param name="input" type="data" format="txt" multiple="true" label="VCFTools relatedness2 output"/>
-                            </when>
-                            <when value="tstv_by_count">
-                                <param name="input" type="data" format="tabular,tsv" multiple="true" label="VCFTools TsTV count output"/>
-                            </when>
-                            <when value="tstv_by_qual">
-                                <param name="input" type="data" format="tabular" multiple="true" label="VCFTools TsTV qual output"/>
-                            </when>
-                            <when value="tstv_summary">
-                                <param name="input" type="data" format="txt" multiple="true" label="VCFTools TsTV summary output"/>
-                            </when>
-                        </conditional>
-                    </repeat>
+                    <expand macro="vcftools_form"/>
                 </when>
                 <when value="custom_content">
                     <param argument="plot_type" label="The plot type to visualise the data with" type="select">
@@ -543,11 +357,11 @@
                         <option value="generalstats">generalstats</option>
                         <option value="table">table</option>
                     </param>
-                    <param argument="section_name" label="Section name" type="text" help="Nice name used for the report section header" />
-                    <param argument="title" label="Title" type="text" help="Plot title" />
-                    <param argument="description" label="Description" type="text" help="Introductory text to be printed under the section header" />
-                    <param argument="xlab" label="X axis label" type="text" />
-                    <param argument="ylab" label="Y axis label" type="text" />
+                    <param argument="section_name" label="Section name" type="text" help="Nice name used for the report section header"/>
+                    <param argument="title" label="Title" type="text" help="Plot title"/>
+                    <param argument="description" label="Description" type="text" help="Introductory text to be printed under the section header"/>
+                    <param argument="xlab" label="X axis label" type="text"/>
+                    <param argument="ylab" label="Y axis label" type="text"/>
                     <param name="input" type="data" format="tabular,tsv" multiple="true" label="Data files"/>
                 </when>
             </conditional>
@@ -555,12 +369,12 @@
         <param name="title" type="text" value="" optional="true" label="Report title" help="It is printed as page header">
             <sanitizer invalid_char="">
                 <valid initial="string.letters,string.digits">
-                    <add value="," />
-                    <add value=":" />
-                    <add value="-" />
-                    <add value="_" />
-                    <add value=" " />
-                    <add value="." />
+                    <add value=","/>
+                    <add value=":"/>
+                    <add value="-"/>
+                    <add value="_"/>
+                    <add value=" "/>
+                    <add value="."/>
                 </valid>
             </sanitizer>
             <validator type="regex">[0-9a-zA-Z,: _.-]+</validator>
@@ -568,561 +382,73 @@
         <param name="comment" type="text" value="" optional="true" label="Custom comment" help="It will be printed at the top of the report">
             <sanitizer invalid_char="">
                 <valid initial="string.letters,string.digits">
-                    <add value="," />
-                    <add value=":" />
-                    <add value="-" />
-                    <add value="_" />
-                    <add value=" " />
-                    <add value="." />
+                    <add value=","/>
+                    <add value=":"/>
+                    <add value="-"/>
+                    <add value="_"/>
+                    <add value=" "/>
+                    <add value="."/>
                 </valid>
             </sanitizer>
             <validator type="regex">[0-9a-zA-Z,: _.-]+</validator>
         </param>
         <param argument="--flat" type="boolean" truevalue="--flat" falsevalue="" checked="false" label="Use only flat plots (non-interactive images)" help="To consume less disk space and resources to display. Used by default when there are 100 or more samples."/>
         <param argument="--export" type="boolean" truevalue="--export" falsevalue="" checked="false" label="Output the multiQC plots raw data?" help="This will output a file for each plot containing the raw data used to generate the plot"/>
-        <param name="saveLog" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output the multiQC log file?" help="This is mostly useful for debugging purposes"/>
     </inputs>
     <outputs>
-        <data name="html_report" format="html" from_work_dir="report.html" label="${tool.name} on ${on_string}: Webpage" />
-        <data name="log" format="txt" from_work_dir="report_data/multiqc.log" label="${tool.name} on ${on_string}: Log">
-            <filter>saveLog</filter>
-        </data>
-        <collection name="stats" type="list" label="${tool.name} on ${on_string}: Stats">
-            <discover_datasets pattern="multiqc_(?P&lt;designation&gt;.+)\.txt" format="tabular" directory="report_data" />
-        </collection>
+        <data name="html_report" format="html" from_work_dir="report.html" label="${tool.name} on ${on_string}: Webpage"/>
+        <data name="stats" format="tabular" from_work_dir="report_data/multiqc_general_stats.txt" label="${tool.name} on ${on_string}: Stats"/>
         <collection name="plots" type="list" label="${tool.name} on ${on_string}: Plots">
-            <discover_datasets pattern="mqc_(?P&lt;designation&gt;.+)\.txt" format="tabular" directory="report_data" />
+            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.txt" format="tabular" directory="plots"/>
             <filter>export</filter>
         </collection>
     </outputs>
     <tests>
-        <!--Test 01-->
-        <test expect_num_outputs="4">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="cutadapt" />
-                    <param name="input" value="cutadapt.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="fastp" />
-                    <param name="input" value="fastp1.json.txt,fastp2.json.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="fastqc" />
-                    <repeat name="output">
-                        <param name="type" value="data"/>
-                        <param name="input" value="fastqc_1.txt,fastqc_2.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="flexbar" />
-                    <param name="input" value="flexbar.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="slamdunk" />
-                    <param name="input" value="slamdunk_summary.txt,slamdunk_reads1_overallrates.csv,slamdunk_reads2_overallrates.csv" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="sortmerna" />
-                    <param name="input" value="sortmerna.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="trimmomatic" />
-                    <param name="input" value="trimmomatic.txt" />
-                </conditional>
-            </repeat>
-            <param name="title" value="Title of the report"/>
-            <param name="comment" value="Commment for the report"/>
-            <param name="flat" value="true"/>
-            <param name="export" value="true"/>
-            <param name="saveLog" value="true"/>
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="Title of the report" />
-                    <has_text text="Commment for the report" />
-                    <has_text text="cutadapt_trimmed_sequences_plot" />
-                    <has_text text="An ultra-fast all-in-one FASTQ preprocessor" />
-                    <has_text text="fastqc_seq_heatmap_key_t" />
-                    <has_text text="flexbar_plot" />
-                    <has_text text="a tool to analyze SLAMSeq data" />
-                    <has_text text="sortmerna-detailed-plot" />
-                    <has_text text="trimmomatic_plot" />
-                </assert_contents>
-            </output>
-            <output name="log">
-                <assert_contents>
-                    <has_text_matching expression="\[INFO   \]  MultiQC complete$"/>
-                </assert_contents>
-            </output>
-            <output_collection name="stats" type="list" count="10">
-                <expand macro="element_assert" name="cutadapt" columns="9" lines="2" text="dataset_33"/>
-                <expand macro="element_assert" name="fastp" columns="2" lines="3" text="R1_fq"/>
-                <expand macro="element_assert" name="fastqc" columns="22" lines="3" text="poulet5_1"/>
-                <expand macro="element_assert" name="flexbar" columns="11" lines="2" text="result_right"/>
-                <expand macro="element_assert" name="general_stats" columns="20" lines="11" text="bwa-mem-fastq1_fq"/>
-                <expand macro="element_assert" name="slamdunk_readrates_plus" columns="13" lines="3" text="slamdunk_reads1_overallrates_csv"/>
-                <expand macro="element_assert" name="slamdunk_readrates_minus" columns="13" lines="3" text="slamdunk_reads1_overallrates_csv"/>
-                <expand macro="element_assert" name="sortmerna" columns="22" lines="2" text="25839_merged"/>
-                <expand macro="element_assert" name="sources" columns="4" lines="7" text="Module"/>
-                <expand macro="element_assert" name="trimmomatic" columns="6" lines="2" text="C2"/>
-            </output_collection>
-            <output_collection name="plots" type="list" count="29"/>
-        </test>
-        <!--Test 02-->
-        <test expect_num_outputs="2">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="bismark" />
-                    <repeat name="output">
-                        <param name="type" value="align"/>
-                        <param name="input" value="bismark.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="bowtie2" />
-                    <param name="input" value="bowtie2_1.txt,bowtie2_2.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="hisat2" />
-                    <param name="input" value="hisat2_1.txt,hisat2_2.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="hicexplorer" />
-                    <param name="input" value="hicexplorer1.log,hicexplorer1.log,hicexplorer2.log" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="kallisto" />
-                    <param name="input" value="kallisto_1.txt,kallisto_2.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="macs2" />
-                    <param name="input" value="macs_1.txt,macs_2.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="star" />
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="log"/>
-                            <param name="input" value="star_log.txt" />
-                        </conditional>
-                    </repeat>
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="genecounts"/>
-                            <param name="input" value="star_counts.txt" />
-                        </conditional>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="tophat" />
-                    <param name="input" value="tophat.txt" />
-                </conditional>
-            </repeat>
-            <param name="saveLog" value="false"/>
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="bismark-alignment" />
-                    <has_text text="bowtie2_se_plot" />
-                    <has_text text="hisat2_se_plot" />
-                    <has_text text="kallisto_alignment" />
-                    <has_text text="MACS2" />
-                    <has_text text="star_alignment_plot" />
-                    <has_text text="tophat_alignment" />
-                    <has_text text="hicexplorer" />
-                    <has_text text="hicexplorer1_log_1" />
-                </assert_contents>
-            </output>
-            <output_collection name="stats" type="list" count="11">
-                <expand macro="element_assert" name="bismark_alignment" columns="21" lines="2" text="bismark_txt_SE_report"/>
-                <expand macro="element_assert" name="bowtie2" columns="7" lines="3" text="bowtie2_1_txt"/>
-                <expand macro="element_assert" name="cutadapt" columns="9" lines="5" text="HS002-PE-R00059_BD0U5YACXX.RHM067_CAGATC_L002_R2"/>
-                <expand macro="element_assert" name="general_stats" columns="22"  lines="19" text="treat2"/>
-                <expand macro="element_assert" name="hicexplorer" columns="41" lines="4" text="hicexplorer_3_hicexplorer2_log_small_test_rf"/>
-                <expand macro="element_assert" name="hisat2" columns="6" lines="3" text="hisat2_2_txt"/>
-                <expand macro="element_assert" name="kallisto" columns="6" lines="3" text="HS002-PE-R00059_BD0U5YACXX.RHM067_CAGATC_L002_R1_val_1"/>
-                <expand macro="element_assert" name="macs" columns="12" lines="3" text="treat2"/>
-                <expand macro="element_assert" name="sources" columns="4" lines="18" text="Cutadapt"/>
-                <expand macro="element_assert" name="star" columns="27" lines="2" text="star_log_txt"/>
-                <expand macro="element_assert" name="tophat.txt" columns="9" lines="2" text="tophat_txtalign"/>
-            </output_collection>
-        </test>
-        <!--Test 03-->
-        <test expect_num_outputs="2">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="bamtools" />
-                    <param name="input" value="bamtools.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="bcftools" />
-                    <param name="input" value="bcftools.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="busco" />
-                    <param name="input" value="busco.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="deeptools" />
-                    <repeat name="output">
-                        <param name="type" value="bamPEFragmentSize"/>
-                        <param name="input" value="deeptools_bamPEFragmentSize.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="estimateReadFiltering"/>
-                        <param name="input" value="deeptools_estimateReadFiltering.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="plotCoverageStdout"/>
-                        <param name="input" value="deeptools_plotCoverageStdout.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="plotCoverageOutRawCounts"/>
-                        <param name="input" value="deeptools_plotCoverageOutRawCounts.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="plotEnrichment"/>
-                        <param name="input" value="deeptools_plotEnrichment.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="plotFingerprintOutRawCounts"/>
-                        <param name="input" value="deeptools_plotFingerprintOutRawCounts.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="featureCounts" />
-                    <param name="input" value="featureCounts.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="gatk" />
-                    <repeat name="output">
-                        <param name="type" value="base_recalibrator"/>
-                        <param name="input" value="gatk_BaseRecalibrator.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="varianteval"/>
-                        <param name="input" value="gatk_varianteval.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="htseq" />
-                    <param name="input" value="htseq.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="picard" />
-                    <repeat name="output">
-                        <param name="type" value="gcbias"/>
-                        <param name="input" value="picard_collectGcBias.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="insertsize"/>
-                        <param name="input" value="picard_CollectInsertSizeMetrics.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="markdups"/>
-                        <param name="input" value="picard_MarkDuplicates.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="basedistributionbycycle"/>
-                        <param name="input" value="picard_CollectBaseDistributionByCycle.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="rnaseqmetrics"/>
-                        <param name="input" value="picard_CollectRnaSeqMetrics.txt"/>
-                    </repeat>
-                    <repeat name="output">
-                        <param name="type" value="alignment_metrics"/>
-                        <param name="input" value="picard_CollectAlignmentSummaryMetrics.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="prokka" />
-                    <param name="input" value="prokka_1.txt,prokka_2.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="qualimap" />
-                    <param name="input" value="genome_results.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="quast" />
-                    <param name="input" value="quast.tsv" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="rseqc" />
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="read_gc"/>
-                            <param name="input" value="rseqc.txt"/>
-                        </conditional>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="samblaster" />
-                    <param name="input" value="samblaster.txt" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="samtools" />
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="stats"/>
-                            <param name="input" value="samtools_stats.txt"/>
-                        </conditional>
-                    </repeat>
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="flagstat"/>
-                            <param name="input" value="samtools_flagstat.txt"/>
-                        </conditional>
-                    </repeat>
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="idxstats"/>
-                            <param name="input" value="samtools_idxstats.txt"/>
-                        </conditional>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="snpeff" />
-                    <param name="input" value="snpeff.csv" ftype="csv" />
-                </conditional>
-            </repeat>
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="vcftools" />
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="tstv_by_qual"/>
-                            <param name="input" value="vcftools.txt"/>
-                        </conditional>
-                    </repeat>
-                    <param name="input" value="vcftools.txt" />
-                </conditional>
-            </repeat>
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="bamtools-stats" />
-                    <has_text text="bcftools_stats_indel-lengths" />
-                    <has_text text="busco-lineage-fungi_odb9" />
-                    <has_text text="deeptools" />
-                    <has_text text="featureCounts_assignment_plot" />
-                    <has_text text="gatk_varianteval_variant_plot" />
-                    <has_text text="htseq_assignment_plot" />
-                    <has_text text="picard_alignment_readlength" />
-                    <has_text text="picard-rna-assignment" />
-                    <has_text text="picard-markduplicates" />
-                    <has_text text="picard-insertsize" />
-                    <has_text text="picard-gcbias" />
-                    <has_text text="prokka_plot" />
-                    <has_text text="qualimap" />
-                    <has_text text="samblaster_duplicates" />
-                    <has_text text="quast-stats" />
-                    <has_text text="samtools-flagstat-dp" />
-                    <has_text text="snpeff" />
-                </assert_contents>
-            </output>
-            <output_collection name="stats" type="list" count="21">
-                <expand macro="element_assert" name="bamtools_stats" columns="20" lines="2" text="bamtools_txt"/>
-                <expand macro="element_assert" name="bcftools_stats" columns="28" lines="2" text="Test1"/>
-                <expand macro="element_assert" name="busco" columns="8" lines="2" text="busco_txt"/>
-                <expand macro="element_assert" name="featureCounts" columns="14" lines="7" text="5: TopHat on data 1, data 14, and data 13"/>
-                <expand macro="element_assert" name="gatk_varianteval" columns="12" lines="2" text="gatk_varianteval_txt"/>
-                <expand macro="element_assert" name="general_stats" columns="44" lines="23" text="x_bam"/>
-                <expand macro="element_assert" name="htseq" columns="9" lines="2" text="htseq_txt"/>
-                <expand macro="element_assert" name="picard_AlignmentSummaryMetrics" columns="26" lines="2" text="D11_H4K16ac_Rep1_R1_fastq_gz"/>
-                <expand macro="element_assert" name="picard_RnaSeqMetrics" columns="27" lines="2" text="picard_CollectRnaSeqMetrics_bam"/>
-                <expand macro="element_assert" name="picard_baseContent" columns="11" lines="2" text="D11_H4K16ac_Rep1_R1_fastq_gz"/>
-                <expand macro="element_assert" name="picard_dups" columns="10" lines="2" text="dataset_114"/>
-                <expand macro="element_assert" name="picard_insertSize" columns="23" lines="2" text="dataset_197_FR"/>
-                <expand macro="element_assert" name="prokka" columns="11" lines="3" text="Sample2"/>
-                <expand macro="element_assert" name="qualimap_bamqc_genome_results" columns="12" lines="2" text="x_bam"/>
-                <expand macro="element_assert" name="quast" columns="50" lines="2" text="14892_1#15"/>
-                <expand macro="element_assert" name="samblaster" columns="5" lines="2" text="virtual-normal"/>
-                <expand macro="element_assert" name="samtools_flagstat" columns="34" lines="2" text="samtools_flagstat_txt">
-                    <has_text text="samtools_flagstat" />
-                    <has_text text="mapped_passed" />
-                    <has_text text="20689039" />
-                </expand>
-                <expand macro="element_assert" name="samtools_idxstats" columns="68" lines="2" text="samtools_idxstats_txt_idxstat"/>
-                <expand macro="element_assert" name="samtools_stats" columns="40" lines="2" text="samtools_stats_txt"/>
-                <expand macro="element_assert" name="snpeff" columns="169" lines="2" text="snpeff_csv"/>
-                <expand macro="element_assert" name="sources" columns="4" lines="33" text="Bamtools"/>
-            </output_collection>
-        </test>
-        <!--Test 04-->
-        <test expect_num_outputs="2">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="custom_content" />
-                    <param name="cc_select" value="manual" />
-                    <param name="plot_type" value="linegraph" />
-                    <param name="section_name" value="BPC" />
-                    <param name="description" value="Sum of intensity (Y) of the most intense peaks at each retention time(X)" />
-                    <param name="xlab" value="Retention Time" />
-                    <param name="ylab" value="Base Peak Intensity" />
-                    <param name="input" value="cc_ko15.bpc.tab,cc_wt15.bpc.tab" />
-                </conditional>
-            </repeat>
-            <output name="html_report" ftype="html">
-                <assert_contents>
-                    <has_size value="1110578" delta="500" />
-                </assert_contents>
-            </output>
-	        <output_collection name="stats" type="list" count="1"/>
-        </test>
-        <!--Test 05-->
-        <test expect_num_outputs="3">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="fastqc" />
-                    <repeat name="output">
-                        <param name="type" value="data"/>
-                        <param name="input" value="fastqc_1.txt,fastqc_2.txt"/>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <param name="title" value="Title of the report"/>
-            <param name="comment" value="Commment for the report"/>
-            <param name="flat" value="true"/>
-            <param name="export" value="true"/>
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="Title of the report" />
-                    <has_text text="Commment for the report" />
-                    <has_text text="fastqc_seq_heatmap_key_t" />
-                </assert_contents>
-            </output>
-	        <output_collection name="stats" type="list" count="3">
-                <expand macro="element_assert" name="fastqc" columns="22" lines="3" text="poulet5_2"/>
-                <expand macro="element_assert" name="general_stats" columns="6" lines="3" text="poulet5_2"/>
-                <expand macro="element_assert" name="sources" columns="4" lines="3" text="FastQC"/>
-            </output_collection>
-            <output_collection name="plots" type="list" count="7">
-                <element name="fastqc_per_base_sequence_quality_plot_1" file="mqc_fastqc_per_base_sequence_quality_plot_1.txt" compare="sim_size" delta="10"/>
-            </output_collection>
-        </test>
-        <!--Test 06-->
-        <test expect_num_outputs="2">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="pycoqc" />
-                    <param name="input" value="pycoqc.json"/>
-                </conditional>
-            </repeat>
-            <param name="title" value="Title of the report"/>
-            <param name="comment" value="Commment for the report"/>
-            <!-- <param name="flat" value="true"/> -->
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="Title of the report" />
-                    <has_text text="Commment for the report" />
-                    <has_text text="General Statistics" />
-                    <has_text text="pycoqc_count_plot" />
-                    <has_text text="pycoqc_read_len_plot" />
-                    <has_text text="pycoqc_read_qual_plot" />
-                </assert_contents>
-            </output>
-	    <output_collection name="stats" type="list" count="2"/>
-        </test>
-        <!--Test 07-->
-        <test expect_num_outputs="2">
-            <repeat name="results">
-                <conditional name="software_cond">
-                    <param name="software" value="rseqc" />
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="junction_annotation"/>
-                            <param name="input" value="junction_annotation.txt"/>
-                        </conditional>
-                    </repeat>
-                    <repeat name="output">
-                        <conditional name="type">
-                            <param name="type" value="junction_saturation"/>
-                            <param name="input" value="junction_saturation.txt"/>
-                        </conditional>
-                    </repeat>
-                </conditional>
-            </repeat>
-            <param name="title" value="RSEQC report"/>
-            <!-- <param name="flat" value="true"/> -->
-            <output name="html_report">
-                <assert_contents>
-                    <has_text text="RSEQC report" />
-                    <has_text text="Junction Annotation" />
-                    <has_text text="Junction Saturation" />
-                </assert_contents>
-            </output>
-	        <output_collection name="stats" type="list" count="2"/>
-        </test>
+        <expand macro="general_tests"/>
+        <expand macro="bcftools_test"/>
+        <expand macro="bowtie2_test"/>
+        <expand macro="fastqc_test"/>
+        <expand macro="trimmomatic_test"/>
+        <!-- Test 10 -->
+        <expand macro="flexbar_test"/>
+        <expand macro="fastp_test"/>
+        <expand macro="bismark_test"/>
+        <expand macro="rseqc_test"/>
+        <expand macro="star_test"/>
+        <expand macro="cutadapt_test"/>
+        <expand macro="samtools_test"/>
+        <expand macro="busco_test"/>
+        <expand macro="featurecounts_test"/>
+        <expand macro="picard_test"/>
+        <!-- Test 20 -->
+        <expand macro="qualimap_test"/>
+        <expand macro="gatk_test"/>
+        <expand macro="bamtools_test"/>
+        <expand macro="pycoqc_test"/>
+
+        <!--expand macro="vcftools_test"/> Does not work, did it ever worked? -->
+
     </tests>
     <help><![CDATA[
 **What it does**
 
-`MultiQC <http://multiqc.info/>`_ aggregates results from bioinformatics analyses across many samples into a single report. It takes results of multiple analyses and creates a report that can be viewed as a single beautiful web-page. It's a general use tool, perfect for summarizing the output from numerous bioinformatics tools.
+`MultiQC <http://multiqc.info/>`_ aggregates results from bioinformatics analyses across many samples into a single report.
+It takes results of multiple analyses and creates a report that can be viewed as a single beautiful web-page.
+It's a general use tool, perfect for summarizing the output from numerous bioinformatics tools.
 
 **Inputs**
 
-MultiQC takes software output summaries/logs and creates a single report from them. You need to tell the tool which software was used to generate the report. This is done using the **Software name** dropdown. At present only the Galaxy tools found in the ToolShed produce logs that can used with MultiQC
-
-----
+MultiQC takes software output summaries/logs and creates a single report from them. You need to tell the tool which software was used to generate the report.
+This is done using the **Software name** dropdown. At present only the Galaxy tools found in the ToolShed produce logs that can used with MultiQC
 
-The first integration of this tool was made by
-`@cmonjeau <https://github.com/cmonjeau>`_ and `@yvanlebras <https://github.com/yvanlebras>`_.
-It is now maintained by the `Intergalactic Utilities Commission <https://galaxyproject.org/iuc>`_.
     ]]></help>
     <citations>
         <citation type="doi">10.1093/bioinformatics/btw354</citation>
     </citations>
+    <creator>
+        <person givenName="Cyril" familyName="Monjeaud" url="https://github.com/cmonjeau"/>
+        <person givenName="Yvan" familyName="Le Bras" url="https://github.com/yvanlebras"/>
+        <person givenName="Bérénice" familyName="Batut" url="https://github.com/bebatut"/>
+        <person givenName="Björn" familyName="Grüning" url="https://github.com/bgruening"/>
+    </creator>
 </tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/picard_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,119 @@
+<macros>
+    <token name="@PICARD_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            #if str($repeat2.type) == "alignment_metrics"
+                #set $pattern = "picard.analysis.AlignmentSummaryMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "basedistributionbycycle"
+                #set $pattern = "picard.analysis.BaseDistributionByCycleMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "gcbias"
+                #set $pattern = "picard.analysis.GcBias"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "hsmetrics"
+                #set $pattern = "picard.analysis.directed.HsMetrics"
+                @   @
+            #elif str($repeat2.type) == "insertsize"
+                #set $pattern = "picard.analysis.InsertSizeMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "markdups"
+                #set $pattern = "MarkDuplicates"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "oxogmetrics"
+                #set $pattern = "picard.analysis.CollectOxoGMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "pcr_metrics"
+                #set $pattern = "picard.analysis.directed.TargetedPcrMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "rnaseqmetrics"
+                #set $pattern = "Collect"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "rrbs_metrics"
+                #set $pattern = "picard.analysis.RrbsSummaryMetrics"
+                @LN_2_FILES@
+            #elif str($repeat2.type) == "wgs_metrics"
+                #set $pattern = "picard.analysis.CollectWgsMetrics$WgsMetrics"
+                @LN_2_FILES@
+            #end if
+        #end for
+    ]]></token>
+    <xml name="picard_form">
+        <repeat name="output" title="Picard output" min="1">
+            <param name="type" type="select" label="Type of Picard output?">
+                <option value="alignment_metrics">Alignment metrics</option>
+                <option value="basedistributionbycycle">Base distribution by cycle</option>
+                <option value="gcbias">GC bias</option>
+                <option value="hsmetrics">HS Metrics</option>
+                <option value="insertsize">Insert size</option>
+                <option value="markdups">Markdups</option>
+                <option value="oxogmetrics">Oxog metrics</option>
+                <option value="pcr_metrics">PCR metrics</option>
+                <option value="rnaseqmetrics">RNA Seq metrics</option>
+                <option value="rrbs_metrics">RRBS metrics</option>
+                <option value="wgs_metrics">WGS metrics</option>
+            </param>
+            <param name="input" type="data" format="txt" multiple="true" label="Picard output"/>
+        </repeat>
+    </xml>
+    <xml name="picard_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="picard"/>
+                    <repeat name="output">
+                        <param name="type" value="gcbias"/>
+                        <param name="input" value="picard_collectGcBias.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="insertsize"/>
+                        <param name="input" value="picard_CollectInsertSizeMetrics.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="markdups"/>
+                        <param name="input" value="picard_MarkDuplicates.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="basedistributionbycycle"/>
+                        <param name="input" value="picard_CollectBaseDistributionByCycle.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="rnaseqmetrics"/>
+                        <param name="input" value="picard_CollectRnaSeqMetrics.txt"/>
+                    </repeat>
+                    <repeat name="output">
+                        <param name="type" value="alignment_metrics"/>
+                        <param name="input" value="picard_CollectAlignmentSummaryMetrics.txt"/>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="picard_CollectRnaSeqMetrics_bam"/>
+                    <has_text text="picard_alignment_readlength"/>
+                    <has_text text="picard-rna-assignment"/>
+                    <has_text text="picard-markduplicates"/>
+                    <has_text text="picard-insertsize"/>
+                    <has_text text="picard-gcbias"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="picard_CollectRnaSeqMetrics_bam"/>
+                    <has_text text="InsertSizeMetrics_mqc_generalstats_picard_insertsizemetrics_summed_median"/>
+                    <has_text text="picard_CollectRnaSeqMetrics_bam"/>
+                    <has_text text="RnaSeqMetrics_mqc_generalstats_picard_rnaseqmetrics_PCT_MRNA_BASES"/>
+                    <has_text text="NA"/>
+                    <has_n_lines n="4"/>
+                    <has_n_columns n="6"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="3"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pycoqc_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,39 @@
+<macros>
+    <token name="@PYCOQC_COMMAND@"><![CDATA[
+        #set $pattern = "\"pycoqc\":"
+        @LN_FILES@
+    ]]></token>
+    <xml name="pycoqc_form">
+        <param name="input" type="data" format="txt,json" multiple="true" label="Output of PycoQC"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="pycoqc_test">
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="pycoqc"/>
+                    <param name="input" value="pycoqc.json"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <!-- <param name="flat" value="true"/> -->
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="General Statistics"/>
+                    <has_text text="pycoqc_count_plot"/>
+                    <has_text text="pycoqc_read_len_plot"/>
+                    <has_text text="pycoqc_read_qual_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats" ftype="tabular">
+                <assert_contents>
+                    <has_text text="pycoQC_mqc_generalstats_pycoqc_passed_median_read_length"/>
+                    <has_text text="pycoqc_json"/>
+                </assert_contents>
+            </output>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qualimap_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,62 @@
+<macros>
+    <token name="@QUALIMAP_COMMAND@"><![CDATA[
+        #for $file in $repeat.software_cond.input
+            #if re.search("genome_results", str($file.element_identifier))
+                sample="\$(grep 'bam file = ' $file | sed 's/bam file = //g' | sed 's: ::g')" &&
+                dir_name="$software_dir/\${sample}" &&
+                mkdir -p \${dir_name} &&
+                filepath_1="\${dir_name}/genome_results.txt" &&
+                ln -sf '$file' \${filepath_1} &&
+            #elif re.search("coverage_histogram", str($file.element_identifier))
+                nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
+                mkdir -p \${nested_dir_name} &&
+                filepath_2="\${nested_dir_name}/coverage_histogram.txt" &&
+                ln -sf '$file' \${filepath_2} &&
+            #elif re.search("gc-content_distribution", str($file.element_identifier))
+                nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
+                mkdir -p \${nested_dir_name} &&
+                filepath_3="\${nested_dir_name}/mapped_reads_gc-content_distribution.txt" &&
+                ln -sf '$file' \${filepath_3} &&
+            #else
+                #pass
+            #end if
+        #end for
+    ]]></token>
+    <xml name="qualimap_form">
+        <param name="input" type="data" format="txt,tabular,tsv" multiple="true" label="Output of Qualimap BamQC" help="First result input should be genome_coverage (default from tool output). Run the Flatten Collection tool to keep all output in one report"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="qualimap_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="qualimap"/>
+                    <param name="input" value="genome_results.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="qualimap"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="BamQC_mqc_generalstats_qualimap_bamqc_mean_coverage"/>
+                    <has_text text="BamQC_mqc_generalstats_qualimap_bamqc_mapped_reads"/>
+                    <has_text text="BamQC_mqc_generalstats_qualimap_bamqc_total_reads"/>
+                    <has_text text="x_bam"/>
+                    <has_text text="0.98"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="6"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="0"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rseqc_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,133 @@
+<macros>
+    <token name="@RSEQC_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "bam_stat"
+                #set $pattern = "Proper-paired reads map to different chrom:"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "gene_body_coverage"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.geneBodyCoverage.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "inner_distance"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.inner_distance_freq.txt')
+                    ln -s '${file}' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "junction_annotation"
+                #set $pattern = "Partial Novel Splicing Junctions:"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "read_gc"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.GC.xls')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "junction_saturation"
+                #for $k, $file in enumerate($repeat2.type.input)
+                #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.junctionSaturation_plot.r')
+                    ln -s '${file}' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "read_distribution"
+                #set $pattern = "Group               Total_bases         Tag_count           Tags/Kb"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "read_duplication_pos"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.pos.DupRate.xls')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "infer_experiment"
+                #set $pattern = "Fraction of reads explained by"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier))
+                    grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="rseqc_form">
+        <repeat name="output" title="RSeQC output" min="1">
+            <conditional name="type">
+                <param name="type" type="select" label="Type of RSeQC output?">
+                    <option value="bam_stat">BAM/SAM mapping stats</option>
+                    <option value="gene_body_coverage">Gene body coverage</option>
+                    <option value="infer_experiment">Infer experiment</option>
+                    <option value="inner_distance">Inner distance</option>
+                    <option value="junction_annotation">Junction annotation</option>
+                    <option value="junction_saturation">Junction saturation</option>
+                    <option value="read_distribution">Read distribution</option>
+                    <option value="read_duplication_pos">Read duplication</option>
+                    <option value="read_gc">Read GC</option>
+                </param>
+                <when value="bam_stat">
+                    <param name="input" type="data" format="txt,tabular" label="RSeQC BAM stat: output file" help="It should contain 'Proper-paired reads map to different chrom:" multiple="true"/>
+                </when>
+                <when value="gene_body_coverage">
+                    <param name="input" type="data" format="txt" label="RSeQC gene body coverage:  stats file" multiple="true"/>
+                </when>
+                <when value="infer_experiment">
+                    <param name="input" type="data" format="txt" label="RSeQC infer experiment: configuration output" help="It should contain 'Fraction of reads explained by" multiple="true"/>
+                </when>
+                <when value="inner_distance">
+                    <param name="input" type="data" format="txt" label="RSeQC inner distance: frequency file" multiple="true"/>
+                </when>
+                <when value="junction_annotation">
+                    <param name="input" type="data" format="txt" label="RSeQC junction annotation: stats file" help="It should contain 'Partial Novel Splicing Junctions:" multiple="true"/>
+                </when>
+                <when value="junction_saturation">
+                    <param name="input" type="data" format="txt" label="RSeQC junction saturation: junction saturation plot Rscript file" multiple="true"/>
+                </when>
+                <when value="read_distribution">
+                    <param name="input" type="data" format="txt" label="RSeQC read distribution: stats output" help="It should contain 'Group               Total_bases         Tag_count           Tags/Kb" multiple="true"/>
+                </when>
+                <when value="read_duplication_pos">
+                    <param name="input" type="data" format="xls" label="RSeQC read duplication: positions XLS file" multiple="true"/>
+                </when>
+                <when value="read_gc">
+                    <param name="input" type="data" format="csv,xls,tabular" label="RSeQC read GC output" multiple="true"/>
+                </when>
+            </conditional>
+        </repeat>
+    </xml>
+    <xml name="rseqc_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="rseqc"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="junction_annotation"/>
+                            <param name="input" value="junction_annotation.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="junction_saturation"/>
+                            <param name="input" value="junction_saturation.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="rseqc_junction_annotation"/>
+                    <has_text text="rseqc_junction_annotation_junctions_plot"/>
+                </assert_contents>
+            </output>
+            <!-- for unknown reason empty
+            <output name="stats">
+                <assert_contents>
+                </assert_contents>
+            </output> -->
+            <output_collection name="plots" type="list" count="5"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/salmon_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,62 @@
+<macros>
+    <!-- not yet finished -->
+    <token name="@SALMON_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "meta"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
+                    #set file_path = os.path.join($file_dir, 'meta_info.json')
+                    mkdir '$file_dir' &&
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "fld"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
+                    #set file_path = os.path.join($file_dir,'flenDist.txt')
+                    mkdir '$file_dir' &&
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="salmon_form">
+
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="salmon_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="trimmomatic"/>
+                    <param name="input" value="trimmomatic.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="cutadapt_trimmed_sequences_plot"/>
+                    <has_text text="All-in-one FASTQ preprocessor"/>
+                    <has_text text="trimmomatic_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="dataset_33"/>
+                    <has_text text="R1_fq"/>
+                    <has_text text="result_right"/>
+                    <has_text text="25839_merged"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="11"/>
+                    <has_n_columns n="22"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="29"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samtools_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,97 @@
+<macros>
+    <token name="@SAMTOOLS_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "stats"
+                #set $pattern = "This file was produced by samtools stats"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "flagstat"
+                #set $pattern = "in total (QC-passed reads + QC-failed reads)"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "idxstats"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_idxstat')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "rmdup"
+                #set $pattern = "[bam_rmdup"
+                @LN_3_FILES@
+            #end if
+        #end for
+    ]]></token>
+    <xml name="samtools_form">
+        <repeat name="output" title="Samtools output" min="1">
+            <conditional name="type">
+                <param name="type" type="select" label="Type of Samtools output?">
+                    <option value="stats">stats</option>
+                    <option value="flagstat">flagstat</option>
+                    <option value="idxstats">idxstats</option>
+                    <option value="rmdup">rmdup</option>
+                </param>
+                <when value="stats">
+                    <param name="input" type="data" format="txt" multiple="true" label="Samtools stats output" help="It should contain 'This file was produced by samtools stats'"/>
+                </when>
+                <when value="flagstat">
+                    <param name="input" type="data" format="txt" multiple="true" label="Samtools flagstat output" help="It should contain 'in total (QC-passed reads + QC-failed reads)'"/>
+                </when>
+                <when value="idxstats">
+                    <param name="input" type="data" format="txt" multiple="true" label="Samtools idxstats output"/>
+                </when>
+                <when value="rmdup">
+                    <param name="input" type="data" format="txt" multiple="true" label="Samtools rmdup output" help="It should contain '[bam_rmdup'"/>
+                </when>
+            </conditional>
+        </repeat>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="samtools_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="samtools"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="stats"/>
+                            <param name="input" value="samtools_stats.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="flagstat"/>
+                            <param name="input" value="samtools_flagstat.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="idxstats"/>
+                            <param name="input" value="samtools_idxstats.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="samtools-flagstat-dp"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="samtools_flagstat_txt"/>
+                    <has_text text="mapped_passed"/>
+                    <has_text text="stats_mqc_generalstats_samtools_stats_error_rate"/>
+                    <has_text text="samtools_stats_txt"/>
+                    <has_n_lines n="3"/>
+                    <has_n_columns n="11"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="5"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/star_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,77 @@
+<macros>
+    <token name="@STAR_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "log"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_Log.final.out')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "genecounts"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '_ReadsPerGene.out.tab')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="star_form">
+        <repeat name="output" title="STAR output" min="1">
+            <conditional name="type">
+                <param name="type" type="select" label="Type of STAR output?">
+                    <option value="log">Log</option>
+                    <option value="genecounts">Gene counts</option>
+                </param>
+                <when value="log">
+                    <param name="input" type="data" format="txt" label="STAR log output" multiple="true"/>
+                </when>
+                <when value="genecounts">
+                    <param name="input" type="data" format="tabular,tsv" label="STAR gene count output" multiple="true"/>
+                </when>
+            </conditional>
+        </repeat>
+    </xml>
+    <xml name="star_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="star"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="log"/>
+                            <param name="input" value="star_log.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="genecounts"/>
+                            <param name="input" value="star_counts.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="star_alignment_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="STAR_mqc_generalstats_star_uniquely_mapped_percent"/>
+                    <has_text text="star_log_txt"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="7"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/template_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,59 @@
+<macros>
+    <!--
+    This is the TEMPLATE macro for MultiQC
+    1. please copy this template_plugin.xml to your own file e.g. trimmomatic_plugin.xml
+    2. Replace `TEMPLATE` with the name of the plugin, e.g. `fastqc`. The tokens and xml-names need to be called `trimmomatic_form` or `TRIMMOMATIC_COMMAND`
+    3. import your new *_plugin.xml macro into the main multiqc.xml file at the top of the file
+    4. add a new option to the main select element, e.g. `<option value="trimmomatic">Trimmomatic</option>`
+    5. add the *_COMMAND token to the <command> section.
+    6. add the *_test macro to the test section.
+    7. remove all unused comments from your new file
+-->
+    <token name="@TEMPLATE_COMMAND@"><![CDATA[
+        <!--This pattern is used to check the file content in the @CHECK_LN_FILE@ token. The pattern should be included in the file. -->
+        #set $pattern = "Trimmomatic"
+        @LN_FILES@f
+    ]]></token>
+    <xml name="TEMPLATE_form">
+        <!-- Please add here your input forms specific to your plugin. Keep the name as `input` if you have a single input.
+            If you have multiple inputs have a look at other plugins, e.g. fastqc 
+        -->
+        <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Trimmomatic" help="It should contain 'TTrimmomatic'"/>
+    </xml>
+    <!-- add here your test files and tests, the more stringent the better -->
+    <xml name="TEMPLATE_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="trimmomatic"/>
+                    <param name="input" value="trimmomatic.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="cutadapt_trimmed_sequences_plot"/>
+                    <has_text text="All-in-one FASTQ preprocessor"/>
+                    <has_text text="trimmomatic_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="dataset_33"/>
+                    <has_text text="R1_fq"/>
+                    <has_text text="result_right"/>
+                    <has_text text="25839_merged"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="11"/>
+                    <has_n_columns n="22"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="29"/>
+        </test>
+    </xml>
+</macros>
--- a/test-data/mqc_fastqc_per_base_sequence_quality_plot_1.txt	Sat Dec 10 11:22:18 2022 +0000
+++ b/test-data/mqc_fastqc_per_base_sequence_quality_plot_1.txt	Mon Sep 02 14:22:54 2024 +0000
@@ -1,3 +1,3 @@
-Sample	1	2	3	4	5	6	7	8	9	10	12	14	16	18	20	22	24	26	28	30	32	34	36	38	40	42	44	46	48	50	52	54	56	58	60	62	64	66	68	70	72	74	76	78	80	82	84	86	88	90	92	94	96	98	100
-poulet5_1	20.91988023102569	20.71684045861661	20.351574954545285	22.531542025544244	24.673566076408722	25.813099918237516	27.587864804423386	27.598941941168345	27.07115949658203	27.129873548155864	27.009298149330405	27.123565889736383	27.086309823818645	27.07924614241606	27.082520375286073	27.054301117420636	27.06350966402712	27.082996389756914	27.065495857740743	27.09608772106672	27.087097581099798	27.098251253504774	27.05184077595959	27.06521958267531	27.072148859992012	27.065725464720796	27.07168031241483	27.048083061725073	27.04642354460909	27.062865644448927	27.01859629866081	26.994157155710866	27.110127347871376	26.995846540401494	27.00461640700544	26.981614641085088	26.98900313236189	27.001189102815392	26.917739099268616	26.98481793846533	26.89518908041471	26.93677034448514	26.87640237596556	26.906094478605482	26.80463992772047	26.717012197170796	26.46960974280285	26.442842795754324	26.34282375517549	26.03493946215965	25.833215729758187	25.503102494315826	24.52807178671565	23.202399486277717	23.72906749698524
-poulet5_2	20.590586487162543	20.458478471078855	20.178608096352797	22.495204387546714	24.59397272343746	25.77560491172265	26.651378201897337	27.54968284369178	27.089005372429988	27.058984726469017	26.954911162632676	27.066410552214123	27.04552938409328	27.025118630273028	27.019042445557012	27.010315513591614	27.03931879529138	26.978450544896567	27.003714779595967	27.025971722873706	27.017791740868923	27.00628899118533	27.00906294218011	27.034922661648913	27.005346295860726	27.000909094303132	27.004913216028434	26.979999925331065	26.941037674211962	26.99995146519121	26.95084543903468	26.97609847339359	26.99262270906369	26.942271578389317	26.88024222603034	26.866450873439888	26.947610407356386	26.975012040366025	26.966286975124042	26.917634562757375	26.885127441207544	26.846286527110426	26.769134848366058	26.709703975000842	26.551336760637525	26.42626069165836	26.309463541024982	26.127226534353312	25.91885539987082	25.674260497519125	25.371903572535274	24.758753999454918	23.84710415196622	22.40618968149965	23.009550156991438
+Sample	0	1	2	3	4	5	6	7	8	9	10	11	12	13	14	15	16	17	18	19	20	21	22	23	24	25	26	27	28	29	30	31	32	33	34	35	36	37	38	39	40	41	42	43	44	45	46	47	48	49	50	51	52	53	54
+poulet5_1	(1, 20.91988023102569)	(2, 20.71684045861661)	(3, 20.351574954545285)	(4, 22.531542025544244)	(5, 24.673566076408722)	(6, 25.813099918237516)	(7, 27.587864804423386)	(8, 27.598941941168345)	(9, 27.07115949658203)	(10, 27.129873548155864)	(12, 27.009298149330405)	(14, 27.123565889736383)	(16, 27.086309823818645)	(18, 27.07924614241606)	(20, 27.082520375286073)	(22, 27.054301117420636)	(24, 27.06350966402712)	(26, 27.082996389756914)	(28, 27.065495857740743)	(30, 27.09608772106672)	(32, 27.087097581099798)	(34, 27.098251253504774)	(36, 27.05184077595959)	(38, 27.06521958267531)	(40, 27.072148859992012)	(42, 27.065725464720796)	(44, 27.07168031241483)	(46, 27.048083061725073)	(48, 27.04642354460909)	(50, 27.062865644448927)	(52, 27.01859629866081)	(54, 26.994157155710866)	(56, 27.110127347871376)	(58, 26.995846540401494)	(60, 27.00461640700544)	(62, 26.981614641085088)	(64, 26.98900313236189)	(66, 27.001189102815392)	(68, 26.917739099268616)	(70, 26.98481793846533)	(72, 26.89518908041471)	(74, 26.93677034448514)	(76, 26.87640237596556)	(78, 26.906094478605482)	(80, 26.80463992772047)	(82, 26.717012197170796)	(84, 26.46960974280285)	(86, 26.442842795754324)	(88, 26.34282375517549)	(90, 26.03493946215965)	(92, 25.833215729758187)	(94, 25.503102494315826)	(96, 24.52807178671565)	(98, 23.202399486277717)	(100, 23.72906749698524)
+poulet5_2	(1, 20.590586487162543)	(2, 20.458478471078855)	(3, 20.178608096352797)	(4, 22.495204387546714)	(5, 24.59397272343746)	(6, 25.77560491172265)	(7, 26.651378201897337)	(8, 27.54968284369178)	(9, 27.089005372429988)	(10, 27.058984726469017)	(12, 26.954911162632676)	(14, 27.066410552214123)	(16, 27.04552938409328)	(18, 27.025118630273028)	(20, 27.019042445557012)	(22, 27.010315513591614)	(24, 27.03931879529138)	(26, 26.978450544896567)	(28, 27.003714779595967)	(30, 27.025971722873706)	(32, 27.017791740868923)	(34, 27.00628899118533)	(36, 27.00906294218011)	(38, 27.034922661648913)	(40, 27.005346295860726)	(42, 27.000909094303132)	(44, 27.004913216028434)	(46, 26.979999925331065)	(48, 26.941037674211962)	(50, 26.99995146519121)	(52, 26.95084543903468)	(54, 26.97609847339359)	(56, 26.99262270906369)	(58, 26.942271578389317)	(60, 26.88024222603034)	(62, 26.866450873439888)	(64, 26.947610407356386)	(66, 26.975012040366025)	(68, 26.966286975124042)	(70, 26.917634562757375)	(72, 26.885127441207544)	(74, 26.846286527110426)	(76, 26.769134848366058)	(78, 26.709703975000842)	(80, 26.551336760637525)	(82, 26.42626069165836)	(84, 26.309463541024982)	(86, 26.127226534353312)	(88, 25.91885539987082)	(90, 25.674260497519125)	(92, 25.371903572535274)	(94, 24.758753999454918)	(96, 23.84710415196622)	(98, 22.40618968149965)	(100, 23.009550156991438)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trimmomatic_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,40 @@
+<macros>
+    <token name="@TRIMMOMATIC_COMMAND@">
+        <!--This pattern is used to check the file content in the @CHECK_LN_FILE@ token. The pattern should be included in the file. -->
+    #set $pattern = "Trimmomatic"
+    @LN_FILES@
+</token>
+    <xml name="trimmomatic_form">
+        <param name="input" type="data" format="txt,tabular,tsv,csv" label="Output of Trimmomatic" help="It should contain 'TTrimmomatic" multiple="true"/>
+    </xml>
+    <xml name="trimmomatic_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="trimmomatic"/>
+                    <param name="input" value="trimmomatic.txt"/>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <param name="flat" value="true"/>
+            <param name="export" value="true"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="trimmomatic_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="Trimmomatic_mqc_generalstats_trimmomatic_dropped_pct"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="2"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="1"/>
+        </test>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vcftools_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,94 @@
+<macros>
+    <token name="@VCFTOOLS_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "relatedness2"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.relatedness2')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "tstv_by_count"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.count')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "tstv_by_qual"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.qual')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type) == "tstv_summary"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.summary')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="vcftools_form">
+        <repeat name="output" title="VCFTools output" min="1">
+            <conditional name="type">
+                <param name="type" type="select" label="Type of VCFTools output?">
+                    <option value="relatedness2">relatedness2</option>
+                    <option value="tstv_by_count">tstv_by_count</option>
+                    <option value="tstv_by_qual">tstv_by_qual</option>
+                    <option value="tstv_summary">tstv_summary</option>
+                </param>
+                <when value="relatedness2">
+                    <param name="input" type="data" format="txt" label="VCFTools relatedness2 output" multiple="true"/>
+                </when>
+                <when value="tstv_by_count">
+                    <param name="input" type="data" format="tabular,tsv" label="VCFTools TsTV count output" multiple="true"/>
+                </when>
+                <when value="tstv_by_qual">
+                    <param name="input" type="data" format="tabular" label="VCFTools TsTV qual output" multiple="true"/>
+                </when>
+                <when value="tstv_summary">
+                    <param name="input" type="data" format="txt" label="VCFTools TsTV summary output" multiple="true"/>
+                </when>
+            </conditional>
+        </repeat>
+    </xml>
+    <xml name="vcftools_test">
+        <test expect_num_outputs="2">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="vcftools"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="tstv_by_qual"/>
+                            <param name="input" value="vcftools.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment for the report"/>
+            <output name="html_report">
+                <assert_contents>
+                    <has_text text="Title of the report"/>
+                    <has_text text="Commment for the report"/>
+                    <has_text text="cutadapt_trimmed_sequences_plot"/>
+                    <has_text text="All-in-one FASTQ preprocessor"/>
+                    <has_text text="trimmomatic_plot"/>
+                </assert_contents>
+            </output>
+            <output name="stats">
+                <assert_contents>
+                    <has_text text="dataset_33"/>
+                    <has_text text="R1_fq"/>
+                    <has_text text="result_right"/>
+                    <has_text text="25839_merged"/>
+                    <has_text text="C2"/>
+                    <has_n_lines n="11"/>
+                    <has_n_columns n="22"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="29"/>
+        </test>
+    </xml>
+</macros>