view irma.xml @ 3:205a59cb55f1 draft default tip

planemo upload for repository https://github.com/aaronKol/tools-iuc/tree/main/tools/irma commit 308791d86112ad5ecfca99789841a9520e9bcb34
author iuc
date Wed, 29 Jan 2025 08:19:15 +0000
parents 69ce61289a2a
children
line wrap: on
line source

<tool id="irma" name="IRMA" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.1">
    <description>Construct robust assemblies of highly variable RNA viruses</description>
    <macros>
        <token name="@TOOL_VERSION@">1.2.0</token>
        <token name="@VERSION_SUFFIX@">3</token>
    </macros>
    <xrefs>
        <xref type="bio.tools">irma-virus</xref> 
    </xrefs>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">irma</requirement>
        <requirement type="package" version="3.12">python</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
## handle gz inputs
#if $input_type == 'single'
  #if $input_type_conditional.fastq_input1.is_of_type('fastq.gz')
    ln -sf '${input_type_conditional.fastq_input1}' file1.fastq.gz &&
  #end if
#elif $input_type == 'paired_collection'
  #if $input_type_conditional.fastq_input.forward.is_of_type('fastq.gz')
    ln -sf '${input_type_conditional.fastq_input.forward}' file1.fastq.gz &&
    ln -sf '${input_type_conditional.fastq_input.reverse}'  file2.fastq.gz &&
  #end if
#end if

## irma command
IRMA '${module}'
#if $input_type_conditional.input_type == 'single'
  #if $input_type_conditional.fastq_input1.is_of_type('fastq.gz')
    file1.fastq.gz
  #else
    '${input_type_conditional.fastq_input1}'
  #end if
#elif $input_type_conditional.input_type == 'paired_collection'
  #if $input_type_conditional.fastq_input.forward.is_of_type('fastq.gz')
    file1.fastq.gz
    file2.fastq.gz
  #else
    '${input_type_conditional.fastq_input.forward}'
    '${input_type_conditional.fastq_input.reverse}'
  #end if
