changeset 25:3faf9a2bf58d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/minimap2 commit e731d1afcfadce894f143495241fd2f5b3b305a6
author iuc
date Mon, 23 Mar 2026 20:18:33 +0000
parents 539de907fd99
children
files macros.xml minimap2.xml test-data/minimap2-self-homology.bam test-data/minimap2-test-kmer_ocurrence.bam test-data/minimap2-test-mask_len.bam test-data/minimap2-test1-fasta.bam test-data/minimap2-test1-fasta.cram test-data/minimap2-test1.bam test-data/minimap2-test_hifi-2-fasta.bam test-data/minimap2-test_hifi-fasta.bam
diffstat 10 files changed, 138 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Thu Oct 23 21:33:53 2025 +0000
+++ b/macros.xml	Mon Mar 23 20:18:33 2026 +0000
@@ -1,7 +1,7 @@
 <macros>
-    <token name="@TOOL_VERSION@">2.28</token>
-    <token name="@VERSION_SUFFIX@">2</token>
-    <token name="@PROFILE@">24.0</token>
+    <token name="@TOOL_VERSION@">2.30</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">24.1</token>
     <xml name="edam_ontology">
         <edam_topics>                                                                                  
             <edam_topic>topic_0102</edam_topic>
@@ -13,21 +13,20 @@
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">minimap2</requirement>
-            <requirement type="package" version="1.19.2">samtools</requirement>
+            <requirement type="package" version="1.22.1">samtools</requirement>
         </requirements>
     </xml>
     <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>
+            <option value="sr">Short reads without splicing (-k21 -w11 --sr --frag=yes -F800 -A2 -B8 -O12,32 -E2,1 -r100 -p.5 -N20 -f1000,5000 -n2 -m25 -s40 -g100 -2K50m --heap-sort=yes --secondary=no) (sr)</option>
         </param>
     </xml>
     <xml name="citations">
         <citations>
-            <citation type="doi">10.1093/bioinformatics/btp324</citation>
-            <citation type="doi">10.1093/bioinformatics/btp698</citation>
             <citation type="doi">10.1093/bioinformatics/bty191</citation>
+            <citation type="doi">10.1093/bioinformatics/btp352</citation>
         </citations>
     </xml>
 </macros>
