Mercurial > repos > devteam > bwa
comparison bwa.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" name="Map with BWA" version="0.4.2"> | 2 <tool id="bwa" name="Map with BWA" version="@VERSION@.1"> |
| 3 <description>- map short reads (< 100 bp) against reference genome</description> | 3 <description>- map short reads (< 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 <token name="@command_options@"> | 7 <token name="@command_options@"> |
| 66 </xml> | 66 </xml> |
| 67 </macros> | 67 </macros> |
| 68 <expand macro="requirements" /> | 68 <expand macro="requirements" /> |
| 69 <expand macro="stdio" /> | 69 <expand macro="stdio" /> |
| 70 <command> | 70 <command> |
| 71 #set $reference_fasta_filename = "localref.fa" | 71 <![CDATA[ |
| 72 | 72 @set_reference_fasta_filename@ |
| 73 #if str( $reference_source.reference_source_selector ) == "history": | |
| 74 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && | |
| 75 | |
| 76 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run | |
| 77 ## depending ob the size of the input FASTA dataset | |
| 78 ( | |
| 79 size=`stat -c %s "${reference_fasta_filename}" 2>/dev/null`; ## Linux | |
| 80 if [ $? -eq 0 ]; | |
| 81 then | |
| 82 if [ "\$size" -lt 2000000000 ]; | |
| 83 then | |
| 84 bwa index -a is "${reference_fasta_filename}"; | |
| 85 else | |
| 86 bwa index -a bwtsw "${reference_fasta_filename}"; | |
| 87 fi; | |
| 88 fi; | |
| 89 | |
| 90 eval \$(stat -s "${reference_fasta_filename}" 2>/dev/null); ## OSX | |
| 91 if [ -n "\$st_size" ]; | |
| 92 then | |
| 93 if [ "\$st_size" -lt 2000000000 ]; | |
| 94 then | |
| 95 bwa index -a is "${reference_fasta_filename}"; | |
| 96 echo "Generating BWA index with is algorithm"; | |
| 97 else | |
| 98 bwa index -a bwtsw "${reference_fasta_filename}"; | |
| 99 echo "Generating BWA index with bwtsw algorithm"; | |
| 100 fi; | |
| 101 fi; | |
| 102 ) && | |
| 103 #else: | |
| 104 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) | |
| 105 #end if | |
| 106 | 73 |
| 107 ## setup vars for rg handling... | 74 ## setup vars for rg handling... |
| 108 @define_read_group_helpers@ | 75 @define_read_group_helpers@ |
| 109 #if str( $input_type.input_type_selector ) == "paired": | 76 #if str( $input_type.input_type_selector ) == "paired": |
| 110 #set $rg_auto_name = $read_group_name_default($input_type.fastq_input1, $input_type.fastq_input2) | 77 #set $rg_auto_name = $read_group_name_default($input_type.fastq_input1, $input_type.fastq_input2) |
| 132 "${input_type.fastq_input1.forward}" | 99 "${input_type.fastq_input1.forward}" |
| 133 #else | 100 #else |
| 134 "${input_type.fastq_input1}" | 101 "${input_type.fastq_input1}" |
| 135 #end if | 102 #end if |
| 136 | 103 |
| 137 > first.sai && | 104 > first.sai && |
| 138 | 105 |
| 139 bwa aln | 106 bwa aln |
| 140 -t "\${GALAXY_SLOTS:-1}" | 107 -t "\${GALAXY_SLOTS:-1}" |
| 141 | 108 |
| 142 @command_options@ | 109 @command_options@ |
| 147 "${input_type.fastq_input1.reverse}" | 114 "${input_type.fastq_input1.reverse}" |
| 148 #else | 115 #else |
| 149 "${input_type.fastq_input2}" | 116 "${input_type.fastq_input2}" |
| 150 #end if | 117 #end if |
| 151 | 118 |
| 152 > second.sai && | 119 > second.sai && |
| 153 | 120 |
| 154 bwa sampe | 121 bwa sampe |
| 155 | 122 |
| 156 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True": | 123 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True": |
| 157 -a ${$input_type.adv_pe_options.a} | 124 -a ${$input_type.adv_pe_options.a} |
| 176 | 143 |
| 177 @command_options@ | 144 @command_options@ |
| 178 | 145 |
| 179 "${reference_fasta_filename}" | 146 "${reference_fasta_filename}" |
| 180 "${input_type.fastq_input1}" | 147 "${input_type.fastq_input1}" |
| 181 > first.sai && | 148 > first.sai && |
| 182 | 149 |
| 183 bwa samse | 150 bwa samse |
| 184 | 151 |
| 185 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True": | 152 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True": |
| 186 -n ${$input_type.adv_se_options.n} | 153 -n ${$input_type.adv_se_options.n} |
| 200 | 167 |
| 201 @command_options@ | 168 @command_options@ |
| 202 | 169 |
| 203 "${reference_fasta_filename}" | 170 "${reference_fasta_filename}" |
| 204 "${input_type.bam_input}" | 171 "${input_type.bam_input}" |
| 205 > first.sai && | 172 > first.sai && |
| 206 | 173 |
| 207 bwa aln | 174 bwa aln |
| 208 -t "\${GALAXY_SLOTS:-1}" | 175 -t "\${GALAXY_SLOTS:-1}" |
| 209 -b | 176 -b |
| 210 -2 | 177 -2 |
| 211 @command_options@ | 178 @command_options@ |
| 212 "${reference_fasta_filename}" | 179 "${reference_fasta_filename}" |
| 213 "${input_type.bam_input}" | 180 "${input_type.bam_input}" |
| 214 > second.sai && | 181 > second.sai && |
| 215 | 182 |
| 216 bwa sampe | 183 bwa sampe |
| 217 | 184 |
| 218 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True": | 185 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True": |
| 219 -a ${$input_type.adv_bam_pe_options.a} | 186 -a ${$input_type.adv_bam_pe_options.a} |
| 236 | 203 |
| 237 @command_options@ | 204 @command_options@ |
| 238 | 205 |
| 239 "${reference_fasta_filename}" | 206 "${reference_fasta_filename}" |
| 240 "${input_type.bam_input}" | 207 "${input_type.bam_input}" |
| 241 > first.sai && | 208 > first.sai && |
| 242 | 209 |
| 243 bwa samse | 210 bwa samse |
| 244 | 211 |
| 245 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True": | 212 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True": |
| 246 -n ${$input_type.adv_bam_se_options.n} | 213 -n ${$input_type.adv_bam_se_options.n} |
| 249 @read_group_options@ | 216 @read_group_options@ |
| 250 | 217 |
| 251 "${reference_fasta_filename}" first.sai "${input_type.bam_input}" | 218 "${reference_fasta_filename}" first.sai "${input_type.bam_input}" |
| 252 #end if | 219 #end if |
| 253 | 220 |
| 254 | samtools view -Sb - > temporary_bam_file.bam && | 221 | samtools sort -O bam -o '$bam_output' |
| 255 | 222 ]]> |
| 256 samtools sort -f temporary_bam_file.bam ${bam_output} | |
| 257 </command> | 223 </command> |
| 258 | 224 |
| 259 <inputs> | 225 <inputs> |
| 260 | 226 <expand macro="reference_source_conditional" /> |
| 261 <conditional name="reference_source"> | |
| 262 <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"> | |
| 263 <option value="cached">Use a built-in genome index</option> | |
| 264 <option value="history">Use a genome from history and build index</option> | |
| 265 </param> | |
| 266 <when value="cached"> | |
| 267 <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> | |
| 268 <options from_data_table="bwa_mem_indexes"> | |
| 269 <filter type="sort_by" column="2" /> | |
| 270 <validator type="no_options" message="No indexes are available" /> | |
| 271 </options> | |
| 272 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
| 273 </param> | |
| 274 </when> | |
| 275 <when value="history"> | |
| 276 <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" /> | |
| 277 </when> | |
| 278 </conditional> | |
| 279 <conditional name="input_type"> | 227 <conditional name="input_type"> |
| 280 <param name="input_type_selector" type="select" label="Select input type" help="Select between fastq and bam datasets and between paired and single end data"> | 228 <param name="input_type_selector" type="select" label="Select input type" help="Select between fastq and bam datasets and between paired and single end data"> |
| 281 <option value="paired">Paired fastq</option> | 229 <option value="paired">Paired fastq</option> |
| 282 <option value="paired_collection">Paired fastq collection</option> | 230 <option value="paired_collection">Paired fastq collection</option> |
| 283 <option value="single">Single fastq</option> | 231 <option value="single">Single fastq</option> |
