changeset 9:8c6cd2650d1f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/minimap2 commit ffcf3989e7b05726341bbd0457a2e58448361554"
author iuc
date Thu, 04 Jun 2020 22:29:50 -0400
parents 53c0b7a1a0c3
children 77b2770508f6
files minimap2.xml
diffstat 1 files changed, 205 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/minimap2.xml	Tue Apr 07 18:39:38 2020 -0400
+++ b/minimap2.xml	Thu Jun 04 22:29:50 2020 -0400
@@ -1,13 +1,24 @@
 <?xml version="1.0"?>
-<tool id="minimap2" name="Map with minimap2" version="@TOOL_VERSION@+galaxy1" profile="17.01">
+<tool id="minimap2" name="Map with minimap2" version="@TOOL_VERSION@+galaxy2" profile="17.01">
     <description>A fast pairwise aligner for genomic and spliced nucleotide sequences</description>
     <macros>
         <token name="@TOOL_VERSION@">2.17</token>
+        <xml name="pe_anaylsis_fixed_selector">
+            <param name="analysis_type_selector" type="select"
+            label="Presets for PE reads alignment"
+            help="These are the minimap2 preset options for PE alignment of short reads. You can customize these and other settings in the indexing, mapping and alignment options sections below.">
+                <option value="sr">Short reads without splicing (-k21 -w11 --sr -F800 -A2 -B8 -O12,32 -E2,1 -r50 -p.5 -N20 -f1000,5000 -n2 -m20 -s40 -g200 -2K50m --heap-sort=yes --secondary=no) (sr)</option>
+            </param>
+        </xml>
     </macros>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">minimap2</requirement>
         <requirement type="package" version="1.9">samtools</requirement>
     </requirements>
