diff macros.xml @ 3:bb3f59096c8e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/coverm commit 2d02165f40a9f8206a69716b2302bc58f5364982
author iuc
date Wed, 26 Jul 2023 07:35:03 +0000
parents a671907f96fe
children 0ff4b0e5a3bc
line wrap: on
line diff
--- a/macros.xml	Tue Mar 28 08:36:25 2023 +0000
+++ b/macros.xml	Wed Jul 26 07:35:03 2023 +0000
@@ -1,13 +1,17 @@
 <macros>
+    <token name="@TOOL_VERSION@">0.6.1</token>
+    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@PROFILE@">22.01</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">coverm</requirement>
         </requirements>
     </xml>
-    <token name="@INPUT_FORMATS@">fasta,fastq,fastq.gz,fasta.gz</token>
-    <token name="@TOOL_VERSION@">0.6.1</token>
-    <token name="@VERSION_SUFFIX@">0</token>
-    <token name="@PROFILE@">22.01</token>
+    <xml name="bio_tools">
+        <xrefs>
+            <xref type="bio.tools">coverm</xref>
+        </xrefs>
+    </xml>
     <xml name="citation">
         <citations>
             <citation type="bibtex">
@@ -22,275 +26,315 @@
             </citation>
         </citations>
     </xml>
-    <xml name="genome_opt">
-        <conditional name="genome">
-            <param name="ref_or_genome" type="select" label="Select if you want to specify additional genome files.">
-                <option value="genomic">yes</option>
-                <option value="none" selected="true">No (Only when BAM files are provided)</option>
-            </param>
-            <when value="none">
-                <param argument="--single-genome" type="boolean" truevalue="--single-genome" falsevalue="" checked="false" label="All contigs are from the same genome."/>
-                <param type="text" name="separator" optional="true" label="Character, that separates genome names from contig names in the reference file." >
-                    <sanitizer>
-                        <valid initial="string.punctuation">
-                        </valid>
-                    </sanitizer>
-                </param>
+    <xml name="mapped">
+        <param name="mapped" type="select" label="Have the reads already been mapped to contigs?">
+            <option value="mapped">Yes (no read mapping algorithm will be undertaken)</option>
+            <option value="not-mapped" selected="true">No</option>
+        </param>
+    </xml>
+    <xml name="assembly_mode">
+        <param name="mode" type="select" label="Assembly mode?" help="Useful to know if contigs have been generated all samples together (co-assembly) or on each sample individually (individual assembly)">
+            <option value="individual">Individual assembly (1 contig file per sample)</option>
+            <option value="co" selected="true">Co-assembly (1 contig file for several samples)</option>
+        </param>
+    </xml>
+    <xml name="mapped_params">
+        <conditional name="mode">
+            <expand macro="assembly_mode"/>
+            <when value="individual">
+                <param argument="--bam-files" type="data" format="bam" label="BAM file(s)" help="These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n)."/>
+            </when>
+            <when value="co">
+                <param argument="--bam-files" type="data" format="bam" multiple="true" label="BAM file(s)" help="These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n)."/>
             </when>
