Mercurial > repos > devteam > bwa
diff 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 |
line wrap: on
line diff
--- a/bwa-mem.xml Fri Aug 19 18:51:56 2022 +0000 +++ b/bwa-mem.xml Fri May 17 21:09:07 2024 +0000 @@ -1,13 +1,11 @@ <?xml version="1.0"?> -<tool id="bwa_mem" name="Map with BWA-MEM" version="@VERSION@.2"> +<tool id="bwa_mem" name="Map with BWA-MEM" version="@TOOL_VERSION@" profile="22.05"> <description>- map medium and long reads (> 100 bp) against reference genome</description> - <xrefs> - <xref type="bio.tools">bwa</xref> - </xrefs> <macros> <import>read_group_macros.xml</import> <import>bwa_macros.xml</import> </macros> + <expand macro="bio_tools"/> <expand macro="requirements"/> <expand macro="stdio"/> <command><![CDATA[ @@ -100,7 +98,8 @@ #end if '${reference_fasta_filename}' - '${fastq_input.fastq_input1}' '${fastq_input.fastq_input2}' + '${fastq_input.fastq_input1}' + '${fastq_input.fastq_input2}' #elif str( $fastq_input.fastq_input_selector ) == "paired_collection": ## check that insert statistics is used #if str( $fastq_input.iset_stats ): @@ -108,7 +107,8 @@ #end if '${reference_fasta_filename}' - '${fastq_input.fastq_input1.forward}' '${fastq_input.fastq_input1.reverse}' + '${fastq_input.fastq_input1.forward}' + '${fastq_input.fastq_input1.reverse}' #else: '${reference_fasta_filename}' '${fastq_input.fastq_input1}' @@ -167,7 +167,7 @@ <expand macro="read_group_conditional" /> <conditional name="analysis_type"> - <param name="analysis_type_selector" type="select" label="Select analysis mode"> + <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)."> <option value="illumina">1.Simple Illumina mode</option> <option value="pacbio">2.PacBio mode (-x pacbio)</option> <option value="ont2d">3.Nanopore 2D-reads mode (-x ont2d)</option> @@ -279,35 +279,35 @@ </change_format> </data> </outputs> - <tests> - <test> + <!-- `samtools sort` in the new update adds PG lines to the output so the lines_diff is changed from "2" to "4" --> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <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="illumina"/> - <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> + <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="4" /> </test> - <test> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <param name="fastq_input_selector" value="single"/> <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fasta1.fa"/> <param name="analysis_type_selector" value="illumina"/> - <output name="bam_output" ftype="bam" file="bwa-mem-test1-fasta.bam" lines_diff="2" /> + <output name="bam_output" ftype="bam" file="bwa-mem-test1-fasta.bam" lines_diff="4" /> </test> - <test> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <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="illumina"/> - <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> + <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="4" /> </test> - <test> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <param name="index_a" value="is"/> @@ -319,9 +319,9 @@ <param name="PL" value="CAPILLARY"/> <param name="LB" value="AARDVARK-1" /> <param name="analysis_type_selector" value="illumina"/> - <output name="bam_output" ftype="bam" file="bwa-mem-test2.bam" lines_diff="2" /> + <output name="bam_output" ftype="bam" file="bwa-mem-test2.bam" lines_diff="4" /> </test> - <test> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <param name="fastq_input_selector" value="paired"/> @@ -329,9 +329,9 @@ <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> <param name="analysis_type_selector" value="illumina"/> <param name="output_sort" value="unsorted"/> - <output name="bam_output" ftype="qname_input_sorted.bam" file="bwa-mem-test3.bam" lines_diff="2" /> + <output name="bam_output" ftype="qname_input_sorted.bam" file="bwa-mem-test3.bam" lines_diff="4" /> </test> - <test> + <test expect_num_outputs="1"> <param name="reference_source_selector" value="history" /> <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> <param name="fastq_input_selector" value="paired"/> @@ -339,11 +339,34 @@ <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> <param name="analysis_type_selector" value="illumina"/> <param name="output_sort" value="name"/> - <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="2" /> + <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="4" /> + </test> + <test expect_num_outputs="1"> + <param name="reference_source_selector" value="history" /> + <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> + <conditional name="fastq_input"> + <param name="fastq_input_selector" value="paired_collection"/> + <param name="fastq_input1"> + <collection type="paired"> + <element name="forward" value="bwa-mem-fastq1.fq" /> + <element name="reverse" value="bwa-mem-fastq2.fq" /> + </collection> + </param> + </conditional> + <conditional name="analysis_type"> + <param name="analysis_type_selector" value="illumina"/> + </conditional> + <param name="output_sort" value="name"/> + <output name="bam_output" ftype="qname_sorted.bam" file="bwa-mem-test4.bam" lines_diff="4" /> </test> </tests> <help><![CDATA[ -**What is does** + +**What it does** + +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`_. + +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). From http://arxiv.org/abs/1303.3997: @@ -351,34 +374,37 @@ It automatically chooses between local and end-to-end alignments, supports paired-end reads and performs chimeric alignment. The algorithm is robust to sequencing errors and applicable to a wide range of sequence lengths from 70bp to a few megabases. -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). +----- + +@ref_genomes@ ----- -**Indices: Selecting reference genomes for BWA** +**Analysis modes** + +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. -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: +The preconfigured modes are: + + 1. *Simple Illumina mode* + + 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] + 2. *PacBio mode* - 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. - 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`. + This mode is adjusted specifically for mapping of long PacBio subreads. It is running bwa mame with the `-x pacbio` option. + 3. *Nanopore 2D-reads mode* + + This mode is running bwa mem with the `-x ont2d` option. + 4. *Intra-sepcies contigs mode* -If your genome of interest is not listed here you have two choices: + This mode is running bwa mem with the `-x intractg` option. - 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 - 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. +.. class:: infomark + + 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. ----- -**Galaxy-specific option** - -Galaxy allows four levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are: - - 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] - 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> - 3. *Full list of options*: Allows access to all options through Galaxy interface. - - ----- - **Bam sorting mode** The generated bam files can be sorted according to three criteria: coordinates, names and input order. @@ -392,7 +418,9 @@ @RG@ -@info@ +@links@ +.. _minimap2: https://github.com/lh3/minimap2 +.. _`BWA-MEM2`: https://github.com/bwa-mem2/bwa-mem2 ]]></help> <citations> <citation type="doi">10.1093/bioinformatics/btp324</citation>