#end if
resultDir &&
## IRMA does not write empty output files
## so the following script makes sure all expected outputs exist unconditionally
python3 '$__tool_directory__/createMissingFiles.py' 
    ]]></command>
    <configfiles>
        <configfile filename='irma_config.sh'><![CDATA[
SINGLE_LOCAL_PROC=\${GALAXY_SLOTS:-1}
DOUBLE_LOCAL_PROC=\$((SINGLE_LOCAL_PROC/2 + (SINGLE_LOCAL_PROC==1)))
TMP=\$TMPDIR
ASSEM_PROG="MINIMAP2"
GRID_ON=0
SKIP_E=$SKIP_E
SORT_PROG="BLAT" ## LABEL is not working in galaxy docker.
#if $advanced_config.customize == 'yes':
  #if $advanced_config.read_gathering == 'yes':
MAX_ROUNDS=$advanced_config.read_gathering.MAX_ROUNDS		                        
USE_MEDIAN=$advanced_config.read_gathering.USE_MEDIAN		                        
QUAL_THRESHOLD=$advanced_config.read_gathering.QUAL_THRESHOLD	                    
MIN_LEN=$advanced_config.read_gathering.MIN_LEN         		                    
INCL_CHIM=$advanced_config.read_gathering.INCL_CHIM     		                    
ADAPTER=$advanced_config.read_gathering.ADAPTER                              
ENFORCE_CLIPPED_LENGTH=$advanced_config.read_gathering.ENFORCE_CLIPPED_LENGTH
MERGE_SECONDARY=$advanced_config.read_gathering.MERGE_SECONDARY         		    
RESIDUAL_ASSEMBLY_FACTOR=$advanced_config.read_gathering.RESIDUAL_ASSEMBLY_FACTOR   
  #end if
  #if $advanced_config.match_step == 'yes':
MIN_RP=$advanced_config.match_step.MIN_RP    
MIN_RC=$advanced_config.match_step.MIN_RC
MIN_BLAT_MATCH=$advanced_config.match_step.MIN_BLAT_MATCH
  #end if
  #if $advanced_config.align_step == 'yes':
ALIGN_PROG=$advanced_config.align_step.ALIGN_PROG
DEL_TYPE=$advanced_config.align_step.DEL_TYPE
  #end if
  #if $advanced_config.assembly == 'yes':
MAX_ITER_ASSEM=$advanced_config.assembly.MAX_ITER_ASSEM
NO_MERGE=$advanced_config.assembly.NO_MERGE            
INS_T=$advanced_config.assembly.INS_T
DEL_T=$advanced_config.assembly.DEL_T
INS_T_DEPTH=$advanced_config.assembly.INS_T_DEPTH
DEL_T_DEPTH=$advanced_config.assembly.DEL_T_DEPTH
SILENCE_COMPLEX_INDELS=$advanced_config.assembly.SILENCE_COMPLEX_INDELS
MIN_AMBIG=$advanced_config.assembly.MIN_AMBIG
ALIGN_AMENDED=$advanced_config.assembly.ALIGN_AMENDED
MM2_A=$advanced_config.assembly.MM2_A
MM2_B=$advanced_config.assembly.MM2_B
MM2_O=$advanced_config.assembly.MM2_O
    #if $module == "FLU-avian":
## respect user choice of A,B,O,E, but configure short read presets otherwise
MM2_E="$advanced_config.assembly.MM2_E -x sr"
    #else:
MM2_E=$advanced_config.assembly.MM2_E
    #end if
  #else:
    #if $module == "FLU-avian":
configure short read presets for minimap2 overwriting irma module defaults where necessary
MM2_A=2
MM2_B=8
MM2_O="12,32"
MM2_E="2,1 -x sr"
    #end if
  #end if
  #if $advanced_config.variant_calling == 'yes':
AUTO_F=$advanced_config.variant_calling.AUTO_F
MIN_FI=$advanced_config.variant_calling.MIN_FI
MIN_FD=$advanced_config.variant_calling.MIN_FD
MIN_F=$advanced_config.variant_calling.MIN_F
MIN_C=$advanced_config.variant_calling.MIN_C
MIN_AQ=$advanced_config.variant_calling.MIN_AQ
MIN_TCC=$advanced_config.variant_calling.MIN_TCC
MIN_CONF=$advanced_config.variant_calling.MIN_CONF
SIG_LEVEL=$advanced_config.variant_calling.SIG_LEVEL
  #end if
#end if
]]></configfile>
    </configfiles>
    <inputs>
        <conditional name="input_type_conditional">
            <param name="input_type" type="select" label="Input Type">
                <option value="single" selected="true">Single Dataset</option>
                <option value="paired_collection">Paired Collection</option>
            </param>
            <when value="single">
                 <param name="fastq_input1" type="data" format="fastq,fastq.gz" label="Select fastq dataset" help="Specify dataset with single reads"/>
            </when>
            <when value="paired_collection">
                 <param name="fastq_input" type="data_collection" format="fastq,fastq.gz" collection_type="paired" label="Select dataset pair" help="Specify paired dataset collection containing paired reads"/>
            </when>
        </conditional>
        <param name="module" type="select" label="Select platform">
            <option value="FLU-avian" selected="true">Illumina</option>
            <option value="FLU-minion">MinIon</option>
            <option value="FLU-pacbio">PacBio</option>
        </param>
        <param name="SKIP_E" type="boolean" falsevalue="1" truevalue="0" checked="true" label="Assemble UTRs, by elongation of reference" />
        <param name="optional_outputs" type="select" display="checkboxes" multiple="true" optional="true" label="Select additional IRMA outputs">
            <option value="amended_consensus" selected="false">Amended consensus files: Include ambiguity codes for alleles, with second allele frequency greater 0.25</option>
            <option value="bam" selected="false">Bam: Alignment files of fastq against polished reference</option>
            <option value="vcf" selected="false">Vcf: Variation calling file per segment</option>
            <option value="run_info" selected="false">Run info: Text file with run metadata</option>
        </param>
        <conditional name="advanced_config">
            <param name="customize" type="select" label="Customize Advanced Settings?" help="Choosing Yes here, lets you overwrite advanced settings defined in IRMA's default configuration file.">
                <option value="no">No, use defaults for advanced settings</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <conditional name="read_gathering">
                    <param name="customize" type="select" label="Customize settings to read gathering" help="Choosing Yes here, lets you overwrite read gathering settings.">
                        <option value="no">No, use defaults for read gathering settings</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="MAX_ROUNDS" type="integer" min="1" max="20" value="5" label="Maximal rounds of read gathering"/>
                        <param name="USE_MEDIAN" type="select" label="Use median or average for read gathering">
                            <option value="0">Average</option>
                            <option value="1" selected="true">Median</option>
                        </param>
                        <param name="QUAL_THRESHOLD" type="integer" min="0" value="30" label="Minimum read statistic to keep (Phred)"/>
                        <param name="MIN_LEN" type="integer" min="0" max="1000" value="125" label="Minimum read length to keep (bp)" />
                        <param name="INCL_CHIM" type="boolean" falsevalue="0" truevalue="1" checked="false" label="Include chimera? Transposase adapter - clips 5' of the adapter on the forward strand and 3' on the reverse strand. applicable to NextTera pair-end reads" />
                        <param name="ADAPTER" type="text" value="AGATGTGTATAAGAGACAG" label="Adapter sequence">
                            <validator type="regex">[CAGT]+</validator> 
                        </param>
                        <param name="ENFORCE_CLIPPED_LENGTH" type="boolean" falsevalue="0" truevalue="1" checked="true" label="Reads are filtered for minimum length post adapter trimming" />
                        
                        <param name="MERGE_SECONDARY" type="boolean" falsevalue="0" truevalue="1" checked="false" label="Merge secondary data after the first round to the unmatched pool. Useful if co-infections are not expected." />
                        
                        <param name="RESIDUAL_ASSEMBLY_FACTOR" type="integer" min="0" max="100" value="0" label="The ratio of match read patterns to altmatch is measured, and if its less than factor, residual assembly is performed. Set 0 for off."/>
                    </when>
                </conditional>
                <conditional name="match_step">
                    <param name="customize" type="select" label="Customize settings regarding the match step" help="Choosing Yes here, lets you overwrite match step settings.">
                        <option value="no">No, use defaults for match step settings</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="MIN_RP" type="integer" min="0" value="15" label="Minimum read pattern count to continue"/>
                        <param name="MIN_RC" type="integer" min="0" value="15" label="Minimum read count to continue"/>
                        <param name="MIN_BLAT_MATCH" type="integer" min="0" value="0" label="Minimum read pattern count to continue"/>
                    </when>
                </conditional>
                <conditional name="align_step">
                    <param name="customize" type="select" label="Customize settings regarding the alignment step" help="Choosing Yes here, lets you overwrite align step settings.">
                        <option value="no">No, use defaults for align step settings</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="ALIGN_PROG" type="select" label="Select program used for alignment">
                            <option value="BLAT">BLAT</option>
                            <option value="SAM" selected="true">SAM</option>
                        </param>
                        <param name="DEL_TYPE" type="select" label="How to handle deletions in rough alignment">
                            <option value="" selected="true">Default</option>
                            <option value="NNN">NNN</option>
                            <option value="REF">REF</option>
                            <option value="DEL" >DEL</option>
                        </param>
                    </when>
                </conditional>
                <conditional name="assembly">
                    <param name="customize" type="select" label="Customize settings regarding the assembly" help="Choosing Yes here, lets you overwrite assembly settings.">
                        <option value="no">No, use defaults for assembly settings</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="MAX_ITER_ASSEM" type="integer" min="1" value="5" label="Maximal assembly iteration"/>
                        <!-- true and false values are inverted for the next param because we're asking the opposite question of what we need to configure -->
                        <param name="NO_MERGE" type="boolean" falsevalue="1" truevalue="0" checked="true" label="Merge read pairs?" help="Merging read pairs after final assembly provides error detection and correction." />
                        <param name="INS_T" type="float" min="0" max="1" value="0.25" label="The minimum frequency threshold for insertion refinement"/>
                        <param name="DEL_T" type="float" min="0" max="1" value="0.6" label="The minimum frequency threshold for deletion refinement"/>
                        <param name="INS_T_DEPTH" type="integer" min="1" value="1" label="The minimum coverage depth for insertion refinement"/>
                        <param name="DEL_T_DEPTH" type="integer" min="1" value="1" label="The minimum coverage depth for deletion refinement"/>
                        <param name="SILENCE_COMPLEX_INDELS" type="boolean" falsevalue="0" truevalue="1" checked="false" label="Silences reads with complex indels (having 4 indels with at least one greater than 9)" />
                        <param name="MIN_AMBIG" type="float" min="0" max="1" value="0.25" label="The minimum called SNV frequency for mixed base in amended consensus folder"/>
                        <param name="MM2_A" type="integer" min="1" value="2" label="The minimap2 match score"/>
                        <param name="MM2_B" type="integer" min="1" value="8" label="The minimap2 mismatch penalty"/>
                        <param name="MM2_O" type="integer" min="1" value="10" label="The minimap2 gap open penalty"/>
                        <param name="MM2_E" type="integer" min="1" value="1" label="The minimap2 gap extension penalty"/>
                        <param name="ALIGN_AMENDED" type="boolean" falsevalue="0" truevalue="1" checked="false" label="Do global alignment of the amended consensus to the HMM profile" />
                    </when>
                </conditional>
                <conditional name="variant_calling">
                    <param name="customize" type="select" label="Customize settings regarding the variant calling" help="Choosing Yes here, lets you overwrite variant calling settings.">
                        <option value="no">No, use defaults for variant calling settings</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="AUTO_F" type="boolean" falsevalue="0" truevalue="1" checked="true" label="Automatically adjust frequency threshold" />
                        <param name="MIN_FI" type="float" min="0" max="1" value="0.005" label="The minimum insertion variant frequency"/>
                        <param name="MIN_FD" type="float" min="0" max="1" value="0.005" label="The minimum deletion variant frequency"/>
                        <param name="MIN_F" type="float" min="0" max="1" value="0.008" label="The minimum frequency for single nucleotide variants"/>
                        <param name="MIN_C" type="integer" min="1" value="2" label="The minimum count for variants"/>
                        <param name="MIN_AQ" type="integer" min="1" value="24" label="The minimum average variant quality (does not apply to deletions)"/>
                        <param name="MIN_TCC" type="integer" min="1" value="100" label="The minimum non-ambiguous column coverage"/>
                        <param name="MIN_CONF" type="float" min="0" max="1" value="0.80" label="The minimum confidence"/>
                        <param name="SIG_LEVEL" type="select" label="The significance test level for variant calling">
                            <option value="0.999" selected="true">99.9%</option>
                            <option value="0.99" >99%</option>
                            <option value="0.95" >95%</option>
                            <option value="0.90" >90%</option>
                        </param>
                    </when>
                </conditional>          
            </when>
        </conditional>
    </inputs>
    <outputs>
        <collection name="consensus_collection" type="list" label="Fasta Consensus Sequences">
            <data name="PB2" format="fasta" from_work_dir="resultDir/A_PB2.fasta" label="PB2"/>
            <data name="PB1" format="fasta" from_work_dir="resultDir/A_PB1.fasta" label="PB1"/>
            <data name="PA" format="fasta" from_work_dir="resultDir/A_PA.fasta" label="PA"/>
            <data name="HA" format="fasta" from_work_dir="resultDir/A_HA.fasta" label="HA"/>
            <data name="NP" format="fasta" from_work_dir="resultDir/A_NP.fasta" label="NP"/>
            <data name="NA" format="fasta" from_work_dir="resultDir/A_NA.fasta" label="NA"/>
            <data name="MP" format="fasta" from_work_dir="resultDir/A_MP.fasta" label="MP"/>
            <data name="NS" format="fasta" from_work_dir="resultDir/A_NS.fasta" label="NS"/>
        </collection>
        <!-- optional outputs-->
        <collection name="amended_collection" type="list" label="Amended Fasta Consensus">
            <filter>optional_outputs and 'amended_consensus' in optional_outputs</filter>
            <data name="PB2" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_1.fa"  label="PB2"/>
            <data name="PB1" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_2.fa" label="PB1"/>
            <data name="PA" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_3.fa"  label="PA"/>
            <data name="HA" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_4.fa"  label="HA"/>
            <data name="NP" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_5.fa"  label="NP"/>
            <data name="NA" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_6.fa"  label="NA"/>
            <data name="MP" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_7.fa" label="MP"/>
            <data name="NS" format="fasta" from_work_dir="resultDir/amended_consensus/resultDir_8.fa"  label="NS"/>
        </collection>
        <collection name="bam_collection" type="list" label="Alignment files (bam)">
            <filter>optional_outputs and 'bam' in optional_outputs</filter>
            <data name="PB2" format="bam" from_work_dir="resultDir/A_PB2.bam" label="PB2"/>
            <data name="PB1" format="bam" from_work_dir="resultDir/A_PB1.bam" label="PB1"/>
            <data name="PA" format="bam" from_work_dir="resultDir/A_PA.bam" label="PA"/>
            <data name="HA" format="bam" from_work_dir="resultDir/A_HA.bam" label="HA"/>
            <data name="NP" format="bam" from_work_dir="resultDir/A_NP.bam" label="NP"/>
            <data name="NA" format="bam" from_work_dir="resultDir/A_NA.bam" label="NA"/>
            <data name="MP" format="bam" from_work_dir="resultDir/A_MP.bam" label="MP"/>
            <data name="NS" format="bam" from_work_dir="resultDir/A_NS.bam" label="NS"/>
        </collection>
        <collection name="vcf_collection" type="list" label="Variant calling files (VCF)">
            <filter>optional_outputs and 'vcf' in optional_outputs</filter>
            <data name="PB2" format="vcf" from_work_dir="resultDir/A_PB2.vcf" label="PB2"/>
            <data name="PB1" format="vcf" from_work_dir="resultDir/A_PB1.vcf" label="PB1"/>
            <data name="PA" format="vcf" from_work_dir="resultDir/A_PA.vcf" label="PA"/>
            <data name="HA" format="vcf" from_work_dir="resultDir/A_HA.vcf" label="HA"/>
            <data name="NP" format="vcf" from_work_dir="resultDir/A_NP.vcf" label="NP"/>
            <data name="NA" format="vcf" from_work_dir="resultDir/A_NA.vcf" label="NA"/>
            <data name="MP" format="vcf" from_work_dir="resultDir/A_MP.vcf" label="MP"/>
            <data name="NS" format="vcf" from_work_dir="resultDir/A_NS.vcf" label="NS"/>
        </collection>
        <data name="run_info" label="IRMA run info" format="txt" from_work_dir="resultDir/logs/run_info.txt"> 
            <filter>optional_outputs and 'run_info' in optional_outputs</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="27">
            <conditional name="input_type_conditional">
                <param name="fastq_input1" value="forward.fastqsanger" />
                <param name="input_type" value="single" />
            </conditional>
            <conditional name="advanced_config">
                <param name="customize" value="no" />
            </conditional>
            <param name="module" value="FLU-avian" />
            <param name="SKIP_E" value="1" />
            <param name="optional_outputs" value="vcf,bam"/>
            <output_collection name="consensus_collection" type="list">
                <element name="HA">
                  <assert_contents>
                    <has_n_lines n="2"/>
                  </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="18">
            <param name="module" value="FLU-avian" />
            <param name="SKIP_E" value="1" />
            <param name="optional_outputs" value="bam"/>
            <conditional name="input_type_conditional">
                <param name="input_type" value="paired_collection"/>
                <param name="fastq_input">
                    <collection type="paired">
                        <element name="forward" value="forward.fastqsanger" />
                        <element name="reverse" value="reverse.fastqsanger" />
                    </collection>
                </param>
            </conditional>
            <output_collection name="consensus_collection" type="list" count="8">
                <element name="HA">
                    <assert_contents>
                        <has_n_lines n="2"/>
                    </assert_contents>
                </element>
            </output_collection>
            <output_collection name="bam_collection" type="list" count="8" />
        </test>
        <test expect_num_outputs="9">
            <param name="module" value="FLU-avian" />
            <param name="SKIP_E" value="1" />
            <conditional name="input_type_conditional">
                <param name="input_type" value="paired_collection"/>
                <param name="fastq_input">
                    <collection type="paired">
                        <element name="forward" value="forward.fastqsanger" />
                        <element name="reverse" value="reverse.fastqsanger" />
                    </collection>
                </param>
            </conditional>
            <conditional name="advanced_config">
                <param name="customize" value="yes"/>
                <conditional name="read_gathering">
                    <param name="customize" value="yes"/>
                    <param name="MAX_ROUNDS" value="1"/>
                </conditional>
            </conditional>
            <output_collection name="consensus_collection" type="list" count="8">
                <element name="HA">
                    <assert_contents>
                        <has_n_lines n="2"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="27">
            <param name="module" value="FLU-pacbio" />
            <param name="SKIP_E" value="0" />
            <param name="optional_outputs" value="bam,vcf"/>
            <conditional name="input_type_conditional">
                <param name="input_type" value="paired_collection"/>
                <param name="fastq_input">
                    <collection type="paired">
                        <element name="forward" value="forward.fastqsanger" />
                        <element name="reverse" value="reverse.fastqsanger" />
                    </collection>
                </param>
            </conditional>
            <conditional name="advanced_config">
                <param name="customize" value="yes"/>
                <conditional name="read_gathering">
                    <param name="customize" value="yes"/>
                    <param name="MAX_ROUNDS" value="3"/>
                    <param name="USE_MEDIAN" value="1"/>
                    <param name="QUAL_THRESHOLD" value="30"/>
                    <param name="MIN_LEN" value="125"/>
                    <param name="INCL_CHIM" value="false"/>
                    <param name="ADAPTER" value="AGATGTGTATAAGAGACAG"/>
                    <param name="ENFORCE_CLIPPED_LENGTH" value="true"/>
                    <param name="MERGE_SECONDARY" value="false"/>
                    <param name="RESIDUAL_ASSEMBLY_FACTOR" value="0"/>
                </conditional>
                <conditional name="match_step">
                    <param name="customize" value="yes"/>
                    <param name="MIN_RP" value="15"/>
                    <param name="MIN_RC" value="15"/>
                    <param name="MIN_BLAT_MATCH" value="0"/>
                </conditional>
                <conditional name="align_step">
                    <param name="customize" value="yes"/>
                    <param name="ALIGN_PROG" value="SAM"/>
                    <param name="DEL_TYPE" value=""/>
                </conditional>
                <conditional name="assembly">
                    <param name="customize" value="yes"/>
                    <param name="MAX_ITER_ASSEM" value="5"/>
                    <param name="NO_MERGE" value="false"/>
                    <param name="INS_T" value="0.25"/>
                    <param name="DEL_T" value="0.6"/>
                    <param name="INS_T_DEPTH" value="1"/>
                    <param name="DEL_T_DEPTH" value="1"/>
                    <param name="SILENCE_COMPLEX_INDELS" value="true"/>
                    <param name="MIN_AMBIG" value="0.25"/>
                    <param name="MM2_A" value="2"/>
                    <param name="MM2_B" value="7"/>
                    <param name="MM2_O" value="12"/>
                    <param name="MM2_E" value="2"/>
                    <param name="ALIGN_AMENDED" value="false"/>
                </conditional>
                <conditional name="variant_calling">
                    <param name="customize" value="yes"/>
                    <param name="AUTO_F" value="true"/>
                    <param name="MIN_FI" value="0.005"/>
                    <param name="MIN_FD" value="0.005"/>
                    <param name="MIN_F" value="0.008"/>
                    <param name="MIN_C" value="2"/>
                    <param name="MIN_AQ" value="24"/>
                    <param name="MIN_TCC" value="100"/>
                    <param name="MIN_CONF" value="0.80"/>
                    <param name="SIG_LEVEL" value="0.999"/>
                </conditional>
            </conditional>
            <output_collection name="consensus_collection" type="list" count="8">
                <element name="HA">
                    <assert_contents>
                        <has_n_lines n="2"/>
                    </assert_contents>
                </element>
            </output_collection>
            <output_collection name="bam_collection" type="list" count="8" />
            <output_collection name="vcf_collection" type="list" count="8" />
        </test>
        <test expect_num_outputs="19">
            <conditional name="input_type_conditional">
                <param name="fastq_input1" value="forward.fastqsanger" />
                <param name="input_type" value="single" />
            </conditional>
            <conditional name="advanced_config">
                <param name="customize" value="no" />
            </conditional>
            <param name="module" value="FLU-avian" />
            <param name="SKIP_E" value="1" />
            <param name="optional_outputs" value="amended_consensus,run_info"/>
            <output_collection name="consensus_collection" type="list">
                <element name="HA">
                  <assert_contents>
                    <has_n_lines n="2"/>
                  </assert_contents>
                </element>
            </output_collection>
            <output_collection name="amended_collection" type="list">
                <element name="HA">
                  <assert_contents>
                    <has_n_lines n="2"/>
                  </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

