Mercurial > repos > devteam > bwa
comparison bwa.xml @ 10:6069ffa8b240 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bwa commit 653588a3c59eb9965097f87c99e6fca1806365cd
author | devteam |
---|---|
date | Fri, 08 Jan 2016 17:02:09 -0500 |
parents | 7bee165c3a44 |
children | 546ada4a9f43 |
comparison
equal
deleted
inserted
replaced
9:7bee165c3a44 | 10:6069ffa8b240 |
---|---|
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="0.7.12"> |
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 <![CDATA[ | |
71 #set $reference_fasta_filename = "localref.fa" | 72 #set $reference_fasta_filename = "localref.fa" |
72 | 73 |
73 #if str( $reference_source.reference_source_selector ) == "history": | 74 #if str( $reference_source.reference_source_selector ) == "history": |
74 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && | 75 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && |
75 | 76 |
76 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run | 77 ## The following shell commands decide which of the BWA indexing algorithms (IS or BWTSW) will be run |
77 ## depending ob the size of the input FASTA dataset | 78 ## depending on the size of the input FASTA dataset |
78 ( | 79 ( size=`stat -c %s "${reference_source.ref_file}" 2>/dev/null`; ## Linux |
79 size=`stat -c %s "${reference_fasta_filename}" 2>/dev/null`; ## Linux | 80 if [ $? -ne 0 ]; then |
80 if [ $? -eq 0 ]; | 81 size=\$(stat -f %z "${reference_source.ref_file}"); ## OSX |
81 then | 82 fi && |
82 if [ "\$size" -lt 2000000000 ]; | 83 if [ "\$size" -lt 2000000000 ]; then |
83 then | 84 echo "Reference genome size is \$size bytes, generating BWA index with is algorithm"; |
84 bwa index -a is "${reference_fasta_filename}"; | 85 bwa index -a is "${reference_fasta_filename}"; |
85 else | 86 else |
86 bwa index -a bwtsw "${reference_fasta_filename}"; | 87 echo "Reference genome size is \$size bytes, generating BWA index with bwtsw algorithm"; |
87 fi; | 88 bwa index -a bwtsw "${reference_fasta_filename}"; |
88 fi; | 89 fi |
89 | 90 ) && |
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: | 91 #else: |
104 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) | 92 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) |
105 #end if | 93 #end if |
106 | 94 |
107 ## setup vars for rg handling... | 95 ## setup vars for rg handling... |
132 "${input_type.fastq_input1.forward}" | 120 "${input_type.fastq_input1.forward}" |
133 #else | 121 #else |
134 "${input_type.fastq_input1}" | 122 "${input_type.fastq_input1}" |
135 #end if | 123 #end if |
136 | 124 |
137 > first.sai && | 125 > first.sai && |
138 | 126 |
139 bwa aln | 127 bwa aln |
140 -t "\${GALAXY_SLOTS:-1}" | 128 -t "\${GALAXY_SLOTS:-1}" |
141 | 129 |
142 @command_options@ | 130 @command_options@ |
147 "${input_type.fastq_input1.reverse}" | 135 "${input_type.fastq_input1.reverse}" |
148 #else | 136 #else |
149 "${input_type.fastq_input2}" | 137 "${input_type.fastq_input2}" |
150 #end if | 138 #end if |
151 | 139 |
152 > second.sai && | 140 > second.sai && |
153 | 141 |
154 bwa sampe | 142 bwa sampe |
155 | 143 |
156 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True": | 144 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True": |
157 -a ${$input_type.adv_pe_options.a} | 145 -a ${$input_type.adv_pe_options.a} |
176 | 164 |
177 @command_options@ | 165 @command_options@ |
178 | 166 |
179 "${reference_fasta_filename}" | 167 "${reference_fasta_filename}" |
180 "${input_type.fastq_input1}" | 168 "${input_type.fastq_input1}" |
181 > first.sai && | 169 > first.sai && |
182 | 170 |
183 bwa samse | 171 bwa samse |
184 | 172 |
185 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True": | 173 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True": |
186 -n ${$input_type.adv_se_options.n} | 174 -n ${$input_type.adv_se_options.n} |
200 | 188 |
201 @command_options@ | 189 @command_options@ |
202 | 190 |
203 "${reference_fasta_filename}" | 191 "${reference_fasta_filename}" |
204 "${input_type.bam_input}" | 192 "${input_type.bam_input}" |
205 > first.sai && | 193 > first.sai && |
206 | 194 |
207 bwa aln | 195 bwa aln |
208 -t "\${GALAXY_SLOTS:-1}" | 196 -t "\${GALAXY_SLOTS:-1}" |
209 -b | 197 -b |
210 -2 | 198 -2 |
211 @command_options@ | 199 @command_options@ |
212 "${reference_fasta_filename}" | 200 "${reference_fasta_filename}" |
213 "${input_type.bam_input}" | 201 "${input_type.bam_input}" |
214 > second.sai && | 202 > second.sai && |
215 | 203 |
216 bwa sampe | 204 bwa sampe |
217 | 205 |
218 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True": | 206 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True": |
219 -a ${$input_type.adv_bam_pe_options.a} | 207 -a ${$input_type.adv_bam_pe_options.a} |
236 | 224 |
237 @command_options@ | 225 @command_options@ |
238 | 226 |
239 "${reference_fasta_filename}" | 227 "${reference_fasta_filename}" |
240 "${input_type.bam_input}" | 228 "${input_type.bam_input}" |
241 > first.sai && | 229 > first.sai && |
242 | 230 |
243 bwa samse | 231 bwa samse |
244 | 232 |
245 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True": | 233 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True": |
246 -n ${$input_type.adv_bam_se_options.n} | 234 -n ${$input_type.adv_bam_se_options.n} |
249 @read_group_options@ | 237 @read_group_options@ |
250 | 238 |
251 "${reference_fasta_filename}" first.sai "${input_type.bam_input}" | 239 "${reference_fasta_filename}" first.sai "${input_type.bam_input}" |
252 #end if | 240 #end if |
253 | 241 |
254 | samtools view -Sb - > temporary_bam_file.bam && | 242 | samtools view -Sb - > temporary_bam_file.bam && |
255 | 243 |
256 samtools sort -f temporary_bam_file.bam ${bam_output} | 244 samtools sort -f temporary_bam_file.bam ${bam_output} |
245 ]]> | |
257 </command> | 246 </command> |
258 | 247 |
259 <inputs> | 248 <inputs> |
260 | 249 |
261 <conditional name="reference_source"> | 250 <conditional name="reference_source"> |