-            <when value="genomic">
-                <conditional name="genomic">
-                    <param type="select" label="Reference genome source" name="source">
-                        <option value="history" selected="true">History</option>
-                        <option value="builtin">Built-in</option>
-                    </param>
-                    <when value="history">
-                        <param type="data" name="fasta_history" multiple="true" label="FASTA files of each genome" format="fasta" />
-                    </when>
-                    <when value="builtin">
-                        <param type="select" name="fasta_builtin" multiple="true" label="Reference genome(s)">
-                            <options from_data_table="all_fasta" />
-                        </param>
-                    </when>
-                </conditional>
+        </conditional>
+        <param argument="--sharded" type="boolean" truevalue="--sharded" falsevalue="" checked="false" label="BAM file(s) read-sorted alignments of a set of reads mapped to multiple reference contig sets?" help="If set, it will choose the best hit for each read pair" />
+    </xml>
+    <token name="@BAMS@"><![CDATA[
+    #if $mapped.mode.mode == 'individual'
+        #set $fn = 'bam/' + re.sub('[^\s\w\-\\.]', '_', str($mapped.mode.bam_files.element_identifier))
+        #silent $bam_fp.append( $fn )
+ln -s '$mapped.mode.bam_files' '$fn' &&
+    #else
+        #for $i, $bam in enumerate($mapped.mode.bam_files)
+            #set $fn = 'bam/' + re.sub('[^\s\w\-\\.]', '_', str($bam.element_identifier)) + '_' + str($i)
+            #silent $bam_fp.append( $fn )
+ln -s '$bam' '$fn' &&
+        #end for
+    #end if
+]]></token>
+    <xml name="genomic">
+        <conditional name="genomic">
+            <param type="select" name="source" label="Source of FASTA files with each genome" >
+                <option value="history" selected="true">History</option>
+                <option value="builtin">Built-in</option>
+            </param>
+            <when value="history">
+                <param argument="--genome-fasta-files" type="data" format="fasta" multiple="true" label="FASTA files of each genome"/>
+            </when>
+            <when value="builtin">
+                <param argument="--genome-fasta-files" type="select" multiple="true" label="Reference genome(s)">
+                    <options from_data_table="all_fasta" />
+                </param>
             </when>
         </conditional>
     </xml>
-    <xml name="genome">
-        <conditional name="genome">
-            <param name="ref_or_genome" type="select" label="Reference sequence mode" help="Select if you want to specify genome file(s) or a FASTA reference file or both. NOTE: If genomic FASTA files are specified, then reference is not needed as a reference FASTA file can be derived by concatenating input genomes. However, while not necessary, reference can be specified if an alternate reference sequence set is desired.">
-                <option value="genomic" selected="true">Reference genome</option>
-                <option value="reference">Contigs (e.g. concatenated genomes or metagenome assembly)</option>
+    <xml name="cond_single_genome">
+        <conditional name="cond_single_genome">
+            <param argument="--single-genome" type="select" label="Are all contigs from the same genome?">
+                <option value="--single-genome">True</option>
+                <option value="">False</option>
             </param>
-            <when value="genomic">
-                <conditional name="genomic">
-                    <param type="select" label="Reference genome source" name="source">
-                        <option value="history" selected="true">History</option>
-                        <option value="builtin">Built-in</option>
+            <when value="--single-genome"/>
+            <when value="">
+                <conditional name="genome_contig_definition">
+                    <param argument="choice" type="select" label="How to get genome names and contig names?">
+                        <option value="default" selected="true">Using default behavior</option>
+                        <option value="genome-definition">Providing a file containing newline-separated list of genome name and contig</option>
+                        <option value="separator">Providing character that separates genome names from contig names in the reference file</option>
                     </param>
-                    <when value="history">
-                        <param type="data" name="fasta_history" multiple="true" label="FASTA files of each genome" format="fasta" />
+                    <when value="default"/>
+                    <when value="genome-definition">
+                        <param argument="--genome-definition" type="data" format="tabular" label="File containing newline-separated list of genome_name and contig, separated by tab, to define the genome of each contig." />
                     </when>
-                    <when value="builtin">
-                        <param type="select" name="fasta_builtin" multiple="true" label="Reference genome(s)">
-                            <options from_data_table="all_fasta" />
-                        </param>
-                    </when>
-                </conditional>
-            </when>
-            <when value="reference">
-                <param type="data" name="ref_source" multiple="true" label="Contigs file(s)" format="fasta" help="If multiple references FASTA files are provided and 'sharded' is specified, then reads will be mapped to references separately as sharded BAMs."/>
-                <conditional name="cond_single_genome">
-                    <param name="single_genome" type="select" label="All contigs are from a single genome">
-                        <option value="--single-genome">True</option>
-                        <option value="false">False</option>
-                    </param>
-                    <when value="--single-genome">
-                        <param type="data" name="genome_definition" format="tsv" optional="true" label="File containing newline-separated list of genome_name and contig, separated by tab, to define the genome of each contig." />
-                    </when>
-                    <when value="false">
-                        <param type="text" argument="--separator" optional="true" label="Character, that separates genome names from contig names in the reference file." >
+                    <when value="separator">
+                        <param argument="--separator" type="text" label="Character that separates genome names from contig names in the reference file." >
                             <sanitizer>
                                 <valid initial="string.punctuation">
                                 </valid>
                             </sanitizer>
                         </param>
                     </when>
