# HG changeset patch # User devteam # Date 1458673135 14400 # Node ID a9d4f71dbfb03e86944bb12796973a4c9aeeb305 # Parent 019c2a81547add1ad6fdc369f83d0b5fa21d3516 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bowtie2 commit 320f7fb84d2fda19f6cccdb38b4ef49edec4169d diff -r 019c2a81547a -r a9d4f71dbfb0 bowtie2_wrapper.xml --- a/bowtie2_wrapper.xml Wed Nov 18 09:51:30 2015 -0500 +++ b/bowtie2_wrapper.xml Tue Mar 22 14:58:55 2016 -0400 @@ -1,4 +1,4 @@ - + - map reads against reference genome read_group_macros.xml @@ -9,7 +9,6 @@ samtools - ## prepare bowtie2 index #set index_path = '' #if str($reference_genome.source) == "history": @@ -36,6 +35,9 @@ #if str( $library.unaligned_file ) == "true": --un $output_unaligned_reads_l #end if + #if str( $library.aligned_file ) == "true": + --al $output_aligned_reads_l + #end if #elif str( $library.type ) == "paired": -1 "${library.input_1}" -2 "${library.input_2}" @@ -52,6 +54,9 @@ #if str( $library.unaligned_file ) == "true": --un-conc $output_unaligned_reads_l #end if + #if str( $library.aligned_file ) == "true": + --al-conc $output_aligned_reads_l + #end if #else ## prepare collection -1 $library.input_1.forward @@ -167,6 +172,11 @@ ${analysis_type.cline} #end if + ## mapping stats (i.e. stderr from bowtie2) + #if $save_mapping_stats + 2> "$mapping_stats" + #end if + ## output file #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ): | samtools view -Su - | samtools sort -o - - > $output @@ -181,6 +191,12 @@ && mv "${ _unaligned_root }.1${_unaligned_ext}" "${ output_unaligned_reads_l }" && mv "${ _unaligned_root }.2${_unaligned_ext}" "${ output_unaligned_reads_r }" #end if + #if $library.type == "paired" and $output_aligned_reads_l and $output_aligned_reads_r: + #from os.path import splitext + #set _aligned_root, _aligned_ext = splitext( str( $output_aligned_reads_l ) ) + && mv "${ _aligned_root }.1${_aligned_ext}" "${ output_aligned_reads_l }" + && mv "${ _aligned_root }.2${_aligned_ext}" "${ output_aligned_reads_r }" + #end if @@ -200,11 +216,13 @@ + + @@ -232,6 +250,7 @@ + @@ -430,6 +449,7 @@ + @@ -458,6 +478,45 @@ + + library['aligned_file'] is True + + + + + + + + + + + + + + + + + + + ( library['type'] == "paired" or library['type'] == "paired_collection" ) and library['aligned_file'] is True + + + + + + + + + + + + + ( library['type'] == "paired" or library['type'] == "paired_collection" ) and library['unaligned_file'] is True @@ -517,6 +576,9 @@ + + save_mapping_stats is True + @@ -550,6 +612,21 @@ + + + + + + + + + + + + + + + diff -r 019c2a81547a -r a9d4f71dbfb0 test-data/bowtie2-stats.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/bowtie2-stats.out Tue Mar 22 14:58:55 2016 -0400 @@ -0,0 +1,15 @@ +100 reads; of these: + 100 (100.00%) were paired; of these: + 97 (97.00%) aligned concordantly 0 times + 3 (3.00%) aligned concordantly exactly 1 time + 0 (0.00%) aligned concordantly >1 times + ---- + 97 pairs aligned concordantly 0 times; of these: + 8 (8.25%) aligned discordantly 1 time + ---- + 89 pairs aligned 0 times concordantly or discordantly; of these: + 178 mates make up the pairs; of these: + 153 (85.96%) aligned 0 times + 25 (14.04%) aligned exactly 1 time + 0 (0.00%) aligned >1 times +23.50% overall alignment rate diff -r 019c2a81547a -r a9d4f71dbfb0 tool_dependencies.xml --- a/tool_dependencies.xml Wed Nov 18 09:51:30 2015 -0500 +++ b/tool_dependencies.xml Tue Mar 22 14:58:55 2016 -0400 @@ -1,7 +1,7 @@ - +