IRMA (Iterative Refinement Meta-Assembler) can be used to obtain robust assembly, variant calling, and phasing of highly variable RNA viruses.
These are obtained after an iterative assembly approach. Visit https://wonder.cdc.gov/amd/flu/irma/ for more information.
IRMA offers modules for influenza, RSV, ebolavirus and coronavirus, but this Galaxy wrapper currently only supports influenza modules.

**Inputs**

Specify the sequencing platform and provide your read data.

**Outputs**

The default output of the tool is a collection of majority consensus sequences in FASTA format.

Optionally, collections of ambiguous consensus sequences, of read mapping and variant calling results can be produced as additional outputs.

**Settings**

IRMA provides carefully chosen default settings for its different analysis modes.
Advanced(!) users have the option to override these through the advanced config section.

This wrapper always uses *minimap2* at the assembly step (even where the IRMA command line tool would default to SSW). For MinIon and PacBio data it uses minimap2's default long reads settings with IRMA-specific modifications of -A, -B, -O and -E parameters. For Illumina data minimap2 is run with its short-reads preset (-x sr) configuration. For all platforms, the minimap2 options -A (match score), -B (mismatch penalty), -O (gap open penalty) and -E (gap extension penalty) are user-configurable via Advanced settings -> Assembly settings.

.. class:: Warning mark

    By enabling any section of the advanced configuration options you will override the default settings for *all* parameters in that section, and the default values of a section may not be IRMA's defaults for the selected module, but reflect IRMA's global defaults.

https://wonder.cdc.gov/amd/flu/irma/configuration.html provides more information about configuration parameters.
    ]]></help>
    <citations>
        <citation type="doi">10.1186/s12864-016-3030-6</citation>
    </citations>
</tool>