-                </conditional>                    
-                <conditional name="add_genome">
-                    <param name="add_genome" type="select" label="Add additional Genome Files">
-                        <option value="true">Yes</option>
-                        <option value="false" selected="true">No</option>
-                    </param>
-                    <when value="true">
-                        <conditional name="add_genomic">
-                            <param type="select" label="Reference genome source" name="source">
-                                <option value="history" selected="true">History</option>
-                                <option value="builtin">Built-in</option>
-                            </param>
-                            <when value="history">
-                                <param type="data" name="fasta_history" multiple="true" label="Single FASTA file of contigs" format="fasta" />
-                            </when>
-                            <when value="builtin">
-                                <param type="select" name="fasta_builtin" multiple="true" label="Reference genome">
-                                    <options from_data_table="all_fasta" />
-                                </param>
-                            </when>
-                        </conditional>                           
-                    </when>
-                    <when value="false">
-                    </when>
                 </conditional>
             </when>
         </conditional>
     </xml>
-    <xml name="reads_for_contig">
-        <conditional name="reads">
-            <param type="select" label="Read type" name="read_type">
-                <option value="paired">Paired end</option>
-                <option value="paired_collection" selected="true">Paired collection</option>
-                <option value="single">Single ended</option>
-                <option value="interleaved">Interleaved</option>
-                <option value="bam">BAM file(s)</option>
-            </param>
+    <token name="@INPUT_FORMATS@">fasta,fastq,fastq.gz,fasta.gz</token>
+    <xml name="read_type">
+        <param name="type" type="select" label="Read type" >
+            <option value="single">Single end</option>
+            <option value="paired">Paired end</option>
+            <option value="paired_collection" selected="true">Paired collection</option>
+            <option value="interleaved">Interleaved</option>
+        </param>
+    </xml>
+    <xml name="paired_reads">
+        <param name="paired_reads" type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" label="Collection of paired-end FASTA/Q files(s) for mapping" help="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order." />
+    </xml>
+    <xml name="individual_assembly_reads">
+        <conditional name="read_type">
+            <expand macro="read_type"/>
+            <when value="single">
+                <param argument="--single" type="data" format="@INPUT_FORMATS@" label="Single Read" />
+            </when>
             <when value="paired">
-                <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
-                <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
-                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+                <param argument="-1" name="read1" type="data" format="@INPUT_FORMATS@" label="Forward FASTA/Q file for mapping" />
+                <param argument="-2" name="read2" type="data" format="@INPUT_FORMATS@" label="Reverse FASTA/Q file for mapping" />
             </when>
             <when value="paired_collection">
-                <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order" />
-                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
-            </when>
-            <when value="single">
-                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Single Read" />
-                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+                <expand macro="paired_reads"/>
             </when>
             <when value="interleaved">
-                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
-                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
-            </when>
-            <when value="bam">
-                 <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" help="BAM file(s). These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n). When specified, no read mapping algorithm is undertaken."/>
-                <param type="data" name="ref_fasta_history" optional="true" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+                <param argument="--interleaved" type="data" format="@INPUT_FORMATS@" label="Interleaved FASTA/Q files for mapping" />
             </when>
         </conditional>
