Previous changeset 9:019c2a81547a (2015-11-18) Next changeset 11:b4e9cf5f2ae8 (2017-01-03) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bowtie2 commit 320f7fb84d2fda19f6cccdb38b4ef49edec4169d |
modified:
bowtie2_wrapper.xml tool_dependencies.xml |
added:
test-data/bowtie2-stats.out |
b |
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 |
[ |
b'@@ -1,4 +1,4 @@\n-<tool id="bowtie2" name="Bowtie2" version="2.2.6">\n+<tool id="bowtie2" name="Bowtie2" version="2.2.6.2">\n <description>- map reads against reference genome</description>\n <macros>\n <import>read_group_macros.xml</import>\n@@ -9,7 +9,6 @@\n <requirement type="package" version="1.2">samtools</requirement>\n </requirements>\n <command>\n-\n ## prepare bowtie2 index\n #set index_path = \'\'\n #if str($reference_genome.source) == "history":\n@@ -36,6 +35,9 @@\n #if str( $library.unaligned_file ) == "true":\n --un $output_unaligned_reads_l\n #end if\n+ #if str( $library.aligned_file ) == "true":\n+ --al $output_aligned_reads_l\n+ #end if\n #elif str( $library.type ) == "paired":\n -1 "${library.input_1}"\n -2 "${library.input_2}"\n@@ -52,6 +54,9 @@\n #if str( $library.unaligned_file ) == "true":\n --un-conc $output_unaligned_reads_l\n #end if\n+ #if str( $library.aligned_file ) == "true":\n+ --al-conc $output_aligned_reads_l\n+ #end if\n #else\n ## prepare collection\n -1 $library.input_1.forward\n@@ -167,6 +172,11 @@\n ${analysis_type.cline}\n #end if\n \n+ ## mapping stats (i.e. stderr from bowtie2)\n+ #if $save_mapping_stats\n+\t 2> "$mapping_stats"\n+ #end if\n+\n ## output file\n #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ):\n | samtools view -Su - | samtools sort -o - - > $output\n@@ -181,6 +191,12 @@\n && mv "${ _unaligned_root }.1${_unaligned_ext}" "${ output_unaligned_reads_l }"\n && mv "${ _unaligned_root }.2${_unaligned_ext}" "${ output_unaligned_reads_r }"\n #end if\n+ #if $library.type == "paired" and $output_aligned_reads_l and $output_aligned_reads_r:\n+ #from os.path import splitext\n+ #set _aligned_root, _aligned_ext = splitext( str( $output_aligned_reads_l ) )\n+ && mv "${ _aligned_root }.1${_aligned_ext}" "${ output_aligned_reads_l }"\n+ && mv "${ _aligned_root }.2${_aligned_ext}" "${ output_aligned_reads_r }"\n+ #end if\n \n </command>\n <!-- basic error handling -->\n@@ -200,11 +216,13 @@\n <when value="single">\n <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Must be of datatype "fastqsanger"" />\n <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" help="--un/--un-conc; This triggers --un parameter for single reads and --un-conc for paired reads" />\n+ <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" help="--al/--al-conc; This triggers --al parameter for single reads and --al-conc for paired reads" />\n </when>\n <when value="paired">\n <param name="input_1" format="fastqsanger" type="data" label="FASTQ file #1" help="Must be of datatype "fastqsanger"" />\n <param name="input_2" format="fastqsanger" type="data" label="FASTQ file #2" help="Must be of datatype "fastqsanger"" />\n <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" help="--un/--un-conc; This triggers --un parameter for single reads and --un-conc for paired reads" />\n+ <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" help="-'..b'ype="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" />\n </inputs>\n \n <!-- define outputs -->\n@@ -458,6 +478,45 @@\n </conditional>\n </actions>\n </data>\n+ <data format="fastqsanger" name="output_aligned_reads_l" label="${tool.name} on ${on_string}: aligned reads (L)" >\n+ <filter>library[\'aligned_file\'] is True</filter>\n+ <actions>\n+ <conditional name="library.type">\n+ <when value="single">\n+ <action type="format">\n+ <option type="from_param" name="library.input_1" param_attribute="ext" />\n+ </action>\n+ </when>\n+ <when value="paired">\n+ <action type="format">\n+ <option type="from_param" name="library.input_1" param_attribute="ext" />\n+ </action>\n+ </when>\n+ <when value="paired_collection">\n+ <action type="format">\n+ <option type="from_param" name="library.input_1" param_attribute="forward.ext" />\n+ </action>\n+ </when>\n+ </conditional>\n+ </actions>\n+ </data>\n+ <data format="fastqsanger" name="output_aligned_reads_r" label="${tool.name} on ${on_string}: aligned reads (R)">\n+ <filter>( library[\'type\'] == "paired" or library[\'type\'] == "paired_collection" ) and library[\'aligned_file\'] is True</filter>\n+ <actions>\n+ <conditional name="library.type">\n+ <when value="paired">\n+ <action type="format">\n+ <option type="from_param" name="library.input_2" param_attribute="ext" />\n+ </action>\n+ </when>\n+ <when value="paired_collection">\n+ <action type="format">\n+ <option type="from_param" name="library.input_1" param_attribute="reverse.ext" />\n+ </action>\n+ </when>\n+ </conditional>\n+ </actions>\n+ </data>\n <data format="fastqsanger" name="output_unaligned_reads_r" label="${tool.name} on ${on_string}: unaligned reads (R)">\n <filter>( library[\'type\'] == "paired" or library[\'type\'] == "paired_collection" ) and library[\'unaligned_file\'] is True</filter>\n <actions>\n@@ -517,6 +576,9 @@\n </conditional>\n </actions>\n </data>\n+ <data format="txt" name="mapping_stats" label="${tool.name} on ${on_string}: mapping stats">\n+ <filter>save_mapping_stats is True</filter>\n+ </data>\n \n </outputs>\n \n@@ -550,6 +612,21 @@\n <param name="own_file" value="bowtie2-ref.fasta" />\n <output name="output" file="bowtie2-test2.bam" ftype="bam" lines_diff="2"/>\n </test>\n+ <test>\n+ <!-- basic test on single paired default run with stats-->\n+ <param name="type" value="paired"/>\n+ <param name="selection" value="no"/>\n+ <param name="paired_options_selector" value="no"/>\n+ <param name="unaligned_file" value="false"/>\n+ <param name="analysis_type_selector" value="simple"/>\n+ <param name="source" value="history" />\n+ <param name="input_1" value="bowtie2-fq1.fq" ftype="fastqsanger"/>\n+ <param name="input_2" value="bowtie2-fq2.fq" ftype="fastqsanger"/>\n+ <param name="own_file" value="bowtie2-ref.fasta" />\n+ <param name="save_mapping_stats" value="true" />\n+ <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>\n+ <output name="mapping_stats" file="bowtie2-stats.out" ftype="txt"/>\n+ </test>\n </tests>\n \n <help>\n' |
b |
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 |
b |
@@ -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 |
b |
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 |
b |
@@ -1,7 +1,7 @@ <?xml version="1.0"?> <tool_dependency> <package name="bowtie2" version="2.2.6"> - <repository changeset_revision="6d6cca69a34a" name="package_bowtie_2_2_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + <repository changeset_revision="0d9cd7487cc9" name="package_bowtie_2_2_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> </package> <package name="samtools" version="1.2"> <repository changeset_revision="f6ae3ba3f3c1" name="package_samtools_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> |