comparison bwa-mem.xml @ 26:2477830927ec draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bwa commit 6e9628b1d92fdb358b79959ad54a456cfa46fa33
author iuc
date Fri, 17 May 2024 21:09:07 +0000
parents e188dc7a68e6
children
comparison
equal deleted inserted replaced
25:e188dc7a68e6 26:2477830927ec
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bwa_mem" name="Map with BWA-MEM" version="@VERSION@.2"> 2 <tool id="bwa_mem" name="Map with BWA-MEM" version="@TOOL_VERSION@" profile="22.05">
3 <description>- map medium and long reads (&gt; 100 bp) against reference genome</description> 3 <description>- map medium and long reads (&gt; 100 bp) against reference genome</description>
4 <xrefs>
5 <xref type="bio.tools">bwa</xref>
6 </xrefs>
7 <macros> 4 <macros>
8 <import>read_group_macros.xml</import> 5 <import>read_group_macros.xml</import>
9 <import>bwa_macros.xml</import> 6 <import>bwa_macros.xml</import>
10 </macros> 7 </macros>
8 <expand macro="bio_tools"/>
11 <expand macro="requirements"/> 9 <expand macro="requirements"/>
12 <expand macro="stdio"/> 10 <expand macro="stdio"/>
13 <command><![CDATA[ 11 <command><![CDATA[
14 @pipefail@ 12 @pipefail@
15 @set_reference_fasta_filename@ 13 @set_reference_fasta_filename@
98 #if str( $fastq_input.iset_stats ): 96 #if str( $fastq_input.iset_stats ):
99 -I '${fastq_input.iset_stats}' 97 -I '${fastq_input.iset_stats}'
100 #end if 98 #end if
101 99
102 '${reference_fasta_filename}' 100 '${reference_fasta_filename}'
103 '${fastq_input.fastq_input1}' '${fastq_input.fastq_input2}' 101 '${fastq_input.fastq_input1}'
102 '${fastq_input.fastq_input2}'
104 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection": 103 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection":
105 ## check that insert statistics is used 104 ## check that insert statistics is used
106 #if str( $fastq_input.iset_stats ): 105 #if str( $fastq_input.iset_stats ):
107 -I '${fastq_input.iset_stats}' 106 -I '${fastq_input.iset_stats}'
108 #end if 107 #end if
109 108
110 '${reference_fasta_filename}' 109 '${reference_fasta_filename}'
111 '${fastq_input.fastq_input1.forward}' '${fastq_input.fastq_input1.reverse}' 110 '${fastq_input.fastq_input1.forward}'
111 '${fastq_input.fastq_input1.reverse}'
112 #else: 112 #else:
113 '${reference_fasta_filename}' 113 '${reference_fasta_filename}'
114 '${fastq_input.fastq_input1}' 114 '${fastq_input.fastq_input1}'
115 #end if 115 #end if
116 116
165 </conditional> 165 </conditional>
166 166
167 <expand macro="read_group_conditional" /> 167 <expand macro="read_group_conditional" />
168 168
169 <conditional name="analysis_type"> 169 <conditional name="analysis_type">
170 <param name="analysis_type_selector" type="select" label="Select analysis mode"> 170 <param name="analysis_type_selector" type="select" label="Select analysis mode" help="Please note that minimap2 is recommended over BWA as the aligner for long-read or contig data, for which it outperforms BWA in speed and typically in accuracy (see tool help below).">
171 <option value="illumina">1.Simple Illumina mode</option> 171 <option value="illumina">1.Simple Illumina mode</option>
172 <option value="pacbio">2.PacBio mode (-x pacbio)</option> 172 <option value="pacbio">2.PacBio mode (-x pacbio)</option>
173 <option value="ont2d">3.Nanopore 2D-reads mode (-x ont2d)</option> 173 <option value="ont2d">3.Nanopore 2D-reads mode (-x ont2d)</option>
174 <option value="intractg">4.Intra-species contigs mode (-x intractg)</option> 174 <option value="intractg">4.Intra-species contigs mode (-x intractg)</option>
175 <option value="full">5.Full list of options</option> 175 <option value="full">5.Full list of options</option>
277 <when input="output_sort" value="name" format="qname_sorted.bam" /> 277 <when input="output_sort" value="name" format="qname_sorted.bam" />
278 <when input="output_sort" value="unsorted" format="qname_input_sorted.bam" /> 278 <when input="output_sort" value="unsorted" format="qname_input_sorted.bam" />
279 </change_format> 279 </change_format>
280 </data> 280 </data>
281 </outputs> 281 </outputs>
282
283 <tests> 282 <tests>
284 <test> 283 <!-- `samtools sort` in the new update adds PG lines to the output so the lines_diff is changed from "2" to "4" -->
284 <test expect_num_outputs="1">
285 <param name="reference_source_selector" value="history" /> 285 <param name="reference_source_selector" value="history" />
286 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 286 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
287 <param name="fastq_input_selector" value="paired"/> 287 <param name="fastq_input_selector" value="paired"/>
288 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 288 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
289 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 289 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
290 <param name="analysis_type_selector" value="illumina"/> 290 <param name="analysis_type_selector" value="illumina"/>
291 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> 291 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="4" />
292 </test> 292 </test>
293 <test> 293 <test expect_num_outputs="1">
294 <param name="reference_source_selector" value="history" /> 294 <param name="reference_source_selector" value="history" />
295 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 295 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
296 <param name="fastq_input_selector" value="single"/> 296 <param name="fastq_input_selector" value="single"/>
297 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fasta1.fa"/> 297 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fasta1.fa"/>
298 <param name="analysis_type_selector" value="illumina"/> 298 <param name="analysis_type_selector" value="illumina"/>
299 <output name="bam_output" ftype="bam" file="bwa-mem-test1-fasta.bam" lines_diff="2" /> 299 <output name="bam_output" ftype="bam" file="bwa-mem-test1-fasta.bam" lines_diff="4" />
300 </test> 300 </test>
301 <test> 301 <test expect_num_outputs="1">
302 <param name="reference_source_selector" value="history" /> 302 <param name="reference_source_selector" value="history" />
303 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 303 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
304 <param name="fastq_input_selector" value="paired"/> 304 <param name="fastq_input_selector" value="paired"/>
305 <param name="fastq_input1" ftype="fastqsanger.gz" value="bwa-mem-fastq1.fq.gz"/> 305 <param name="fastq_input1" ftype="fastqsanger.gz" value="bwa-mem-fastq1.fq.gz"/>
306 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 306 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
307 <param name="analysis_type_selector" value="illumina"/> 307 <param name="analysis_type_selector" value="illumina"/>
308 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> 308 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="4" />
309 </test> 309 </test>
310 <test> 310 <test expect_num_outputs="1">
311 <param name="reference_source_selector" value="history" /> 311 <param name="reference_source_selector" value="history" />
312 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 312 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
313 <param name="index_a" value="is"/> 313 <param name="index_a" value="is"/>
314 <param name="fastq_input_selector" value="paired"/> 314 <param name="fastq_input_selector" value="paired"/>
315 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 315 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
317 <param name="rg_selector" value="set"/> 317 <param name="rg_selector" value="set"/>
318 <param name="ID" value="rg1"/> 318 <param name="ID" value="rg1"/>
319 <param name="PL" value="CAPILLARY"/> 319 <param name="PL" value="CAPILLARY"/>
320 <param name="LB" value="AARDVARK-1" /> 320 <param name="LB" value="AARDVARK-1" />
321 <param name="analysis_type_selector" value="illumina"/> 321 <param name="analysis_type_selector" value="illumina"/>
322 <output name="bam_output" ftype="bam" file="bwa-mem-test2.bam" lines_diff="2" /> 322 <output name="bam_output" ftype="bam" file="bwa-mem-test2.bam" lines_diff="4" />
323 </test> 323 </test>
324 <test> 324 <test expect_num_outputs="1">
325 <param name="reference_source_selector" value="history" /> 325 <param name="reference_source_selector" value="history" />
326 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 326 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
327 <param name="fastq_input_selector" value="paired"/> 327 <param name="fastq_input_selector" value="paired"/>
328 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 328 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
329 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 329 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
330 <param name="analysis_type_selector" value="illumina"/> 330 <param name="analysis_type_selector" value="illumina"/>
331 <param name="output_sort" value="unsorted"/> 331 <param name="output_sort" value="unsorted"/>
332 <output name="bam_output" ftype="qname_input_sorted.bam" file="bwa-mem-test3.bam" lines_diff="2" /> 332 <output name="bam_output" ftype="qname_input_sorted.bam" file="bwa-mem-test3.bam" lines_diff="4" />
333 </test> 333 </test>
334 <test> 334 <test expect_num_outputs="1">
335 <param name="reference_source_selector" value="history" /> 335 <param name="reference_source_selector" value="history" />
336 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 336 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
337 <param name="fastq_input_selector" value="paired"/> 337 <param name="fastq_input_selector" value="paired"/>
338 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 338 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
339 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 339 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
340 <param name="analysis_type_selector" value="illumina"/> 340 <param name="analysis_type_selector" value="illumina"/>
341 <param name="output_sort" value="name"/> 341 <param name="output_sort" value="name"/>
342 <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="2" /> 342 <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="4" />
343 </test>
344 <test expect_num_outputs="1">
345 <param name="reference_source_selector" value="history" />
346 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
347 <conditional name="fastq_input">
348 <param name="fastq_input_selector" value="paired_collection"/>
349 <param name="fastq_input1">
350 <collection type="paired">
351 <element name="forward" value="bwa-mem-fastq1.fq" />
352 <element name="reverse" value="bwa-mem-fastq2.fq" />
353 </collection>
354 </param>
355 </conditional>
356 <conditional name="analysis_type">
357 <param name="analysis_type_selector" value="illumina"/>
358 </conditional>
359 <param name="output_sort" value="name"/>
360 <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="4" />
343 </test> 361 </test>
344 </tests> 362 </tests>
345 <help><![CDATA[ 363 <help><![CDATA[
346 **What is does** 364
365 **What it does**
366
367 This Galaxy tool wraps the bwa-mem module of the BWA_ read mapping tool. For more details about the different modules of the BWA package see the `BWA manual`_.
368
369 The Galaxy implementation takes fastq files as input and produces output in BAM format, which can be further processed using various BAM utilities existing in Galaxy (BAMTools, SAMTools, Picard).
347 370
348 From http://arxiv.org/abs/1303.3997: 371 From http://arxiv.org/abs/1303.3997:
349 372
350 BWA-MEM is an alignment algorithm for aligning sequence reads or long query sequences against a large reference genome such as human. 373 BWA-MEM is an alignment algorithm for aligning sequence reads or long query sequences against a large reference genome such as human.
351 It automatically chooses between local and end-to-end alignments, supports paired-end reads and performs chimeric alignment. 374 It automatically chooses between local and end-to-end alignments, supports paired-end reads and performs chimeric alignment.
352 The algorithm is robust to sequencing errors and applicable to a wide range of sequence lengths from 70bp to a few megabases. 375 The algorithm is robust to sequencing errors and applicable to a wide range of sequence lengths from 70bp to a few megabases.
353 376
354 This Galaxy tool wraps bwa-mem module of bwa read mapping tool. The Galaxy implementation takes fastq files as input and produces output in BAM format, which can be further processed using various BAM utilities exiting in Galaxy (BAMTools, SAMTools, Picard).
355
356 ----- 377 -----
357 378
358 **Indices: Selecting reference genomes for BWA** 379 @ref_genomes@
359
360 Galaxy wrapper for BWA allows you select between precomputed and user-defined indices for reference genomes using **Will you select a reference genome from your history or use a built-in index?** flag. This flag has two options:
361
362 1. **Use a built-in genome index** - when selected (this is default), Galaxy provides the user with **Select reference genome index** dropdown. Genomes listed in this dropdown have been pre-indexed with bwa index utility and are ready to be mapped against.
363 2. **Use a genome from the history and build index** - when selected, Galaxy provides the user with **Select reference genome sequence** dropdown. This dropdown is populated by all FASTA formatted files listed in your current history. If your genome of interest is uploaded into history it will be shown there. Selecting a genome from this dropdown will cause Galaxy to first transparently index it using `bwa index` command, and then run mapping with `bwa mem`.
364
365 If your genome of interest is not listed here you have two choices:
366
367 1. Contact galaxy team using **Help->Support** link at the top of the interface and let us know that an index needs to be added
368 2. Upload your genome of interest as a FASTA file to Galaxy history and selected **Use a genome from the history and build index** option.
369 380
370 ----- 381 -----
371 382
372 **Galaxy-specific option** 383 **Analysis modes**
373 384
374 Galaxy allows four levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are: 385 The tool supports different preconfigured analysis modes optimized for different types of input data. Alternatively, it allows you to take full control over all available options.
375 386
376 1. *Simple Illumina mode*: The simplest possible bwa mem application in which it alignes single or paired-end data to reference using default parameters. It is equivalent to the following command: bwa mem <reference index> <fastq dataset1> [fastq dataset2] 387 The preconfigured modes are:
377 2. *PacBio mode*: The mode adjusted specifically for mapping of long PacBio subreads. Equivalent to the following command: bwa mem -k17 -W40 -r10 -A1 -B1 -O1 -E1 -L0 <reference index> <PacBio dataset in fastq format> 388
378 3. *Full list of options*: Allows access to all options through Galaxy interface. 389 1. *Simple Illumina mode*
379 390
380 ----- 391 This corresponds to the simplest possible and standard bwa mem application in which it aligns single or paired-end data to a reference using default parameters. It is equivalent to the following command: bwa mem <reference index> <fastq dataset1> [fastq dataset2]
392 2. *PacBio mode*
393
394 This mode is adjusted specifically for mapping of long PacBio subreads. It is running bwa mame with the `-x pacbio` option.
395 3. *Nanopore 2D-reads mode*
396
397 This mode is running bwa mem with the `-x ont2d` option.
398 4. *Intra-sepcies contigs mode*
399
400 This mode is running bwa mem with the `-x intractg` option.
401
402 .. class:: infomark
403
404 Please note: minimap2_ is recommended over and outperforms BWA-MEM for most types of input data except for Illumina short reads. For Illumina short-read mapping you may also consider using `BWA-MEM2`_, which is about twice as fast as BWA-MEM.
405
406 -----
381 407
382 **Bam sorting mode** 408 **Bam sorting mode**
383 409
384 The generated bam files can be sorted according to three criteria: coordinates, names and input order. 410 The generated bam files can be sorted according to three criteria: coordinates, names and input order.
385 411
390 Finally, the *No sorted (sorted as input)* option yield a BAM file in which the records are sorted in an order corresponding to the order of the reads in the original input file. This option requires using a single thread to perform the conversion from SAM to BAM format, so the runtime is extended. 416 Finally, the *No sorted (sorted as input)* option yield a BAM file in which the records are sorted in an order corresponding to the order of the reads in the original input file. This option requires using a single thread to perform the conversion from SAM to BAM format, so the runtime is extended.
391 417
392 418
393 @RG@ 419 @RG@
394 420
395 @info@ 421 @links@
422 .. _minimap2: https://github.com/lh3/minimap2
423 .. _`BWA-MEM2`: https://github.com/bwa-mem2/bwa-mem2
396 ]]></help> 424 ]]></help>
397 <citations> 425 <citations>
398 <citation type="doi">10.1093/bioinformatics/btp324</citation> 426 <citation type="doi">10.1093/bioinformatics/btp324</citation>
399 <citation type="doi">10.1093/bioinformatics/btp698</citation> 427 <citation type="doi">10.1093/bioinformatics/btp698</citation>
400 <citation type="bibtex">@misc{1303.3997, 428 <citation type="bibtex">@misc{1303.3997,