-    </xml>     
-    <xml name="reads">
-        <conditional name="reads">
-            <param type="select" label="Read type" name="read_type">
-                <option value="single">Single ended</option>
-                <option value="paired">Paired end</option>
-                <option value="paired_collection" selected="true">Paired collection</option>
-                <option value="interleaved">Interleaved</option>
-                <option value="bam">BAM file(s)</option>
-            </param>
+    </xml>
+    <xml name="ref_or_genome">
+        <param name="ref_or_genome" type="select" label="Genome definition">
+            <option value="contigs" selected="true">From contigs (e.g. concatenated genomes or metagenome assembly)</option>
+            <option value="genomic">From FASTA files with each genome</option>
+        </param>
+    </xml>
+    <xml name="individual_assembly_reference">
+        <param argument="--reference" type="data" format="fasta" label="Contigs"/>
+    </xml>
+    <token name="@INDIVIDUAL_ASSEMBLY_READS@"><![CDATA[
+        #set $reads = $mapped.mode.read_type
+        #if $reads.type == 'single'
+            #set $fn = "single/" + re.sub('[^\s\w\-\\.]', '_', str($reads.single.element_identifier))
+            #silent $single_fp.append( $fn )
+ln -s '$reads.single' '$single_fp' &&
+        #else if $reads.type == 'paired'
+            #set $fn = "fw/" + re.sub('[^\s\w\-\\.]', '_', str($reads.read1.element_identifier))
+            #silent $fw_fp.append( $fn )
+ln -s '$reads.read1' '$fn' &&
+            #set $fn = "rv/" + re.sub('[^\s\w\-\\.]', '_', str($reads.read2.element_identifier))
+ln -s '$reads.read2' '$fn' &&
+            #silent $rv_fp.append( $fn )
+        #else if $reads.type == 'paired_collection'
+            #set $id = re.sub('[^\s\w\-\\.]', '_', str($reads.paired_reads.element_identifier))
+            #set $fn = "fw/" + $id
+            #silent $fw_fp.append( $fn )
+ln -s '$reads.paired_reads.forward' '$fn' &&
+            #set $fn = "rv/" + $id
+            #silent $rv_fp.append( $fn )
+ln -s '$mreads.paired_reads.reverse' '${fn}' &&
+        #else if $reads.type == 'interleaved'
+            #set $fn = "interl/" + re.sub('[^\s\w\-\\.]', '_', str($reads.interleaved.element_identifier))
+            #silent $interl_fp.append( $fn )
+ln -s '$reads.interleaved' '$fn' &&
+        #end if
+]]></token>
+    <token name="@INDIVIDUAL_ASSEMBLY_REF@"><![CDATA[
+        #set $fn = "ref/" + re.sub('[^\s\w\-\\.]', '_', str($ref.element_identifier))
+        #silent $ref_fp.append( $fn )
+ln -s '$ref' '${fn}' &&
+]]></token>
+    <token name="@GENOME_FOR_READS@"><![CDATA[
+            #if $mapped.mode.genome.genomic.source == 'history'
+                #for $i, $genome in enumerate($mapped.mode.genome.genomic.genome_fasta_files)
+                    #set $fn = re.sub('[^\s\w\-\\.]', '_', str($genome.element_identifier))
+                    #silent $genome_fp.append( $fn )
+ln -s '$genome' '$fn' &&
+                #end for
+            #else
+                #for $i, $genome in enumerate($mapped.mode.genome.genomic.genome_fasta_files)
+                    #set $fn = re.sub('[^\s\w\-\\.]', '_', str($genome.fields.path.element_identifier))
+                    #silent $genome_fp.append( $fn )
+ln -s '$genome' '$fn' &&
+                #end for
+            #end if
+]]></token>
+    <xml name="co_assembly_reads">
+        <conditional name="read_type">
+            <expand macro="read_type"/>
+            <when value="single">
+                <param argument="--single" type="data" format="@INPUT_FORMATS@" multiple="true" label="Single Read" />
+            </when>
             <when value="paired">
