Repository 'sortmerna'
hg clone https://toolshed.g2.bx.psu.edu/repos/rnateam/sortmerna

Changeset 2:3699b6b771e0 (2016-03-29)
Previous changeset 1:b482293b2987 (2015-08-05) Next changeset 3:59252ca85c74 (2016-06-15)
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/sortmerna commit 9fcf62e1e259381613e48a0ff28c27bd4fe82707
modified:
sortmerna.xml
tool_dependencies.xml
b
diff -r b482293b2987 -r 3699b6b771e0 sortmerna.xml
--- a/sortmerna.xml Wed Aug 05 02:50:43 2015 -0400
+++ b/sortmerna.xml Tue Mar 29 07:01:13 2016 -0400
[
b'@@ -1,7 +1,7 @@\n-<tool id="bg_sortmerna" name="Filter with SortMeRNA" version="2.0.0">\n+<tool id="bg_sortmerna" name="Filter with SortMeRNA" version="2.1b.0">\n     <description>Fast and accurate filtering of ribosomal RNAs in metatranscriptomic data</description>\n     <requirements>\n-        <requirement type=\'package\' version="2.0">sortmerna</requirement>\n+        <requirement type="package" version="2.1b">sortmerna</requirement>\n     </requirements>\n     <stdio>\n         <regex match="This program builds a Burst trie on an input rRNA database"\n@@ -12,6 +12,10 @@\n             source="both"\n             level="fatal"\n             description="The database ${databases} has not been preprocessed using buildtrie before using SortMeRNA." />\n+        <regex match="ERROR"\n+            source="both"\n+            level="fatal"\n+            description="ERROR" />\n     </stdio>\n     <version_command>\n <![CDATA[\n@@ -22,13 +26,18 @@\n <![CDATA[\n     #set $ref = \'\'\n     #set $sep=\'\'\n-    #if str( $databases_type.databases_selector ) == \'history\':\n+    #if str( $databases_type.databases_selector ) == \'history\'\n         #for $db in $databases_type.database_name\n             #set $ref += $sep + str($db) + \',\' + $os.path.splitext($os.path.basename(str($db)))[0]\n             #set $sep = \':\'\n         #end for\n-        indexdb_rna --ref $ref\n-        &&\n+    #else if str( $databases_type.databases_selector ) == \'cached_to_index\'\n+        ## databases path is not directly accessible, must match by hand with LOC file contents\n+        #set $data_table = dict([(_[0], _[2]) for _ in $databases_type.input_databases.input.options.tool_data_table.data])\n+        #for $db in $databases_type.input_databases.value\n+            #set $ref += $sep + $data_table[$db] + \',\' + $os.path.splitext($data_table[$db])[0] + \'-reindexed\'\n+            #set $sep = \':\'\n+        #end for\n     #else:\n         ## databases path is not directly accessible, must match by hand with LOC file contents\n         #set $data_table = dict([(_[0], _[2]) for _ in $databases_type.input_databases.input.options.tool_data_table.data])\n@@ -37,24 +46,62 @@\n             #set $sep = \':\'\n         #end for\n     #end if\n-    sortmerna --ref $ref --reads $input_reads --aligned aligned\n-    #if str( $sequencing_type.sequencing_type_selector ) == \'paired\'\n-        $sequencing_type.paired_type\n+\n+    #if str( $databases_type.databases_selector ) != \'cached\':\n+        indexdb_rna \n+            --ref $ref \n+            -L $databases_type.seed_length \n+            --max_pos $databases_type.max_pos \n+        &&\n     #end if\n-    $strand_search\n-    $aligned_fastx.aligned_fastx_selector\n-    #if $aligned_fastx.aligned_fastx_selector == \'--fastx\'\n-        #if $aligned_fastx.other\n-            --other other_file\n+\n+    sortmerna \n+    \t--ref $ref \n+    \t--reads $input_reads \n+    \t--aligned aligned\n+\t\n+    \t#if str( $sequencing_type.sequencing_type_selector ) == \'paired\'\n+            \t$sequencing_type.paired_type\n+    \t#end if\n+\n+    \t$strand_search\n+    \t$aligned_fastx.aligned_fastx_selector\n+    \t#if $aligned_fastx.aligned_fastx_selector == \'--fastx\'\n+        \t#if $aligned_fastx.other\n+            \t\t--other other_file\n+        \t#end if\n+    \t#end if\n+    \t$aligned_sam.aligned_sam_selector\n+    \t#if $aligned_sam.aligned_sam_selector == \'--sam\'\n+        \t$aligned_sam.sq\n+    \t#end if\n+    \t$aligned_blast\n+\n+    \t$log\n+\n+        #if $report.report_type == \'best\'\n+            #if $report.report_best.report_best_type == \'1\'\n+                --best 1\n+                --min_lis $report.report_best.report_best_min_lis\n+            #else\n+                --best $report.report_best.report_best_value\n+                --min_lis $report.report_best.report_best_min_lis\n+            #end if\n+        #else\n+            #if $report.report_num_alignments.report_num_alignments_type == \'other_value\'\n+                --num_alignments $report.report_num_alignments.report_num_alignments_value\n+            #else\n+                -'..b' using a LIS of seed matches)</option>\n+                        <option value="other_value">A custom number of reference sequences are searched for alignments (speed decrease for high value)</option>\n+                    </param>\n+                    <when value="1">\n+                        <param name="report_best_min_lis" type="integer" min="0" max="100" value="2" label="Number of longest LIS an alignement needs to be searched" help="The alignements having the first INT longest LIS. LIS stands for Longest Increasing Subsequence, it is computed using seeds\' positions to expand hits into longer matches prior to Smith-Waterman alignment. (--min_lis)"/>\n+                    </when>\n+                    <when value="other_value">\n+                        <param name="report_best_value" type="integer" min="2" max="100" value="2" label="Number of alignments to be made" help="Only the best one is reported. The computation speed decrease with high value"/>\n+                        <param name="report_best_min_lis" type="integer" min="0" max="100" value="2" label="Number of longest LIS an alignement needs to be searched" help="The alignements having the first INT longest LIS. LIS stands for Longest Increasing Subsequence, it is computed using seeds\' positions to expand hits into longer matches prior to Smith-Waterman alignment. (--min_lis)"/>\n+                    </when>\n+                </conditional>\n+            </when>\n+            <when value="num_alignments">\n+                <conditional name="report_num_alignments">\n+                    <param name="report_num_alignments_type" type="select" label="Number of output alignments" help="(--num_alignments)">\n+                        <option value="0">All alignments reaching the E-value threshold are reported (very slow, this option is not suggested for high similarity rRNA databases)</option>\n+                        <option value="1" selected="true">The first alignment passing E-value threshold are reported (very fast, best choice if only filtering is needed)</option>\n+                        <option value="other_value">A custom number of alignments are made and reported (speed decrease for high value)</option>\n+                    </param>\n+                    <when value="0" />\n+                    <when value="1" />\n+                    <when value="other_value">\n+                        <param name="report_num_alignments_value" type="integer" min="0" max="100" value="1" label="Number of alignments to be made and reported" help=""/>\n+                    </when>\n+                </conditional>\n+            </when>\n+        </conditional>\n+\n+        <param name="e_value" type="float" min="0" max="10" value="1" label="E-value threshold" help="(-e)"/>\n+        <param name="match" type="integer" min="0" max="10" value="2" label="SW score for a match" help="(--match)"/>\n+        <param name="mismatch" type="integer" min="-10" max="0" value="-3" label="SW penalty for a mismatch" help="(--mismatch)"/>\n+        <param name="gap_open" type="integer" min="0" max="10" value="5" label="SW penalty for introducing a gap" help="(--gap_open)"/>\n+        <param name="gap_ext" type="integer" min="0" max="10" value="2" label="SW penalty for extending a gap" help="(--gap_ext)"/>\n+        <param name="ambiguous_letter" type="integer" min="-10" max="0" value="-3" label="SW penalty for ambiguous letters (N\'s)" help="(-N)"/>\n     </inputs>\n     <outputs>\n         <data format_source="input_reads" name="output_fastx" from_work_dir="aligned.dat"\n@@ -245,8 +346,10 @@\n \n .. class:: warningmark\n \n-Note that your personal databases are indexed each time, and that\n-this may take some time depending on the size of the given database.\n+Note that your personal databases are indexed each time. The public ribosomal\n+databases are indexed when added, but they can be re-indexed with non-default indexing \n+parameters. The indexing may take some time depending on the size of the given database.\n+\n ]]>\n     </help>\n \n'
b
diff -r b482293b2987 -r 3699b6b771e0 tool_dependencies.xml
--- a/tool_dependencies.xml Wed Aug 05 02:50:43 2015 -0400
+++ b/tool_dependencies.xml Tue Mar 29 07:01:13 2016 -0400
[
@@ -1,18 +1,49 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="sortmerna" version="2.0">
+    <package name="sortmerna" version="2.1b">
         <install version="1.0">
-            <actions>
-                <action type="download_by_url" target_filename="sortmerna-2.0.tar.gz">https://github.com/biocore/sortmerna/archive/2.0.tar.gz</action>
-                <action type="autoconf"/>
-                <action type="set_environment">
-                    <environment_variable name="SORTMERNADIR" action="set_to">$INSTALL_DIR</environment_variable>
-                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
-                </action>
-            </actions>
+            <actions_group>
+                <actions architecture="x86_64" os="linux">
+                    <action type="download_by_url" target_filename="sortmerna-2.1b.tar.gz">https://github.com/biocore/sortmerna/archive/2.1b.tar.gz</action>
+                    <action type="shell_command"><![CDATA[
+                        ./build.sh --prefix=$INSTALL_DIR
+                    ]]>
+                    </action>
+                    <action type="shell_command">make install</action>
+                    <action type="make_directory">$INSTALL_DIR/rRNA_databases/</action>
+                    <action type="move_directory_files">
+                        <source_directory>rRNA_databases/</source_directory>
+                        <destination_directory>$INSTALL_DIR/rRNA_databases/</destination_directory>
+                    </action>
+                    <action type="set_environment">
+                        <environment_variable name="SORTMERNADIR" action="set_to">$INSTALL_DIR/</environment_variable>
+                        <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+                    </action>
+                </actions>
+                <actions architecture="x86_64" os="darwin">
+                    <action type="download_by_url" target_filename="sortmerna-2.1b.tar.gz">https://github.com/biocore/sortmerna/archive/2.1b.tar.gz</action>
+                    <action type="shell_command"><![CDATA[
+                        export CC=gcc-mp-4.8 && export CXX=g++-mp-4.8 && ./build.sh --prefix=$INSTALL_DIR && make install
+                    ]]>
+                    </action>
+                    <action type="make_directory">$INSTALL_DIR/rRNA_databases/</action>
+                    <action type="move_directory_files">
+                        <source_directory>rRNA_databases/</source_directory>
+                        <destination_directory>$INSTALL_DIR/rRNA_databases/</destination_directory>
+                    </action>
+                    <action type="set_environment">
+                        <environment_variable name="SORTMERNADIR" action="set_to">$INSTALL_DIR/</environment_variable>
+                        <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+                    </action>
+                </actions>
+            </actions_group>
         </install>
         <readme>
-        SortMeRNA requires g++ 4.3 or later. Installation may take a moment since ribosomal databases have to be indexed.
+        SortMeRNA requires g++ 4.8 or later.
+
+        Note: the Clang compiler on Mac (distributed through Xcode) does not
+        support multithreading. The user is recommended to install the original
+        GCC compiler via MacPorts
         </readme>
     </package>
 </tool_dependency>