--- a/minimap2.xml	Thu Oct 23 21:33:53 2025 +0000
+++ b/minimap2.xml	Mon Mar 23 20:18:33 2026 +0000
@@ -15,6 +15,16 @@
     <version_command>minimap2 --version</version_command>
     <command>
 <![CDATA[
+    #if $fastq_input.fastq_input_selector == 'single':
+        ln -f -s '$fastq_input.fastq_input1' reads_input &&
+        #set $query_args = "'reads_input'"
+    #elif $fastq_input.fastq_input_selector == 'paired_collection':
+        ln -f -s '$fastq_input.fastq_input1.forward' reads_input_1 &&
+        ln -f -s '$fastq_input.fastq_input1.reverse' reads_input_2 &&
+        #set $query_args = "'reads_input_1' 'reads_input_2'"
+    #else:
+        #set $query_args = ""
+    #end if
     #if $reference_source.reference_source_selector == 'history':
         ln -f -s '$reference_source.ref_file' reference.fa &&
     #else:
@@ -65,7 +75,15 @@
     #if str($mapping_options.max_chain_iter):
         --max-chain-iter $mapping_options.max_chain_iter
     #end if
+    #if str($mapping_options.rmq_inner):
+        --rmq-inner $mapping_options.rmq_inner
+    #end if
     $mapping_options.X
+    $mapping_options.no_hash_name
+    #set $pairing = str($mapping_options.pairing)
+    #if $pairing and $pairing != 'None'
+        --pairing $pairing
+    #end if
     #if str($mapping_options.p):
         -p $mapping_options.p
     #end if
@@ -87,6 +105,9 @@
         #if str($alignment_options.splicing.C):
             -C $alignment_options.splicing.C
         #end if
+        #if str($alignment_options.splicing.splice_model)
+            -J $alignment_options.splicing.splice_model
+        #end if
         #if $alignment_options.splicing.u:
             -u $alignment_options.splicing.u
         #end if
@@ -95,6 +116,21 @@
             --junc-bed '$alignment_options.splicing.splice_site_annotations.junc_bed'
             --junc-bonus $alignment_options.splicing.splice_site_annotations.junc_bonus
         #end if
+        #if str($alignment_options.splicing.junction_file)
+            -j '$alignment_options.splicing.junction_file'
+        #end if
+        #if str($alignment_options.splicing.pass1_junctions)
+            --pass1 '$alignment_options.splicing.pass1_junctions'
+        #end if
+        #if str($alignment_options.splicing.spsc_table)
+            --spsc '$alignment_options.splicing.spsc_table'
+        #end if
+        #if str($alignment_options.splicing.spsc0)
+            --spsc0 $alignment_options.splicing.spsc0
+        #end if
+        #if str($alignment_options.splicing.spsc_scale)
+            --spsc-scale $alignment_options.splicing.spsc_scale
+        #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
@@ -104,6 +140,9 @@
     #if str($alignment_options.B):
         -B $alignment_options.B
     #end if
+    #if str($alignment_options.b):
+        -b $alignment_options.b
+    #end if
     #if str($alignment_options.O):
         #if str($alignment_options.O2):
             -O $alignment_options.O,$alignment_options.O2
@@ -128,7 +167,25 @@
     #if str($alignment_options.s):
         -s $alignment_options.s
     #end if
+    #if str($alignment_options.end_bonus)
+        --end-bonus $alignment_options.end_bonus
+    #end if
+    #if str($alignment_options.score_N)
+        --score-N $alignment_options.score_N
+    #end if
     $alignment_options.no_end_flt
+    #if str($alignment_options.jump_min_match)
+        --jump-min-match $alignment_options.jump_min_match
+    #end if
+    #if str($alignment_options.end_seed_pen)
+        --end-seed-pen $alignment_options.end_seed_pen
+    #end if
+    #if str($alignment_options.cap_sw_mem)
+        --cap-sw-mem $alignment_options.cap_sw_mem
+    #end if
+    #if str($alignment_options.cap_kalloc)
+        --cap-kalloc $alignment_options.cap_kalloc
+    #end if
     ## Output options
     $io_options.Q
     $io_options.L
@@ -137,19 +194,22 @@
         --cs=$io_options.cs
     #end if
     $io_options.Y
+    $io_options.copy_comments
+    $io_options.ds_tag
+    $io_options.secondary_seq
+    $io_options.two_io_threads
     #if $io_options.K:
         -K $io_options.K
     #end if
+    #if str($io_options.seed):
+        --seed $io_options.seed
+    #end if
     #if $io_options.eqx:
         --eqx
     #end if
     -t \${GALAXY_SLOTS:-4}
     reference.fa
-    #if $fastq_input.fastq_input_selector == 'single':
-        '$fastq_input.fastq_input1'
-    #else if $fastq_input.fastq_input_selector == 'paired_collection':
-         '$fastq_input.fastq_input1.forward' '$fastq_input.fastq_input1.reverse'
-    #end if
+    $query_args
     #if str($io_options.output_format) in ('BAM', 'CRAM'):
         -a | samtools view --no-PG -hT reference.fa
     #end if
@@ -202,20 +262,23 @@
             (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"
+                <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="map-hifi">PacBio HiFi reads vs reference mapping (-k19 -w19 -U50,500 -g10k -A1 -B4 -O6,26 -E2,1 -s200 ) (map-hifi)</option>
+                    <option value="map-pb">Legacy PacBio CLR/Oxford Nanopore read to reference mapping (-Hk19) (map-pb)</option>
+                    <option value="map-ont">Oxford Nanopore read to reference mapping using standard minimizers (-k15) (map-ont)</option>
+                    <option value="lr:hq">Accurate long reads (~99% Nanopore or PacBio HiFi) vs reference (-xlr:hq -A1 -B4 -O6,26 -E2,1) (lr:hq)</option>
+                    <option value="map-hifi">PacBio HiFi reads vs reference mapping (-xlr:hq -A1 -B4 -O6,26 -E2,1 -s200) (map-hifi)</option>
+                    <option value="map-iclr">Illumina Complete Long Read (ICLR) vs reference (-k19 -B6 -b4 -O10,50) (map-iclr)</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="asm5">Long assembly to reference mapping for ~0.1% divergence (-k19 -w19 -U50,500 --rmq -r1k,100k -g10k -A1 -B19 -O39,81 -E3,1 -s200 -z200 -N50) (asm5)</option>
+                    <option value="asm10">Long assembly to reference mapping for ~1% divergence (-k19 -w19 -U50,500 --rmq -r1k,100k -g10k -A1 -B9 -O16,41 -E2,1 -s200 -z200 -N50) (asm10)</option>
+                    <option value="asm20">Long assembly to reference mapping for several percent divergence (-k19 -w10 -U50,500 --rmq -r1k,100k -g10k -A1 -B4 -O6,26 -E2,1 -s200 -z200 -N50) (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) (splice)</option>
+                    <option value="splice:hq">Spliced alignment for accurate long RNA reads (PacBio iso-seq) (-xsplice -C5 -O6,24 -B4) (splice:hq)</option>
+                    <option value="splice:sr">Spliced alignment for short RNA-seq reads (-xsplice:hq --frag=yes -m25 -s40 -2K100m --heap-sort=yes --pairing=weak --sr=rna --min-dp-len=20 --secondary=no) (splice:sr)</option>
+                    <option value="sr">Short-read alignment without splicing (-k21 -w11 --sr --frag=yes -A2 -B8 -O12,32 -E2,1 -r100 -p.5 -N20 -f1000,5000 -n2 -m25 -s40 -g100 -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>
@@ -230,7 +293,7 @@
             <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">
+        <section name="mapping_options" title="Mapping options" help="Sets -f, -g, -F, -r, -n, -m, -X, -p, -N, --min-occ-floor, --q-occ-frac, --rmq-inner, --pairing and related 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"
@@ -253,7 +316,10 @@
                 help="Discard a query minimizer if its occurrence is higher than this fraction of query minimizers and than the reference occurrence threshold. It allows to avoid extremely long mapping time for pathologic reads with highly repeated k-mers not in the reference. Set to 0 to disable the new heuristic." />
 
             <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="-r" type="integer" value="" optional="true" label="Bandwidth used in chaining and DP-based alignment" help="default=500" />
+            <param argument="-r" type="text" value="" optional="true" label="Bandwidth used in chaining and DP-based alignment"
+            help="Allows INT or INT,INT for chaining/alignment bandwidth and long-join bandwidth. default=500,20000" >
+                <validator type="regex" message="Enter INT or INT,INT values.">^\s*(\d+(,\d+)?\s*)?$</validator>
+            </param>
             <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"
@@ -265,8 +331,18 @@
             <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="--mask-len" type="integer" min="0" max="10000" value="" optional="true" label="Fine control the removal of redundant hits" help="Keep an alignment if dropping it leaves an unaligned region on query longer than INT"/>
+            <param argument="--rmq-inner" type="integer" min="0" optional="true" value="1000"
+            label="Run full DP for anchors within this distance" help="Applies the minigraph RMQ algorithm to anchors within NUM bases." />
+            <param argument="--no-hash-name" type="boolean" truevalue="--no-hash-name" falsevalue="" optional="true"
+            label="Ignore sequence names when randomising equally best hits?" help="Ensures identical sequences get identical alignments regardless of their names." />
+            <param argument="--pairing" type="select" optional="true" label="Paired-end alignment strategy" help="Controls how paired-end reads are paired when using presets that support short reads.">
+                <option value="">Use minimap2 default (strong)</option>
+                <option value="strong">strong</option>
+                <option value="weak">weak</option>
+                <option value="no">no</option>
+            </param>
         </section>
-        <section name="alignment_options" title="Alignment options" help="Sets -A, -B, -O, -E, -z, -s, and spliced alignments options." expanded="False">
+        <section name="alignment_options" title="Alignment options" help="Sets scoring parameters (-A, -B, -b, -O, -E, -z, -s) and spliced alignment options." expanded="False">
             <conditional name="splicing">
                 <param name="splice_mode" type="select"
                 label="Customize spliced alignment mode?"
@@ -284,6 +360,12 @@
                     <param argument="-C" type="integer" min="0" optional="true"
                     label="Cost of non-canonical (non-GT-AG) splicing"
                     help="default=0" />
+                    <param name="splice_model" argument="-J" type="select" optional="true"
+                    label="Splice scoring model">
+                        <option value="">Use minimap2 default (1)</option>
+                        <option value="0">0 - original minimap2 splice model (penalise non-GT-AG)</option>
+                        <option value="1">1 - miniprot splice model (consider non-GT-AG)</option>
+                    </param>
                     <param argument="-u" type="select" optional="true"
                     label="How to find GT-AG"
                     help="default=n (don't match GT-AG)">
@@ -311,12 +393,25 @@
                             help="Score bonus for a splice donor or acceptor found in annotation." />
                         </when>
                     </conditional>
+                    <param name="junction_file" argument="-j" type="data" format="bed" optional="true"
+                    label="Junctions to extend short RNA alignments (-j)" help="BED12 or 5-column BED describing introns used to extend alignments towards read ends." />
+                    <param name="pass1_junctions" argument="--pass1" type="data" format="bed" optional="true"
+                    label="Junctions discovered in a first pass alignment (--pass1)"
+                    help="Typically produced by minimap2 --write-junc; entries with scores &lt;5 are ignored automatically." />
+                    <param name="spsc_table" argument="--spsc" type="data" format="tabular,bed" optional="true"
+                    label="Splice score table (--spsc)" help="Tabular file with contig, offset, strand (+/-), D/A, score columns to prioritise splice junctions." />
+                    <param argument="--spsc0" type="integer" min="0" optional="true" value="5"
+                    label="Penalty for junctions not listed in splice score table (--spsc0)" />
+                    <param argument="--spsc-scale" type="float" optional="true" value="0.7"
+                    label="Scale splice scores (--spsc-scale)" help="Multiply scores from --spsc by FLOAT." />
                 </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="-b" type="integer" min="0" optional="true"
+            label="Penalty for a transition mismatch" help="If unset, transitions use the mismatch penalty set by -B." />
             <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"
@@ -334,11 +429,23 @@
             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"/>
+            label="Minimal peak DP alignment score" help="default=40"/>
+            <param argument="--end-bonus" type="integer" min="0" optional="true" value="0"
+            label="Score bonus when alignment extends to the end of the read"/>
+            <param argument="--score-N" type="integer" min="0" optional="true" value="1"
+            label="Penalty for mismatches involving ambiguous bases (N)"/>
             <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?" />
+            <param argument="--jump-min-match" type="integer" min="0" optional="true" value="3"
+            label="Minimum matching length to create a splice jump"/>
+            <param argument="--end-seed-pen" type="integer" min="0" optional="true" value="6"
+            label="Penalty threshold for dropping terminal anchors"/>
+            <param argument="--cap-sw-mem" type="text" optional="true" value="100m"
+            label="Skip alignment if the DP matrix exceeds this size" help="Provide NUM optionally suffixed by k/m/g."/>
+            <param argument="--cap-kalloc" type="text" optional="true" value="500m"
+            label="Free thread-local kalloc reservoir above this size" help="Provide NUM optionally suffixed by k/m/g."/>
         </section>
-        <section name="io_options" title="Set advanced output options" help="Sets -Q, -L, -R, -c, --cs and -K options." expanded="False">
+        <section name="io_options" title="Set advanced output options" help="Sets -Q, -L, -R, -c, --cs, -K and other reporting toggles." expanded="False">
             <param name="output_format" type="select" label="Select an output format">
                 <option value="BAM">BAM</option>
                 <option value="CRAM">CRAM</option>
@@ -357,6 +464,11 @@
 
             <param argument="--eqx" type="boolean" truevalue="--eqx" falsevalue="" label="Write =/X CIGAR operators"/>
             <param argument="-Y" type="boolean" truevalue="-Y" falsevalue="" label="Use soft clipping for supplementary alignments ?"/>
+            <param name="copy_comments" argument="-y" type="boolean" truevalue="-y" falsevalue="" label="Copy FASTA/Q comments to SAM records?"/>
+            <param name="ds_tag" argument="--ds" type="boolean" truevalue="--ds" falsevalue="" label="Output the ds tag (extension of cs)?"/>
+            <param argument="--secondary-seq" type="boolean" truevalue="--secondary-seq" falsevalue="" label="Include query sequences for secondary alignments?"/>
+            <param name="two_io_threads" argument="-2" type="boolean" truevalue="-2" falsevalue="" label="Use two I/O threads during mapping?"/>
+            <param argument="--seed" type="integer" optional="true" label="Seed for randomising equally best hits"/>
         </section>
     </inputs>
     <outputs>
Binary file test-data/minimap2-self-homology.bam has changed
Binary file test-data/minimap2-test-kmer_ocurrence.bam has changed
Binary file test-data/minimap2-test-mask_len.bam has changed
Binary file test-data/minimap2-test1-fasta.bam has changed
Binary file test-data/minimap2-test1-fasta.cram has changed
Binary file test-data/minimap2-test1.bam has changed
Binary file test-data/minimap2-test_hifi-2-fasta.bam has changed
Binary file test-data/minimap2-test_hifi-fasta.bam has changed