-                <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
-                <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
-                <expand macro="genome"/>
+                <param argument="-1" name="read1" type="data" format="@INPUT_FORMATS@" multiple="true" label="Forward FASTA/Q file(s) for mapping" />
+                <param argument="-2" name="read2" type="data" format="@INPUT_FORMATS@" multiple="true" label="Reverse FASTA/Q file(s) for mapping" />
             </when>
             <when value="paired_collection">
-                <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="Collection of paired-reads" help="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order." />
-                <expand macro="genome"/>
-            </when>
-            <when value="single">
-                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Single Read" />
-                <expand macro="genome"/>
+                <expand macro="paired_reads"/>
             </when>
             <when value="interleaved">
-                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
-                <expand macro="genome"/>
-            </when>
-            <when value="bam">
-                <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" help="BAM file(s). These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n). When specified, no read mapping algorithm is undertaken."/>
-                <expand macro="genome_opt"/>
+                <param argument="--interleaved" type="data" format="@INPUT_FORMATS@" multiple="true" label="Interleaved FASTA/Q files(s) for mapping" />
             </when>
         </conditional>
     </xml>
-    <xml name="add_reads">
-        <section name="add_reads" title="Add an additional read">
-            <conditional name="extra_read">
-                <param type="select" label="Read type" name="read_type">
-                    <option value="none" selected="true">None</option>
-                    <option value="paired">Paired end</option>
-                    <option value="paired_collection">Paired collection</option>
-                    <option value="single">Single ended</option>
-                    <option value="interleaved">Interleaved</option>
-                    <option value="bam">BAM file(s)</option>
-                </param>
-                <when value="none">
-                </when>
-                <when value="paired">
-                    <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
-                    <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
-                </when>
-                <when value="paired_collection">
-                    <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order" />
-                </when>
-                <when value="single">
-                    <param type="data" format="@INPUT_FORMATS@" name="single" multiple="true" label="Single read" />
-                </when>
-                <when value="interleaved">
-                    <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
-                </when>
-                <when value="bam">
-                    <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" />
-                </when>
-            </conditional>
-        </section>
+    <xml name="co_assembly_reference">
+        <param argument="--reference" type="data" format="fasta" multiple="true" label="Contigs" />
+        <param argument="--sharded" type="boolean" truevalue="--sharded" falsevalue="" checked="false" label="Mapping reads to references separately as sharded BAMs?" />
+    </xml>
+    <token name="@CO_ASSEMBLY_READS@"><![CDATA[
+        #if $reads.type == 'single'
+            #for $i, $read in enumerate($reads.single)
+                #set $fn = "single/" + re.sub('[^\s\w\-\\.]', '_', str($read.element_identifier)) + "_single_" + str($i) + $extra
+                #silent $single_fp.append( $fn )
+ln -s '$read' '$fn' &&
+            #end for
+        #else if $reads.type == 'paired'
+            #for $i, $read in enumerate($reads.read1)
+                #set $id = re.sub('[^\s\w\-\\.]', '_', str($read.element_identifier))
+                #set $fn = "fw/" + $id + "_paired_" + str($i) + $extra
+                #silent $fw_fp.append( $fn )
+ln -s '$read' '$fn' &&
+            #end for
+            #for $i, $read in enumerate($reads.read2)
+                #set $id = re.sub('[^\s\w\-\\.]', '_', str($read.element_identifier))
+                #set $fn = "rv/" + $id + "_paired_" + str($i) + $extra
+                #silent $rv_fp.append( $fn )
+ln -s '$read' '$fn' &&
+            #end for
+        #else if $reads.type == 'paired_collection'
+            #for $i, $read in enumerate($reads.paired_reads)
+                #set $id = re.sub('[^\s\w\-\\.]', '_', str($read.element_identifier))
+                #set $fn = "fw/" + $id + "_paired_collection_" + str($i) + $extra
+                #silent $fw_fp.append( $fn )
+ln -s '$read.forward' '$fn' &&
+                #set $fn = "rv/" + $id + "_paired_collection_" + str($i) + $extra
+                #silent $rv_fp.append( $fn )
+ln -s '$read.reverse' '$fn' &&
+            #end for
+        #else if $reads.type == 'interleaved'
+            #for $i, $read in enumerate($reads.interleaved)
+                #set $id = re.sub('[^\s\w\-\\.]', '_', str($read.element_identifier))
+                #set $fn = "interl/" + $id + "_interleaved_" + str($i) + $extra
+                #silent $interl_fp.append( $fn )
+ln -s '$read' '$fn' &&
+            #end for
+        #end if
+    ]]></token>
+    <token name="@CO_ASSEMBLY_ALL_READS@"><![CDATA[
+        #set $reads = $mapped.mode.read_type
+        #set $extra = ''
+        @CO_ASSEMBLY_READS@
+        #for $j, $s in enumerate($mapped.mode.extra_reads)
+            #set $reads = $s.read_type
+            #set $extra = str($j)
+            @CO_ASSEMBLY_READS@
+        #end for
+    ]]></token>
+    <token name="@CO_ASSEMBLY_REF@"><![CDATA[
+        #for $i, $ref in enumerate($refs)
+            #set $fn = "ref/" + re.sub('[^\s\w\-\\.]', '_', str($ref.element_identifier)) + "_" + str($i)
+            #silent $ref_fp.append( $fn )
+ln -s '$ref' '${fn}' &&
+        #end for
+    ]]></token>
+    <xml name="sharded">
+        <param name="sharded" type="boolean" truevalue="--sharded" falsevalue="" checked="false" label="Input BAM files are read-sorted alignments of a set of reads mapped to multiple reference contig sets. Choose the best hit for each read pair. Otherwise if mapping was carried out: Map reads to each reference, choosing the best hit for each pair." />
     </xml>
     <xml name="mapping">
