view multiqc.xml @ 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
line wrap: on
line source

<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"/>
    <version_command>multiqc --version</version_command>
    <command detect_errors="aggressive">
<![CDATA[
#import re
#import os

die() { echo "$@" 1>&2 ; exit 1; } &&

mkdir multiqc_WDir &&

#set $configfile="F"

#for $i, $repeat in enumerate( $results )
    #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"
        @BAMTOOLS_COMMAND@
    #elif str($repeat.software_cond.software) == "bcftools"
        @BCFTOOLS_COMMAND@
    #elif str($repeat.software_cond.software) == "bismark"
        @BISMARK_COMMAND@
    #elif str($repeat.software_cond.software) == "bowtie2"
        @BOWTIE2_COMMAND@
    #elif str($repeat.software_cond.software) == "busco"
        @BUSCO_COMMAND@
    #elif str($repeat.software_cond.software) == "cutadapt"
        @CUTADAPT_COMMAND@
    #elif str($repeat.software_cond.software) == "deeptools"
        @DEEPTOOLS_COMMAND@
    #elif str($repeat.software_cond.software) == "fastp"
        @FASTP_COMMAND@
    #elif str($repeat.software_cond.software) == "fastqc"
        @FASTQC_COMMAND@
    #elif str($repeat.software_cond.software) == "featureCounts"
        @FEATURECOUNTS_COMMAND@
    #elif str($repeat.software_cond.software) == "flexbar"
        @FLEXBAR_COMMAND@
    #elif str($repeat.software_cond.software) == "gatk"
        @GATK_COMMAND@
    #elif str($repeat.software_cond.software) == "hicup"
        #for $file in $repeat.software_cond.input
            @ESCAPE_IDENTIFIER@
            #set file_path = os.path.join($software_dir, 'HiCUP_summary_report_' + str($identifier))
            ln -s '${file}' '$file_path' &&
        #end for
    #elif str($repeat.software_cond.software) == "hisat2"
        #set $pattern = "HISAT2 summary stats:"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "hicexplorer"
        #set $pattern = "Min rest. site distance"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "htseq"
        #set $pattern = "__too_low_aQual"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "kallisto"
        #set $pattern = "finding pseudoalignments for the reads"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "macs2"
        #set $pattern = "# This file is generated by MACS"
        #for $file in $repeat.software_cond.input
            @ESCAPE_IDENTIFIER@
            #set file_path = os.path.join($software_dir, str($identifier) + '_peaks.xls')
            grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
            ln -s '$file' '$file_path' &&
        #end for
    #elif str($repeat.software_cond.software) == "picard"
        @PICARD_COMMAND@
    #elif str($repeat.software_cond.software) == "prokka"
        #set $pattern = "contigs:"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "pycoqc"
        @PYCOQC_COMMAND@
    #elif str($repeat.software_cond.software) == "qualimap"
        @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))
            #set file_path = os.path.join($file_dir, 'report.tsv')
            mkdir '$file_dir' &&
            ln -s '$file' '$file_path' &&
        #end for
    #elif str($repeat.software_cond.software) == "rsem"
        #for $file in $repeat.software_cond.input
            @ESCAPE_IDENTIFIER@
            #set file_path = os.path.join($software_dir, str($identifier) + '.cnt')
            ln -s '$file' '$file_path' &&
        #end for
    #elif str($repeat.software_cond.software) == "rseqc"
        @RSEQC_COMMAND@
    #elif str($repeat.software_cond.software) == "salmon"
        @SALMON_COMMAND@
    #elif str($repeat.software_cond.software) == "samblaster"
        #set $pattern = "samblaster: Version"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "samtools"
        @SAMTOOLS_COMMAND@
    #elif str($repeat.software_cond.software) == "slamdunk"
        #set $pattern = "# slamdunk"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "snpeff"
        #set $pattern = "SnpEff_version"
        @LN_FILES@
    #elif str($repeat.software_cond.software) == "sortmerna"
        #set $pattern = "Minimal SW score based on E-value"
        @LN_FILES@
    #else if str($repeat.software_cond.software) == "star":
        @STAR_COMMAND@
    #elif str($repeat.software_cond.software) == "tophat"
        #for $file in $repeat.software_cond.input
            @ESCAPE_IDENTIFIER@
            #set file_path = os.path.join($software_dir, str($identifier) + 'align_summary.txt')
            ln -s '$file' '$file_path' &&
        #end for
    #elif str($repeat.software_cond.software) == "trimmomatic"
        @TRIMMOMATIC_COMMAND@
    #elif str($repeat.software_cond.software) == "vcftools"
        @VCFTOOLS_COMMAND@
    #else if str($repeat.software_cond.software) == "custom_content":
        #set $configfile = "T"
        #for $j, $file in enumerate( $repeat.software_cond.input )
            #set file_path = os.path.join($software_dir, 'file_' + str($i) + '_' + str($j))
            ln -s '$file' '$file_path' &&
            more $file &&
        #end for
    #end if
