comparison bwa-mem.xml @ 2:b4dfb5470bf3 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bwa commit 13b3ab10ff1a2e4be39b44f885df6bbe7c23099a
author devteam
date Fri, 30 Dec 2016 08:10:56 -0500
parents 8955a9521def
children 0bde88ff668c
comparison
equal deleted inserted replaced
1:8955a9521def 2:b4dfb5470bf3
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bwa_mem" name="Map with BWA-MEM" version="0.4.2"> 2 <tool id="bwa_mem" name="Map with BWA-MEM" version="@VERSION@.1">
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 <macros> 4 <macros>
5 <import>read_group_macros.xml</import> 5 <import>read_group_macros.xml</import>
6 <import>bwa_macros.xml</import> 6 <import>bwa_macros.xml</import>
7 </macros> 7 </macros>
8 <expand macro="requirements" /> 8 <expand macro="requirements" />
9 <expand macro="stdio" /> 9 <expand macro="stdio" />
10 <command> 10 <command>
11 #set $reference_fasta_filename = "localref.fa" 11 <![CDATA[
12 12 @set_reference_fasta_filename@
13 #if str( $reference_source.reference_source_selector ) == "history":
14 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
15
16 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run
17 ## depending ob the size of the input FASTA dataset
18 (
19 size=`stat -c %s "${reference_fasta_filename}" 2&gt;/dev/null`; ## Linux
20 if [ $? -eq 0 ];
21 then
22 if [ "\$size" -lt 2000000000 ];
23 then
24 bwa index -a is "${reference_fasta_filename}";
25 echo "Generating BWA index with is algorithm";
26 else
27 bwa index -a bwtsw "${reference_fasta_filename}";
28 echo "Generating BWA index with bwtsw algorithm";
29 fi;
30 fi;
31
32 eval \$(stat -s "${reference_fasta_filename}" 2&gt;/dev/null); ## OSX
33 if [ -n "\$st_size" ];
34 then
35 if [ "\$st_size" -lt 2000000000 ];
36 then
37 bwa index -a is "${reference_fasta_filename}";
38 echo "Generating BWA index with is algorithm";
39 else
40 bwa index -a bwtsw "${reference_fasta_filename}";
41 echo "Generating BWA index with bwtsw algorithm";
42 fi;
43 fi;
44 ) &amp;&amp;
45
46 #else:
47 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
48 #end if
49 13
50 ## Begin BWA-MEM command line 14 ## Begin BWA-MEM command line
51 15
52 bwa mem 16 bwa mem
53 -t "\${GALAXY_SLOTS:-1}" 17 -t "\${GALAXY_SLOTS:-1}"
60 #end if 24 #end if
61 #end if 25 #end if
62 26
63 #if str( $analysis_type.analysis_type_selector ) == "pacbio": 27 #if str( $analysis_type.analysis_type_selector ) == "pacbio":
64 -x pacbio 28 -x pacbio
29 #elif str( $analysis_type.analysis_type_selector ) == "ont2d":
30 -x ont2d
31 #elif str( $analysis_type.analysis_type_selector ) == "intractg":
32 -x intractg
65 #elif str( $analysis_type.analysis_type_selector ) == "full": 33 #elif str( $analysis_type.analysis_type_selector ) == "full":
66 #if str( $analysis_type.algorithmic_options.algorithmic_options_selector ) == "set": ## Algorithmic options 34 #if str( $analysis_type.algorithmic_options.algorithmic_options_selector ) == "set": ## Algorithmic options
67 -k "${analysis_type.algorithmic_options.k}" 35 -k "${analysis_type.algorithmic_options.k}"
68 -w "${analysis_type.algorithmic_options.w}" 36 -w "${analysis_type.algorithmic_options.w}"
69 -d "${analysis_type.algorithmic_options.d}" 37 -d "${analysis_type.algorithmic_options.d}"
130 #else: 98 #else:
131 "${reference_fasta_filename}" 99 "${reference_fasta_filename}"
132 "${fastq_input.fastq_input1}" 100 "${fastq_input.fastq_input1}"
133 #end if 101 #end if
134 102
135 | samtools view -Sb - > temporary_bam_file.bam &amp;&amp; 103 | samtools sort -O bam -o '$bam_output'
136 104 ]]>
137 samtools sort -f temporary_bam_file.bam ${bam_output}
138 </command> 105 </command>
139 106
140 <inputs> 107 <inputs>
141 108 <expand macro="reference_source_conditional" />
142 <conditional name="reference_source">
143 <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
144 <option value="cached">Use a built-in genome index</option>
145 <option value="history">Use a genome from history and build index</option>
146 </param>
147 <when value="cached">
148 <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
149 <options from_data_table="bwa_mem_indexes">
150 <filter type="sort_by" column="2" />
151 <validator type="no_options" message="No indexes are available" />
152 </options>
153 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
154 </param>
155 </when>
156 <when value="history">
157 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
158 </when>
159 </conditional>
160 <conditional name="fastq_input"> 109 <conditional name="fastq_input">
161 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data"> 110 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
162 <option value="paired">Paired</option> 111 <option value="paired">Paired</option>
163 <option value="single">Single</option> 112 <option value="single">Single</option>
164 <option value="paired_collection">Paired Collection</option> 113 <option value="paired_collection">Paired Collection</option>
198 147
199 <conditional name="analysis_type"> 148 <conditional name="analysis_type">
200 <param name="analysis_type_selector" type="select" label="Select analysis mode"> 149 <param name="analysis_type_selector" type="select" label="Select analysis mode">
201 <option value="illumina">1.Simple Illumina mode</option> 150 <option value="illumina">1.Simple Illumina mode</option>
202 <option value="pacbio">2.PacBio mode (-x pacbio)</option> 151 <option value="pacbio">2.PacBio mode (-x pacbio)</option>
203 <option value="full">3.Full list of options</option> 152 <option value="ont2d">3.Nanopore 2D-reads mode (-x ont2d)</option>
153 <option value="intractg">4.Intra-species contigs mode (-x intractg)</option>
154 <option value="full">5.Full list of options</option>
204 </param> 155 </param>
205 <when value="illumina"> 156 <when value="illumina">
206 <!-- do nothing --> 157 <!-- do nothing -->
207 </when> 158 </when>
208 <when value="pacbio"> 159 <when value="pacbio">
160 <!-- do nothing. all magic happens within <command> tag -->
161 </when>
162 <when value="ont2d">
163 <!-- do nothing. all magic happens within <command> tag -->
164 </when>
165 <when value="intractg">
209 <!-- do nothing. all magic happens within <command> tag --> 166 <!-- do nothing. all magic happens within <command> tag -->
210 </when> 167 </when>
211 <when value="full"> 168 <when value="full">
212 <conditional name="algorithmic_options"> 169 <conditional name="algorithmic_options">
213 <param name="algorithmic_options_selector" type="select" label="Set algorithmic options?" help="Sets -k, -w, -d, -r, -y, -c, -D, -W, -m, -S, -P, and -e options."> 170 <param name="algorithmic_options_selector" type="select" label="Set algorithmic options?" help="Sets -k, -w, -d, -r, -y, -c, -D, -W, -m, -S, -P, and -e options.">
302 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> 259 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" />
303 </test> 260 </test>
304 <test> 261 <test>
305 <param name="reference_source_selector" value="history" /> 262 <param name="reference_source_selector" value="history" />
306 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 263 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
264 <param name="index_a" value="is"/>
307 <param name="fastq_input_selector" value="paired"/> 265 <param name="fastq_input_selector" value="paired"/>
308 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 266 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
309 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 267 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
310 <param name="rg_selector" value="set"/> 268 <param name="rg_selector" value="set"/>
311 <param name="ID" value="rg1"/> 269 <param name="ID" value="rg1"/>