-        <section name="mapping" title="Mapping options" expanded="false">
-            <param argument="--mapper" optional="true" type="select" label="Mapper" help="Underlying mapping software used. Default: minimap2-sr" >
-                <option value="minimap2-sr">minimap2 with '-x sr' option</option>
-                <option value="minimap2-ont">minimap2 with '-x map-ont' option</option>
-                <option value="minimap2-pb">minimap2 with '-x map-pb' option</option>
-                <option value="minimap2-no-preset">minimap2 with no '-x' option</option>
-                <option value="bwa-mem">BWA-MEM using default parameters</option>
-            </param>
-            <param argument="--min_read-aligned-length" type="integer" min="0" value="0" 
-                label="Min read aligned length" help="Exclude reads with smaller numbers of aligned bases. Default: 0" />
-            <param argument="--min_read-percent-identity" type="float" min="0" max="100" value="0" 
-                label="Min read percent identity" help="Exclude reads by overall percent identity e.g. 95 for 95%. Default: 0" />
-            <param argument="--min_read-aligned-percent" type="float" min="0" max="100" value="0" 
-                label="Min read aligned percentage" help="Exclude reads by percent aligned bases e.g. 95 means 95% 
-                    of the read's bases must be aligned. Default: 0" />
-            <param argument="--min_read-aligned-length-pair" type="integer" min="0" value="0" 
-                label="Min read aligned length pair" help="Exclude pairs with smaller numbers of aligned bases. 
-                    Implies --proper-pairs-only. Default: 0" />
-            <param argument="--min_read-percent-identity-pair" type="float" min="0" max="100" value="0" 
-                label="Min read percent identity pair" help="Exclude pairs by overall percent identity e.g. 95 for 95%. 
-                    Implies --proper-pairs-only. Default: 0" />
-            <param argument="--min_read-aligned-percent-pair" type="float" min="0" max="100" value="0" 
-                label="Min read aligned percentage pair" help="Exclude reads by percent aligned bases e.g. 95 means 95% of 
-                    the read's bases must be aligned. Implies --proper-pairs-only. Default: 0" />
-            <param argument="--proper-pairs-only" type="boolean" truevalue="--proper-pairs-only" falsevalue="" 
-                label="Require reads to be mapped as proper pairs" help="Default: not set"/>
-            <param argument="--exclude-supplementary" type="boolean" truevalue="--exclude-supplementary" falsevalue="" 
-                label="Exclude supplementary alignments" help="Default: not set"/>
-        </section>
+        <param argument="--mapper" type="select" label="Underlying mapping software used">
+            <option value="minimap2-sr"  selected="true">minimap2 with '-x sr' option</option>
+            <option value="minimap2-ont">minimap2 with '-x map-ont' option</option>
+            <option value="minimap2-pb">minimap2 with '-x map-pb' option</option>
+            <option value="minimap2-no-preset">minimap2 with no '-x' option</option>
+            <option value="bwa-mem">BWA-MEM using default parameters</option>
+        </param>
     </xml>
