diff rnacode.xml @ 2:434332033e82 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/rnacode commit b6d3800e260cdfcbe99e5f056344c3df101dad00
author rnateam
date Fri, 13 Apr 2018 07:40:08 -0400
parents 7a84c6c1c4e0
children d49b9759e294
line wrap: on
line diff
--- a/rnacode.xml	Sun Nov 12 18:16:21 2017 -0500
+++ b/rnacode.xml	Fri Apr 13 07:40:08 2018 -0400
@@ -1,17 +1,26 @@
-<tool id="rbc_rnacode" name="RNAcode" version="0.3.0">
+<tool id="rbc_rnacode" name="RNAcode" version="0.3.1">
     <description>Analyze the protein coding potential in MSA.</description>
     <requirements>
         <requirement type="package" version="0.3">rnacode</requirement>
     </requirements>
-    <stdio>
-        <exit_code range="1:"  level="fatal" description="Error occurred. Please check Tool Standard Error"/>
-        <exit_code range=":-1" level="fatal" description="Error occurred. Please check Tool Standard Error"/>
-    </stdio>
     <version_command>RNAcode --version</version_command>
-    <command>
+    <command detect_errors="exit_code">
     <![CDATA[
-        RNAcode
-        
+        #if $cond_breakmaf.select_breakmaf == 'breakmaf'
+            '$__tool_directory__/breakMAF.pl'
+            --maxlength $cond_breakmaf.maxlength
+            --desiredLength $cond_breakmaf.desiredlength
+            < '$alignment' |  
+        #else
+            cat '$alignment' | 
+        #end if
+
+        #if $cond_breakmaf.select_breakmaf == 'breakmaf' and $cond_breakmaf.processseparately == 'yes'
+            '$__tool_directory__/processMAF.sh'
+        #else
+            RNAcode
+        #end if
+
         $outputFormat
         
         #if $cutoff and $cutoff is not None
@@ -28,6 +37,7 @@
         
         #if $cond_generateEPS.generateEPS == 'create'
             --eps
+            --eps-dir eps/ 
             #if $cond_generateEPS.eps_cutoff and $cond_generateEPS.eps_cutoff is not None
                 --eps-cutoff $cond_generateEPS.eps_cutoff
             #end if
@@ -37,8 +47,6 @@
             --pars "$pars"
         #end if
         
-        $alignment
-        
         #if $outputFormat.value == '--tabular'
             --outfile $outFileDefault
         #elif $outputFormat.value == '--gtf'
@@ -49,6 +57,18 @@
     </command>
     <inputs>
         <param name="alignment" type="data" format="clustal,maf" label="Multiple Alignment" help="Alignment needs to be formatted in ClustalW or MAF format"/>
+        <conditional name="cond_breakmaf">
+            <param name="select_breakmaf" type="select" label="Break long alignment blocks" help="If your alignments contain blocks of long genomic regions it is usually not reasonable to score these long regions as a whole.">
+                <option value="keepmaf" selected="true">Process original alignment</option>
+                <option value="breakmaf">Break long alignment blocks</option>
+            </param>
+            <when value="breakmaf">
+                <param argument="--maxLength" name="maxlength" type="integer" optional="true" value="400" label="maxLength" help="Break all blocks longer than that."/>
+                <param argument="--desiredLength" name="desiredlength" type="integer" optional="true" value="200" label="desiredLength" help="Try to create blocks of this size."/>
+                <param name="processseparately" type="boolean" value="false" truevalue="yes" falsevalue="no" label="process blocks separately" help="If enables RNAcode is called separately for each block. This might be a reasonable strategy if RNAcode fails for some blocks."/>
+            </when>
+            <when value="keepmaf"/>
+        </conditional>
         <param argument="--cutoff" name="cutoff" type="float" optional="true" value="1.0" label="Cutoff" help="Show only regions that have a p-value below the given number. By default all hits are shown."/>
         <param argument="--num_samples" name="num_samples" type="integer" optional="true" value="100" label="Number of samples" help="Number of random alignments that are sampled to calculate the p-value. RNAcode estimates the significance of a coding prediction by sampling a given number of random alignments. Default is 100 which gives reasonably stable p-values that are useful for assessing the relevance of a prediction."/>
         <param argument="--stop_early" name="stop_early" type="boolean" truevalue="--stop-early" falsevalue="" checked="false" label="Stop early" help="Setting this option stops the sampling process as soon as it is clear that the best hit will not fall below the given p-value cutoff. For example, assume a p-value cutoff of 0.05 (see --cutoff) and a sample size of 1000 is given (see --num-samples). As soon as 50 random samples score better than the original alignment, the process is stopped and all hits in the original alignment are reported as p>0.05 (or by convention as 1.0 in gtf and tabular output)."/>
@@ -89,7 +109,7 @@
         </data>
         <collection name="output_eps" type="list" label="Plots for ${tool.name} on ${on_string}">
             <filter>cond_generateEPS['generateEPS'] == "create"</filter>
-            <discover_datasets pattern="(?P&lt;designation&gt;.*)\.eps" directory="eps" ext="eps" visible="false"/>
+            <discover_datasets pattern="(?P&lt;designation&gt;.*)\.eps" directory="eps" ext="eps"/>
         </collection>
     </outputs>
     <tests>
@@ -101,7 +121,28 @@
             <!-- sim_size is needed due to rnacode using random sampling: result files differ, better tests should be implemented -->
         </test>
         <test>
+            <param name="alignment" value="coding.aln"/>
+            <param name="generateEPS" value="nocreate"/>
+            <param name="outputFormat" value="--tabular"/>
+            <output name="outFileDefault" ftype="tabular" file="rnacode_result1.tabular" compare="sim_size"/>
+            <!-- sim_size is needed due to rnacode using random sampling: result files differ, better tests should be implemented -->
+        </test>
+        <test>
             <param name="alignment" value="coding.maf"/>
+            <conditional name="cond_breakmaf">
+                <param name="select_breakmaf" value="breakmaf"/>
+            </conditional>
+            <param name="generateEPS" value="nocreate"/>
+            <param name="outputFormat" value="--gtf"/>
+            <output name="outFileGTF" ftype="gtf" file="rnacode_result2.gtf" compare="sim_size"/>
+            <!-- sim_size is needed due to rnacode using random sampling: result files differ, better tests should be implemented -->
+        </test>
+        <test>
+            <param name="alignment" value="coding.maf"/>
+            <conditional name="cond_breakmaf">
+                <param name="select_breakmaf" value="breakmaf"/>
+                <param name="processseparately" value="yes"/>
+            </conditional>
             <param name="generateEPS" value="nocreate"/>
             <param name="outputFormat" value="--gtf"/>
             <output name="outFileGTF" ftype="gtf" file="rnacode_result2.gtf" compare="sim_size"/>