+    <stdio>
+        <exit_code range="1:" level="fatal" />
+        <regex match="\[ERROR\]" source="stderr" level="fatal" />
+    </stdio>
     <version_command>minimap2 --version</version_command>
     <command>
 <![CDATA[
@@ -17,83 +28,108 @@
         ln -f -s '$reference_source.ref_file.fields.path' reference.fa &&
     #end if
     minimap2
-    #if str($analysis_type_selector) == 'self-homology':
+    #if str($fastq_input.analysis_type_selector) == 'self-homology':
         -DP -k19 -w19 -m200
-    #else
-        -x $analysis_type_selector
+    #elif $fastq_input.analysis_type_selector:
+        -x ${fastq_input.analysis_type_selector}
     #end if
+
     ## indexing options
     $indexing_options.H
-    #if $indexing_options.k:
+    #if str($indexing_options.k):
         -k $indexing_options.k
     #end if
-    #if $indexing_options.w:
+    #if str($indexing_options.w):
         -w $indexing_options.w
     #end if
-    #if $indexing_options.I:
+    #if str($indexing_options.I):
         -I $indexing_options.I
     #end if
+
     ## Mapping options
-    #if $mapping_options.f:
+    #if str($mapping_options.f):
         -f $mapping_options.f
     #end if
-    #if $mapping_options.min_occ_floor:
+    #if str($mapping_options.min_occ_floor):
         --min-occ-floor $min_occ_floor
     #end if
-    #if $mapping_options.g:
+    #if str($mapping_options.g):
         -g $mapping_options.g
     #end if
-    #if $mapping_options.G:
-        -G $mapping_options.G
-    #end if
-    #if $mapping_options.F:
-        -F $mapping_options.F
-    #end if
-    #if $mapping_options.r:
+    #if str($mapping_options.r):
         -r $mapping_options.r
     #end if
-    #if $mapping_options.n:
+    #if str($mapping_options.n):
         -n $mapping_options.n
     #end if
-    #if $mapping_options.m:
+    #if str($mapping_options.m):
         -m $mapping_options.m
     #end if
+    #if str($mapping_options.max_chain_skip):
+        --max-chain-skip $mapping_options.max_chain_skip
+    #end if
+    #if str($mapping_options.max_chain_iter):
+        --max-chain-iter $mapping_options.max_chain_iter
+    #end if
     $mapping_options.X
-    #if $mapping_options.p:
+    #if str($mapping_options.p):
         -p $mapping_options.p
     #end if
-    #if $mapping_options.N:
+    #if str($mapping_options.N):
         -N $mapping_options.N
     #end if
+
     ## Alignment options
-    #if $alignment_options.A:
+    #if str($alignment_options.splicing.splice_mode) == '--splice':
+        --frag=no --splice
+        #if str($alignment_options.splicing.G):
+            -G $alignment_options.splicing.G
+        #end if
+        #if str($alignment_options.splicing.C):
+            -C $alignment_options.splicing.C
+        #end if
+        #if $alignment_options.splicing.u:
+            -u $alignment_options.splicing.u
+        #end if
+        $alignment_options.splicing.splice_flank
+        #if str($alignment_options.splicing.splice_site_annotations.use_annotations) == 'yes':
+            --junc-bed '$alignment_options.splicing.splice_site_annotations.junc_bed'
+            --junc-bonus $alignment_options.splicing.splice_site_annotations.junc_bonus
+        #end if
+    #elif str($mapping_options.F) and 'splice' not in str($fastq_input.analysis_type_selector):
+        --frag=yes -F $mapping_options.F
+    #end if
+    #if str($alignment_options.A):
         -A $alignment_options.A
     #end if
-    #if $alignment_options.B:
+    #if str($alignment_options.B):
         -B $alignment_options.B
     #end if
-    #if $alignment_options.O:
-        #if $alignment_options.O2:
+    #if str($alignment_options.O):
+        #if str($alignment_options.O2):
             -O $alignment_options.O,$alignment_options.O2
-        #end if
+        #else
             -O $alignment_options.O
         #end if
-    #if $alignment_options.E:
-        #if $alignment_options.E2:
+    #end if
+    #if str($alignment_options.E):
+        #if str($alignment_options.E2):
             -E $alignment_options.E,$alignment_options.E2
         #else
-            -E $alignment_options
+            -E $alignment_options.E
         #end if
     #end if
-    #if $alignment_options.z:
-        $alignment_options.z
+    #if str($alignment_options.z):
+        #if str($alignment_options.z2):
+            -z $alignment_options.z,$alignment_options.z2
+        #else
+            -z $alignment_options.z
+        #end if
     #end if
-    #if $alignment_options.s:
+    #if str($alignment_options.s):
         -s $alignment_options.s
     #end if
-    #if $alignment_options.u:
-        -u $alignment_options.u
-    #end if
+    $alignment_options.no_end_flt
     ## Output options
     $io_options.Q
     $io_options.L
@@ -154,12 +190,6 @@
                 <param name="ref_file" type="data" format="fasta,fastq" label="Use the following dataset as the reference sequence" help="You can upload a FASTA or FASTQ sequence to the history and use it as reference" />
             </when>
         </conditional>
-        <section name="indexing_options" title="Indexing options">
-            <param argument="-H" name="H" type="boolean" optional="true" truevalue="-H" falsevalue="" label="Use homopolymer-compressed k-mer ?"/>
-            <param argument="-k" type="integer" min="4" max="28" optional="true"  label="k-mer size" help=""/>
-            <param argument="-w" type="integer" min="1" optional="true"  label="minimizer window size" help=""/>
-            <param argument="-I" type="integer" min="1" optional="true"  label="split index for every N input gigabases" help=""/>
-        </section>
         <!-- start unchanged copy from bwa-mem -->
         <conditional name="fastq_input">
             <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
@@ -168,60 +198,138 @@
                 <option value="paired_collection">Paired Collection</option>
                 <option value="paired_iv">Paired Interleaved</option>
             </param>
+            <!-- below, preset options are only offered for single-end input
+            because paired-end alignment in minimap2 is only enabled with -x sr
+            (see https://github.com/lh3/minimap2/issues/190) -->
+            <when value="single">
+                <param name="fastq_input1" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select fastq dataset" help="Specify dataset with single reads"/>
+                <param name="analysis_type_selector" type="select" optional="True"
+                label="Select a profile of preset options"
+                help="Each profile comes with the preconfigured settings mentioned in parentheses. You can customize each profile further in the indexing, mapping and alignment options sections below. If you do not select a profile here, the tool will use the per-parameter defaults listed in the below sections unless you customize them." >
+                    <option value="map-pb">PacBio/Oxford Nanopore read to reference mapping (-Hk19) (map-pb)</option>
+                    <option value="map-ont">Oxford Nanopore read to reference mapping. Slightly more sensitive for Oxford Nanopore to reference mapping (-k15). For PacBio reads, HPC minimizers consistently leads to faster performance and more sensitive results in comparison to normal minimizers. For Oxford Nanopore data, normal minimizers are better, though not much. The effectiveness of HPC is determined by the sequencing error mode. (map-ont)</option>
+                    <option value="ava-pb">PacBio all-vs-all overlap mapping (-Hk19 -Xw5 -m100 -g10000 --max-chain-skip 25) (ava-pb)</option>
+                    <option value="ava-ont">Oxford Nanopore all-vs-all overlap mapping (-k15 -Xw5 -m100 -g10000 -r2000 --max-chain-skip 25). Similarly, the major difference from ava-pb is that this preset is not using HPC minimizers. (ava-ont)</option>
+                    <option value="asm5">Long assembly to reference mapping (-k19 -w19 -A1 -B19 -O39,81 -E3,1 -s200 -z200 --min-occ-floor=100). Typically, the alignment will not extend to regions with 5% or higher sequence divergence. Only use this preset if the average divergence is far below 5%. (asm5)</option>
+                    <option value="asm10">Long assembly to reference mapping (-k19 -w19 -A1 -B9 -O16,41 -E2,1 -s200 -z200 --min-occ-floor=100). Up to 10% sequence divergence. (asm10)</option>
+                    <option value="asm20">Long assembly to reference mapping (-k19 -w10 -A1 -B6 -O6,26 -E2,1 -s200 -z200 --min-occ-floor=100). Up to 20% sequence divergence. (asm20)</option>
+                    <option value="splice">Long-read spliced alignment (-k15 -w5 --splice -g2000 -G200k  -A1 -B2  -O2,32  -E1,0  -C9  -z200  -ub  --splice-flank=yes). In the splice mode, 1) long deletions are taken as  introns  and  represented as the `N' CIGAR operator 2) long insertions are disabled 3) deletion and insertion gap costs are different during chaining 4) the computation of the `ms` tag ignores introns to demote hits to pseudogenes. (splice)</option>
+                    <option value="splice:hq">Long-read splice alignment for PacBio CCS reads (same as `splice` but with -C5 -O6,24 -B4) (splice:hq)</option>
+                    <option value="sr">Short single-end reads without splicing (-k21 -w11 --sr -A2 -B8 -O12,32 -E2,1 -r50 -p.5 -N20 -f1000,5000 -n2 -m20 -s40 -g200 -2K50m --heap-sort=yes --secondary=no) (sr)</option>
+                    <option value="self-homology">Construct a self-homology map - use same genome as query and reference (-DP -k19 -w19 -m200) (self-homology)</option>
+                </param>
+            </when>
             <when value="paired">
                 <param name="fastq_input1" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select first set of reads" help="Specify dataset with forward reads"/>
                 <param name="fastq_input2" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select second set of reads" help="Specify dataset with reverse reads"/>
-            </when>
-            <when value="single">
-                <param name="fastq_input1" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select fastq dataset" help="Specify dataset with single reads"/>
+                <expand macro="pe_anaylsis_fixed_selector" />
             </when>
             <when value="paired_collection">
                 <param name="fastq_input1" format="fastqsanger,fastqsanger.gz,fasta" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/>
+                <expand macro="pe_anaylsis_fixed_selector" />
             </when>
             <when value="paired_iv">
                 <param name="fastq_input1" type="data" format="fastqsanger,fastqsanger.gz,fasta" label="Select fastq dataset" help="Specify dataset with interleaved reads"/>
+                <expand macro="pe_anaylsis_fixed_selector" />
             </when>
         </conditional>
-        <!-- end unchanged copy from bwa-mem -->
-        <param name="analysis_type_selector" type="select" label="Select analysis mode (sets default)">
-            <option value="map-pb">PacBio/Oxford Nanopore read to reference mapping (-Hk19) (map-pb)</option>
-            <option value="map-ont">Oxford Nanopore read to reference mapping. Slightly more sensitive for Oxford Nanopore to reference mapping (-k15). For PacBio reads, HPC minimizers consistently leads to faster performance and more sensitive results in comparison to normal minimizers. For Oxford Nanopore data, normal minimizers are better, though not much. The effectiveness of HPC is determined by the sequencing error mode. (map-ont)</option>
-            <option value="ava-pb">PacBio all-vs-all overlap mapping (-Hk19 -Xw5 -m100 -g10000 --max-chain-skip 25) (ava-pb)</option>
-            <option value="ava-ont">Oxford Nanopore all-vs-all overlap mapping (-k15 -Xw5 -m100 -g10000 -r2000 --max-chain-skip 25). Similarly, the major difference from ava-pb is that this preset is not using HPC minimizers. (ava-ont)</option>
-            <option value="asm5">Long assembly to reference mapping (-k19 -w19 -A1 -B19 -O39,81 -E3,1 -s200 -z200 --min-occ-floor=100). Typically, the alignment will not extend to regions with 5% or higher sequence divergence. Only use this preset if the average divergence is far below 5%. (asm5)</option>
-            <option value="asm10">Long assembly to reference mapping (-k19 -w19 -A1 -B9 -O16,41 -E2,1 -s200 -z200 --min-occ-floor=100). Up to 10% sequence divergence. (asm10)</option>
-            <option value="asm20">Long assembly to reference mapping (-k19 -w10 -A1 -B6 -O6,26 -E2,1 -s200 -z200 --min-occ-floor=100). Up to 20% sequence divergence. (asm20)</option>
-            <option value="splice">Long-read spliced alignment (-k15 -w5 --splice -g2000 -G200k  -A1 -B2  -O2,32  -E1,0  -C9  -z200  -ub  --splice-flank=yes). In the splice mode, 1) long deletions are taken as  introns  and  represented as the `N' CIGAR operator 2) long insertions are disabled 3) deletion and insertion gap costs are different during chaining 4) the computation of the `ms' tag ignores introns to demote hits to pseudogenes. (splice)</option>
-            <option value="sr">Short single-end reads without splicing (-k21 -w11 --sr --frag=yes -A2 -B8 -O12,32 -E2,1 -r50 -p.5 -N20 -f1000,5000 -n2 -m20 -s40 -g200 -2K50m --heap-sort=yes --secondary=no) (sr)</option>
-            <option value="self-homology">Construct a self-homology map - use same genome as query and reference (-DP -k19 -w19 -m200) (self-homology)</option>
-        </param>
-        <section name="mapping_options" title="Set advanced mapping options" help="Sets -f, -g, -G, -F, -r, -n, -m, -X, -p, -N and --min-occ-floor options." expanded="False">
+        <section name="indexing_options" title="Indexing options">
+            <param argument="-H" name="H" type="boolean" optional="true" truevalue="-H" falsevalue="" label="Use homopolymer-compressed k-mer ?"/>
+            <param argument="-k" type="integer" min="4" max="28" optional="true"  label="k-mer size" help=""/>
+            <param argument="-w" type="integer" min="1" optional="true"  label="minimizer window size" help=""/>
+            <param argument="-I" type="integer" min="1" optional="true"  label="split index for every N input gigabases" help=""/>
+        </section>
+        <section name="mapping_options" title="Mapping options" help="Sets -f, -g, -F, -r, -n, -m, -X, -p, -N and --min-occ-floor options." expanded="False">
+            <param argument="-N" type="integer" min="0" optional="true" label="retain at most INT secondary alignments" help="default=5"/>
+            <param argument="-F" type="integer" min="0" value="" optional="true"
+            label="Max fragment length for PE alignment"
+            help="The maximum apparent fragment length up to which paired-end reads are aligned together; at higher fragment lengths the mates will be aligned independent of each other; effective only for paired-end data and when spliced alignment mode is turned off; default=800" />
             <param argument="-f" type="float" value="" optional="true" label="filter out top FLOAT fraction of repetitive minimizers" help="default=0.0002"/>
             <param argument="--min-occ-floor" name="min_occ_floor" type="integer" label="force minimap2 to always use k-mers occuring this many times or fewer" help="Maximum occurence is the number of repetitive minimizers determined by '-f' or this value, whichever is higher." optional="true" />
             <param argument="-g" type="integer" value="" optional="true" label="stop chain enlongation if there are no minimizers in INT-bp" help="default=5000"/>
-            <param argument="-G" type="integer" value="" optional="true" label="max intron length in thousand (effective with -xsplice; changing -r)" help="default=200"/>
-            <param argument="-F" type="integer" value="" optional="true" label="max fragment length (effective with -xsr or in the fragment mode)" help="default=800" />
             <param argument="-r" type="integer" value="" optional="true" label="bandwidth used in chaining and DP-based alignment" help="default=500" />
             <param argument="-n" type="integer" value="" optional="true" label="minimal number of minimizers on a chain" help="default=3"/>
             <param argument="-m" type="integer" value="" optional="true" label="minimal chaining score (matching bases minus log gap penalty)" help="default=40"/>
+            <param argument="--max-chain-skip" type="integer" value="" optional="true"
+            label="Maximum seed skips during chaining"
+            help="A heuristics that stops chaining early. Minimap2 uses dynamic programming for chaining. The time complexity is quadratic in the number of seeds. This option makes minimap2 exit the inner loop if it repeatedly sees seeds already on chains. Set to a large number to switch off this heurstics effectively. default=25" />
+            <param argument="--max-chain-iter" type="integer" value="" optional="true"
+            label="Maximum number of partial chains checked during chaining"
+            help="A heuristics to avoid quadratic time complexity in the worst case. default=5000" />
             <param argument="-X" type="boolean" truevalue="-X" falsevalue="" optional="true" label="skip self and dual mappings (for the all-vs-all mode)"/>
             <param argument="-p" type="float" value="" max="1" optional="true" label="min secondary-to-primary score ratio" help="default=0.8"/>
-            <param argument="-N" type="integer" min="0" optional="true" label="retain at most INT secondary alignments" help="default=5"/>
         </section>
-        <section name="alignment_options" title="Set advanced alignment options" help="Sets -A, -B, -O, -E, -z, -s and -u options." expanded="False">
-            <param argument="-A" type="integer" optional="true" label="Score for a sequence match" help="default=2"/>
-            <param argument="-B" type="integer" optional="true" label="Penalty for a mismatch" help="-B; default=4" />
-            <param argument="-O" type="integer" min="0" optional="true" label="Gap open penalties for deletions" help="-O; default=4"/>
-            <param name="-O2" type="integer" min="0" optional="true" label="Gap open penalties for insertions" help="-O; default=24"/>
-            <param argument="-E" type="integer" min="0" optional="true" label="Gap extension penalties; a gap of size k cost &#39;-O + -E*k&#39;. If two numbers are specified, the first is the penalty of extending a deletion and the second for extending an insertion" help="-E; default=2"/>
-            <param name="E2" type="integer" min="0" optional="true" label="Gap extension penalty for extending an insertion; if left empty uses the value specified for Gap extension penalties above" help="-E; default=1"/>
-            <param argument="-z" type="integer" optional="true" label="Z-drop score" help="default=400"/>
-            <param argument="-s" type="integer" optional="true" label="minimal peak DP alignment score" help="default=80"/>
-            <param argument="-u" type="select" optional="true" label="how to find GT-AG">
-                <option value="n">don't match GT-AG</option>
-                <option value="f">transcript strand</option>
-                <option value="b">both strands</option>
-            </param>
+        <section name="alignment_options" title="Alignment options" help="Sets -A, -B, -O, -E, -z, -s, and spliced alignments options." expanded="False">
+            <conditional name="splicing">
+                <param name="splice_mode" type="select"
+                label="Customize spliced alignment mode?"
+                help="Warning: Minimap2 cannot currently perform spliced alignments of read pairs. If you enable spliced alignment for paired-end data it will be treated as single-end!" >
+                    <option value="preset">No, use profile setting or leave turned off</option>
+                    <option value="">Disable spliced alignments (overwrite profile setting if necessary)</option>
+                    <option value="--splice">Yes, enable spliced alignments (--splice)</option>
+                </param>
+                <when value="preset" />
+                <when value="" />
+                <when value="--splice">
+                    <param argument="-G" type="integer" value="" optional="true"
+                    label="Maximum allowed gap on the reference"
+                    help="Higher values cause slower spliced alignment. When in use, this option causes -r (in mapping options) to be set to the same value. default=200k" />
+                    <param argument="-C" type="integer" min="0" optional="true"
+                    label="Cost of non-canonical (non-GT-AG) splicing"
+                    help="default=0" />
+                    <param argument="-u" type="select" optional="true"
+                    label="how to find GT-AG"
+                    help="default=n (don't match GT-AG)">
+                        <option value="n">don't match GT-AG (-un)</option>
+                        <option value="f">transcript strand (-uf)</option>
+                        <option value="b">both strands (-ub)</option>
+                    </param>
+                    <param argument="--splice-flank" type="boolean" truevalue="--splice-flank=yes" falsevalue="--splice-flank=no" checked="true"
+                    label="Assume conserved flanking region of splice sites?"
+                    help="Assume the next base to a GT donor site tends to be A/G (91% in human and 92% in mouse) and the preceding base to a AG acceptor tends to be C/T. This trend is evolutionarily conserved, all the way to S. cerevisiae (PMID:18688272). Specifying this option generally leads to higher junction accuracy by several percents, so it is applied by default with --splice. However, the SIRV control does not honor this trend (only ~60%) so this option reduces accuracy. If you are benchmarking minimap2 on SIRV data, please disable this option." />
+                    <conditional name="splice_site_annotations">
+                        <param name="use_annotations" type="select"
+                        label="Use previously annotated splice sites to guide the alignment?"
+                        help="">
+                            <option value="no">No, perform unbiased alignment</option>
+                            <option value="yes">Yes, favor annotated splice sites</option>
+                        </param>
+                        <when value="no" />
+                        <when value="yes">
+                            <param argument="--junc-bed" type="data" format="bed"
+                            label="Dataset with annotated genes or introns"
+                            help="Gene annotations should be provided in BED12 (aka 12-column BED), intron positions in 5-column BED format." />
+                            <param argument="--junc-bonus" type="integer" min="1" value="1"
+                            label="Annotated splice site bonus"
+                            help="Score bonus for a splice donor or acceptor found in annotation." />
+                        </when>
+                    </conditional>
+                </when>
+            </conditional>
+            <param argument="-A" type="integer" min="0" optional="true"
+            label="Score for a sequence match" help="default=2"/>
+            <param argument="-B" type="integer" min="0" optional="true"
+            label="Penalty for a mismatch" help="-B; default=4" />
+            <param argument="-O" type="integer" min="1" optional="true"
+            label="Gap open penalties for deletions" help="-O; default=4"/>
+            <param name="O2" type="integer" min="0" optional="true"
+            label="Gap open penalties for insertions" help="-O; default=24"/>
+            <param argument="-E" type="integer" min="1" optional="true"
+            label="Gap extension penalties; a gap of size k cost &#39;-O + -E*k&#39;. If two numbers are specified, the first is the penalty of extending a deletion and the second for extending an insertion"
+            help="-E; default=2"/>
+            <param name="E2" type="integer" min="0" optional="true"
+            label="Gap extension penalty for extending an insertion; if left empty uses the value specified for Gap extension penalties above"
+            help="-E; default=1"/>
+            <param argument="-z" type="integer" min="0" optional="true"
+            label="Z-drop threshold for truncating an alignment"
+            help="Increase to improve the contiguity of alignments at the cost of poorer alignments in the middle. default=400" />
+            <param name="z2" type="integer" min="0" optional="true"
+            label="Z-drop threshold for reverse-complementing the query"
+            help="Decrease to find small inversions at the cost of performance and false positives. default=200" />
+            <param argument="-s" type="integer" min="0" optional="true"
+            label="minimal peak DP alignment score" help="default=80"/>
+            <param name="no_end_flt" type="boolean" falsevalue="--no-end-flt" truevalue="" checked="true"
+            label="Filter seeds towards the ends of chains before performing base-level alignment?" />
         </section>
         <section name="io_options" title="Set advanced output options" help="Sets -Q, -L, -R, -c, --cs and -K options." expanded="False">
             <param name="output_format" type="select" label="Select an output format">
@@ -296,7 +404,6 @@
             <param name="fastq_input_selector" value="paired"/>
             <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
             <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
-            <param name="analysis_type_selector" value="sr"/>
             <output name="alignment_output" ftype="bam" file="minimap2-test1.bam" lines_diff="2" />
         </test>
         <test>
@@ -306,7 +413,6 @@
             <param name="fastq_input_selector" value="paired"/>
             <param name="fastq_input1" ftype="fastqsanger.gz" value="bwa-mem-fastq1.fq.gz"/>
             <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
-            <param name="analysis_type_selector" value="sr"/>
             <output name="alignment_output" ftype="bam" file="minimap2-test1.bam" lines_diff="2" />
         </test>
         <test>
@@ -320,7 +426,6 @@
                     <element name="reverse" value="bwa-mem-fastq2.fq" />
                 </collection>
             </param>
-            <param name="analysis_type_selector" value="sr"/>
             <output name="alignment_output" ftype="bam" file="minimap2-test2.bam" lines_diff="2" />
         </test>
         <test>
@@ -333,6 +438,28 @@
             <output name="alignment_output" ftype="bam" file="minimap2-test1-fasta.bam" lines_diff="2" />
         </test>
         <test>
+            <!-- test alignment options -->
+            <param name="reference_source_selector" value="cached" />
+            <param name="ref_file" value="bwa-mem-mt-genome"/>
+            <param name="fastq_input_selector" value="single"/>
+            <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fasta1.fa"/>
+            <param name="analysis_type_selector" value="sr"/>
+            <section name="alignment_options">
+                <!-- the folowing settings correspond to the defaults for "sr"
+                mode. The purpose is to check that all alignment params get
+                parsed correctly. -->
+                <param name="A" value="2" />
+                <param name="B" value="8" />
+                <param name="O" value="12" />
+                <param name="O2" value="32" />
+                <param name="E" value="2" />
+                <param name="E2" value="1" />
+                <param name="z" value="400" />
+                <param name="s" value="40" />
+            </section>
+            <output name="alignment_output" ftype="bam" file="minimap2-test1-fasta.bam" lines_diff="2" />
+        </test>        
+        <test>
             <!-- test paf output -->
             <param name="reference_source_selector" value="history" />
             <param name="ref_file" ftype="fastqsanger"  value="mini_reads.fq" />