-    <xml name="coverage">
-        <section name="cov" title="Coverage calculation options" expanded="false">
-            <param name="relative_abundance" type="boolean" falsevalue="" truevalue="relative_abundance" label="Relative abundance (default)"/>
-            <param name="mean" type="boolean" falsevalue="" truevalue="mean" label="Mean"/>
-            <conditional name="cond_methods">
-                <param name="trimmed_mean" type="select" label="Trimmed mean">
-                    <option value="trimmed_mean">Yes</option>
+    <xml name="alignment">
+        <section name="alignment" title="Alignment thresholding" expanded="false">
+            <param argument="--min-read-aligned-length" type="integer" min="0" value="0" 
+                label="Minimum number of aligned bases" help="Reads with smaller numbers of aligned bases will be excluded" />
+            <param argument="--min-read-percent-identity" type="float" min="0" max="100" value="0" 
+                label="Minimum overall percent identity" help="Reads with lower overall percent identity will be excluded." />
+            <param argument="--min-read-aligned-percent" type="float" min="0" max="100" value="0" 
+                label="Minimum aligned base percent" help="Reads with lower percent aligned bases will be excluded" />
+            <conditional name="proper_pairs_only">
+                <param argument="--proper-pairs-only" type="select" label="Require reads to be mapped as proper pairs?">
+                    <option value="--proper-pairs-only">Yes</option>
                     <option value="" selected="true">No</option>
                 </param>
-                <when value="trimmed_mean">
-                    <param name="trim_min" type="integer" min="0" value="5" label="Trim min" help="Remove this smallest fraction of positions when calculating trimmed_mean default: 5"/>
-                    <param name="trim_max" type="integer" min="0" value="95" label="Trim max" help="Maximum fraction for trimmed_mean calculations default: 95"/>
+                <when value="--proper-pairs-only">
+                    <param argument="--min_read-aligned-length-pair" type="integer" min="0" value="0" 
+                        label="Minimum number of aligned bases for pairs" help="Pairs with smaller numbers of aligned bases will be excluded." />
+                    <param argument="--min-read-percent-identity-pair" type="float" min="0" max="100" value="0" 
+                        label="Minimum overall percent identity pair for pairs" help="Pairs by lower overall percent identity will be excluded" />
+                    <param argument="--min-read-aligned-percent-pair" type="float" min="0" max="100" value="0" 
+                        label="Minimum percent of read aligned bases for pair" help="Pairs with lower reads percent aligned bases will be excluded" />
                 </when>
                 <when value=""/>
             </conditional>
