Mercurial > repos > devteam > bwa
diff bwa-mem.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 |
line wrap: on
line diff
--- a/bwa-mem.xml Thu Dec 03 17:38:14 2015 -0500 +++ b/bwa-mem.xml Fri Jan 08 17:02:09 2016 -0500 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<tool id="bwa_mem" name="Map with BWA-MEM" version="0.4.2"> +<tool id="bwa_mem" name="Map with BWA-MEM" version="0.7.12"> <description>- map medium and long reads (> 100 bp) against reference genome</description> <macros> <import>read_group_macros.xml</import> @@ -8,41 +8,26 @@ <expand macro="requirements" /> <expand macro="stdio" /> <command> +<![CDATA[ #set $reference_fasta_filename = "localref.fa" #if str( $reference_source.reference_source_selector ) == "history": - ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && + ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && - ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run - ## depending ob the size of the input FASTA dataset - ( - size=`stat -c %s "${reference_fasta_filename}" 2>/dev/null`; ## Linux - if [ $? -eq 0 ]; - then - if [ "\$size" -lt 2000000000 ]; - then - bwa index -a is "${reference_fasta_filename}"; - echo "Generating BWA index with is algorithm"; - else - bwa index -a bwtsw "${reference_fasta_filename}"; - echo "Generating BWA index with bwtsw algorithm"; - fi; - fi; - - eval \$(stat -s "${reference_fasta_filename}" 2>/dev/null); ## OSX - if [ -n "\$st_size" ]; - then - if [ "\$st_size" -lt 2000000000 ]; - then - bwa index -a is "${reference_fasta_filename}"; - echo "Generating BWA index with is algorithm"; - else - bwa index -a bwtsw "${reference_fasta_filename}"; - echo "Generating BWA index with bwtsw algorithm"; - fi; - fi; - ) && - + ## The following shell commands decide which of the BWA indexing algorithms (IS or BWTSW) will be run + ## depending on the size of the input FASTA dataset + ( size=`stat -c %s "${reference_source.ref_file}" 2>/dev/null`; ## Linux + if [ $? -ne 0 ]; then + size=\$(stat -f %z "${reference_source.ref_file}"); ## OSX + fi && + if [ "\$size" -lt 2000000000 ]; then + echo "Reference genome size is \$size bytes, generating BWA index with is algorithm"; + bwa index -a is "${reference_fasta_filename}"; + else + echo "Reference genome size is \$size bytes, generating BWA index with bwtsw algorithm"; + bwa index -a bwtsw "${reference_fasta_filename}"; + fi + ) && #else: #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) #end if @@ -132,9 +117,10 @@ "${fastq_input.fastq_input1}" #end if - | samtools view -Sb - > temporary_bam_file.bam && + | samtools view -Sb - > temporary_bam_file.bam && samtools sort -f temporary_bam_file.bam ${bam_output} +]]> </command> <inputs>