comparison bwa.xml @ 11:546ada4a9f43 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bwa commit 610045611b00099e0a24183c8cf33aebfa9635cf
author devteam
date Tue, 19 Jan 2016 11:20:59 -0500
parents 6069ffa8b240
children bd3a1e0de84c
comparison
equal deleted inserted replaced
10:6069ffa8b240 11:546ada4a9f43
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bwa" name="Map with BWA" version="0.7.12"> 2 <tool id="bwa" name="Map with BWA" version="@VERSION@.1">
3 <description>- map short reads (&lt; 100 bp) against reference genome</description> 3 <description>- map short reads (&lt; 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@">
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 <![CDATA[
72 #set $reference_fasta_filename = "localref.fa" 72 @set_reference_fasta_filename@
73
74 #if str( $reference_source.reference_source_selector ) == "history":
75 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &&
76
77 ## The following shell commands decide which of the BWA indexing algorithms (IS or BWTSW) will be run
78 ## depending on the size of the input FASTA dataset
79 ( size=`stat -c %s "${reference_source.ref_file}" 2>/dev/null`; ## Linux
80 if [ $? -ne 0 ]; then
81 size=\$(stat -f %z "${reference_source.ref_file}"); ## OSX
82 fi &&
83 if [ "\$size" -lt 2000000000 ]; then
84 echo "Reference genome size is \$size bytes, generating BWA index with is algorithm";
85 bwa index -a is "${reference_fasta_filename}";
86 else
87 echo "Reference genome size is \$size bytes, generating BWA index with bwtsw algorithm";
88 bwa index -a bwtsw "${reference_fasta_filename}";
89 fi
90 ) &&
91 #else:
92 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
93 #end if
94 73
95 ## setup vars for rg handling... 74 ## setup vars for rg handling...
96 @define_read_group_helpers@ 75 @define_read_group_helpers@
97 #if str( $input_type.input_type_selector ) == "paired": 76 #if str( $input_type.input_type_selector ) == "paired":
98 #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)
244 samtools sort -f temporary_bam_file.bam ${bam_output} 223 samtools sort -f temporary_bam_file.bam ${bam_output}
245 ]]> 224 ]]>
246 </command> 225 </command>
247 226
248 <inputs> 227 <inputs>
249 228 <expand macro="reference_source_conditional" />
250 <conditional name="reference_source">
251 <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">
252 <option value="cached">Use a built-in genome index</option>
253 <option value="history">Use a genome from history and build index</option>
254 </param>
255 <when value="cached">
256 <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
257 <options from_data_table="bwa_mem_indexes">
258 <filter type="sort_by" column="2" />
259 <validator type="no_options" message="No indexes are available" />
260 </options>
261 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
262 </param>
263 </when>
264 <when value="history">
265 <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" />
266 </when>
267 </conditional>
268 <conditional name="input_type"> 229 <conditional name="input_type">
269 <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"> 230 <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">
270 <option value="paired">Paired fastq</option> 231 <option value="paired">Paired fastq</option>
271 <option value="paired_collection">Paired fastq collection</option> 232 <option value="paired_collection">Paired fastq collection</option>
272 <option value="single">Single fastq</option> 233 <option value="single">Single fastq</option>