-            <param name="covered_bases" type="boolean" falsevalue="" truevalue="covered_bases" label="Covered bases"/>
-            <param name="covered_fraction" type="boolean" falsevalue="" truevalue="covered_fraction" label="Covered fraction"/>
-            <param name="variance" type="boolean" falsevalue="" truevalue="variance" label="Variance"/>
-            <param name="length" type="boolean" falsevalue="" truevalue="length" label="Length"/>
-            <param name="count" type="boolean" falsevalue="" truevalue="count" label="Count"/>
-            <param name="metabat" type="boolean" falsevalue="" truevalue="metabat" label="MetaBAT"/>
-            <param name="coverage_histogram" type="boolean" falsevalue="" truevalue="coverage_histogram" label="Coverage histogram"/>
-            <param name="reads_per_base" type="boolean" falsevalue="" truevalue="reads_per_base" label="Reads per base"/>
-            <param name="rpkm" type="boolean" falsevalue="" truevalue="rpkm" label="RPKM"/>
-            <param name="tpm" type="boolean" falsevalue="" truevalue="tpm" label="TPKM"/>
-            <param name="min_covered_fraction" type="integer" min="0" optional="true"
-                label="Min covered fraction" help="Genomes with less coverage than this reported as having zero coverage. Default: 10"/>
-            <param name="contig_end_exclusion" type="integer" min="0" optional="true"
-                label="Contig end exclusion" help="Exclude bases at the ends of reference sequences from calculation. Default: 75"/>
+            <param argument="--exclude-supplementary" type="boolean" truevalue="--exclude-supplementary" falsevalue="" checked="false"
+                label="Exclude supplementary alignments"/>
         </section>
     </xml>
-    <xml name="out">
-        <section name="out" title="Output options" expanded="false">
-            <param name="output_format" type="select" label="Shape of output" help="'Sparse' for long format, 'dense' for species-by-site. Default: dense]">
-                <option value="dense" selected="true">Dense</option>
-                <option value="sparse">Sparse</option>
-            </param>
-            <param name="no_zeros" type="boolean" truevalue="--no-zeros" falsevalue="" optional="true" label="Omit printing of genomes that have zero coverage" />
-            <param argument="--dereplication-output-cluster-definition" type="boolean" truevalue="--dereplication-output-cluster-definition" falsevalue="" label="Output a file of representative TAB member lines." />
-            <param argument="--dereplication-output-representative-fasta-directory-copy" type="boolean" truevalue="--dereplication-output-representative-fasta-directory-copy" falsevalue="" label="Output representative genomes" />
-        </section>
+    <xml name="cov_method_options">
+        <option value="trimmed_mean">trimmed_mean: Average number of aligned reads overlapping each position after removing the most deeply and shallow-ly covered positions. </option>
+        <option value="coverage_histogram">coverage_histogram: Histogram of coverage depths</option>
+        <option value="covered_bases">covered_bases: Number of bases covered by 1 or more reads</option>
+        <option value="variance">variance: Variance of coverage depths</option>
+        <option value="length">length: Length of each contig in base pairs</option>
+        <option value="count">count: Number of reads aligned toq each contig. Note that a single read may be aligned to multiple contigs with supplementary alignments</option>
+        <option value="metabat">metabat: ("MetaBAT adjusted coverage") Coverage as defined in Kang et al 2015</option>
+        <option value="reads_per_base">reads_per_base: Number of reads aligned divided by the length of the contig</option>
+        <option value="rpkm">rpkm: Reads mapped per kilobase of contig, per million mapped reads</option>
+        <option value="tpm">tpm: Transcripts Per Million as described in Li et al 2010</option>
+    </xml>
+    <xml name="coverage_params">
+        <param argument="--trim-min" type="integer" min="0" value="5" label="Smallest fraction of positions to remove when calculating" help="Only used with trimmed_mean method"/>
+        <param argument="--trim-max" type="integer" min="0" value="95" label="Maximum fraction of positions to remove when calculating" help="Only used with trimmed_mean method"/>
+        <param argument="--min-covered-fraction" type="integer" min="0" value="10" label="Minimum covered fraction" help="Genomes with less coverage than this reported as having zero coverage"/>
+        <param argument="--contig-end-exclusion" type="integer" min="0" value="75" label="Base to exclude at contig ends" help="Bases at the ends of reference sequences will be excluded from calculation"/>
+    </xml>
+    <xml name="output_format">
+        <param argument="--output-format" type="select" label="Shape of output">
+            <option value="dense" selected="true">Dense for species-by-site</option>
+            <option value="sparse">Sparse for long format</option>
+        </param>
     </xml>
     <xml name="citations">
         <citations>