#end for

multiqc multiqc_WDir
--filename 'report'

#if str($title)
    --title '$title'
#end if
#if str($comment)
    --comment '$comment'
#end if

$flat
$export

#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>
    <expand macro="configfile"/>
    <inputs>
        <repeat name="results" title="Results" min="1">
            <conditional name="software_cond">
                <param name="software" type="select" label="Which tool was used generate logs?" help="Software name">
                    <!--<option value="adapterRemoval">Adapter Removal</option>-->
                    <!--<option value="afterqc">AfterQC</option>-->
                    <option value="bamtools">Bamtools</option>
                    <!--<option value="bbmap">BBMap</option>-->
                    <option value="bcftools">Bcftools</option>
                    <!--<option value="bcl2fastq">bcl2fastq</option>-->
                    <!--<option value="biobambam2">biobambam2</option>-->
                    <!--<option value="biobloomtools">BioBloom Tools</option>-->
                    <option value="bismark">Bismark</option>
                    <!--<option value="bowtie1">Bowtie 1</option>-->
                    <option value="bowtie2">Bowtie 2</option>
                    <option value="busco">BUSCO</option>
                    <!--<option value="clusterflow">Cluster Flow</option>-->
                    <option value="cutadapt">Cutadapt/Trim Galore!</option>
                    <!--<option value="clipandmerge">ClipAndMerge</option>-->
                    <!--<option value="conpair">Conpair</option>-->
                    <!--<option value="dedup">DeDup</option>-->
                    <option value="deeptools">deepTools</option>
                    <!--<option value="disambiguate">Disambiguate</option>-->
                    <!--<option value="fastq_screen">FastQ Screen</option>-->
                    <option value="fastp">fastp</option>
                    <option value="fastqc">FastQC</option>
                    <option value="featureCounts">featureCounts</option>
                    <!--<option value="fgbio">fgbio</option>-->
                    <option value="flexbar">Flexbar</option>
                    <option value="gatk">GATK</option>
                    <!--<option value="goleft_indexcov">goleft indexcov</option>-->
                    <option value="hicexplorer">HiCExplorer</option>
                    <!--<option value="hicup">HiCUP</option>-->
                    <option value="hisat2">HISAT2</option>
                    <!--<option value="homer">HOMER</option>-->
                    <option value="htseq">HTSeq</option>
                    <!--<option value="interop">InterOp</option>-->
                    <!--<option value="jellyfish">Jellyfish</option>-->
                    <option value="kallisto">Kallisto</option>
                    <!--<option value="leehom">leeHom</option>-->
                    <option value="macs2">MACS2</option>
                    <!--<option value="methylQA">methylQA</option>-->
                    <!--<option value="mosdepth">mostdepth</option>-->
                    <!--<option value="mtnucratio">mtnucratio</option>-->
                    <!--<option value="peddy">Peddy</option>-->
                    <option value="picard">Picard</option>
                    <!--<option value="preseq">Preseq</option>-->
                    <option value="prokka">Prokka</option>
                    <option value="pycoqc">PycoQC</option>
                    <!--<option value="qorts">QoRTs</option>-->
                    <option value="qualimap">Qualimap (BamQC or RNASeq output)</option>
                    <option value="quast">QUAST</option>
                    <!--<option value="rna_seqc">RNA-SeQC</option>-->
                    <!--<option value="rsem">RSEM (rsem-calculate-regex output)</option>-->
                    <option value="rseqc">RSeQC</option>
                    <!--<option value="salmon">Salmon</option>-->
                    <option value="samblaster">Samblaster</option>
                    <option value="samtools">Samtools</option>
                    <!--<option value="sargasso">Sargasso</option>-->
                    <!--<option value="seqyclean">SeqyClean</option>-->
                    <!--<option value="sexdeterrmine">SexDetErrmine</option>-->
                    <!--<option value="skewer">Skewer</option>-->
                    <option value="slamdunk">Slamdunk</option>
                    <option value="snpeff">SnpEff</option>
                    <option value="sortmerna">SortMeRNA</option>
                    <option value="star">STAR</option>
                    <!--<option value="supernova">Supernova</option>-->
                    <!--<option value="theta2">THeTA2</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>-->
                    <!--Custom-->
                    <option value="custom_content">Custom Content</option>
                </param>
                <when value="bamtools">
                    <expand macro="bamtools_form"/>
                </when>
                <when value="bcftools">
                    <expand macro="bcftools_form"/>
                </when>
                <when value="bismark">
                    <expand macro="bismark_form"/>
                </when>
                <when value="bowtie2">
                    <expand macro="bowtie2_form"/>
                </when>
                <when value="busco">
                    <expand macro="busco_form"/>
                </when>
                <when value="cutadapt">
                    <expand macro="cutadapt_form"/>
                </when>
                <when value="deeptools">
                    <expand macro="deeptools_form"/>
                </when>
                <when value="fastp">
                    <expand macro="fastp_form"/>
                </when>
                <when value="fastqc">
                    <expand macro="fastqc_form"/>
                </when>
                <when value="featureCounts">
                    <expand macro="featurecounts_form"/>
                </when>
                <when value="flexbar">
                    <expand macro="flexbar_form"/>
                </when>
                <when value="gatk">
                    <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'"/>
                </when>
                <when value="hisat2">
                    <param name="input" type="data" format="txt,tabular" multiple="true" label="Output of HISAT2" help="It should contain 'HISAT2 summary stats:'"/>
                </when>
                <when value="htseq">
                    <param name="input" type="data" format="txt,tabular" multiple="true" label="Output of HTSeq" help="It should contain '__too_low_aQual'"/>
                </when>
                <when value="kallisto">
                    <param name="input" type="data" format="txt,tabular,tsv,csv" multiple="true" label="Output of Kallisto" help="It should contain '[quant] finding pseudoalignments for the reads'"/>
                </when>
                <when value="macs2">
                    <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">
                    <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">
                    <expand macro="pycoqc_form"/>
                </when>
                <when value="qualimap">
                    <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">
                    <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">
                    <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'"/>
                </when>
                <when value="snpeff">
                    <param name="input" type="data" format="csv" multiple="true" label="Output of SnpEff"/>
                </when>
                <when value="sortmerna">
                    <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">
                    <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">
                    <expand macro="trimmomatic_form"/>
                </when>
                <when value="vcftools">
                    <expand macro="vcftools_form"/>
                </when>
                <when value="custom_content">
                    <param argument="plot_type" label="The plot type to visualise the data with" type="select">
                        <option value="linegraph">linegraph</option>
                        <option value="bargraph">bargraph</option>
                        <option value="scatter">scatter</option>
                        <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 name="input" type="data" format="tabular,tsv" multiple="true" label="Data files"/>
                </when>
            </conditional>
        </repeat>
        <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="."/>
                </valid>
            </sanitizer>
            <validator type="regex">[0-9a-zA-Z,: _.-]+</validator>
        </param>
        <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="."/>
                </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"/>
    </inputs>
    <outputs>
        <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="(?P&lt;designation&gt;.+)\.txt" format="tabular" directory="plots"/>
            <filter>export</filter>
        </collection>
    </outputs>
    <tests>
        <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.

**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

    ]]></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>