changeset 4:0960096dc963 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/vienna_rna commit 746497a64b955f6b9afc1944d1c1d8d877e53267
author rnateam
date Tue, 18 Jul 2017 01:45:43 -0400
parents 3bc9bd5290c1
children cccf09a2f521
files rnaalifold.xml test-data/rnaalifold_input1.fa test-data/rnaalifold_input1.stk test-data/rnaalifold_result_MEA.txt test-data/rnaalifold_resultfa.txt test-data/rnaalifold_resultstk.txt
diffstat 6 files changed, 69 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/rnaalifold.xml	Wed Jul 12 14:22:01 2017 -0400
+++ b/rnaalifold.xml	Tue Jul 18 01:45:43 2017 -0400
@@ -1,4 +1,4 @@
-<tool id="viennarna_rnaalifold" name="@EXECUTABLE@" version="@VERSION@.0">
+<tool id="viennarna_rnaalifold" name="@EXECUTABLE@" version="@VERSION@.1">
     <description>Calculate minimum free energy secondary structures and partition function on a multiple alignment file</description>
     <macros>
         <token name="@EXECUTABLE@">RNAalifold</token>
@@ -11,6 +11,18 @@
 <![CDATA[
         
         RNAalifold  < '$input' > '$tabularFile'
+        
+        #if $input.ext == 'clustal':
+            -f C
+        #else if $input.ext == 'fasta':
+            -f F
+        #else if $input.ext == 'stockholm':
+            -f S
+        #else if $input.ext == 'maf':
+            -f M
+        #else:
+            -f C
+        #end if
         -T$model_options.temperature -d$model_options.dangling
         $general_options.verbose
         $general_options.color
@@ -50,20 +62,22 @@
                     --shapeMethod=$s
                 #end if		
             #end if
-        #end if		
+        #end if
+
         #if $algorithm_options.pf <> "-1"
             --partfunc=$algorithm_options.pf
+            --pfScale=$algorithm_options.pfScale
+
         #end if
-        #if $algorithm_options.mea <> 1.0
-            --mea=$algorithm_options.mea
+        #if $algorithm_options.measelect.mea == "yes":
+            --MEA=$algorithm_options.measelect.meavalue
+            --pfScale=$algorithm_options.pfScale
         #end if
+
         $algorithm_options.mis
         #if $algorithm_options.stochBT_en <> 1
             --stochBT_en=$algorithm_options.stochBT_en
         #end if
-        #if $algorithm_options.pfScale <> 1.07
-            --pfScale=$algorithm_options.pfScale
-        #end if
         $algorithm_options.circular
         #if $algorithm_options.bppmThreshold <> 1e-6
             --bppmThreshold=$algorithm_options.bppmThreshold
@@ -92,14 +106,25 @@
 ]]>
     </command>
     <inputs>
-        <param format="txt" name="input" type="data" label="Clustal file"/>        
+        <param format="clustal,fasta,stockholm,maf" name="input" type="data" label="Clustal/AlignmentFasta/Stockholm/MAF file"/>
+
         <section name="algorithm_options" title="Algorithm Options">
             <param name="pf" type="select" label="Calculate partition function" help="Calculate the partition function and base pairing probability matrix in addition to the mfe structure. Default is calculation of mfe structure only." argument="-p">
                 <option value="-1" selected="true">None</option>
                 <option value="0">0: Deactivates the calculation of the pair probabilities, saving about 50% in runtime</option>
                 <option value="1" >1: Calculate the partition function and base pairing probability matrix</option>				
             </param>
-            <param name="mea" type="float" value="1.0" label="Gamma Value" help="Calculate an MEA (maximum expected accuracy) structure. The parameter gamma tunes the importance of correctly predicted pairs versus unpaired bases. Thus, for small values of gamma the MEA structure will contain only pairs with very high probability. where the expected accuracy is computed from the pair probabilities: each base pair (i,j) gets a score 2*gamma*p_ij and the score of an unpaired base is given by the probability of not forming a pair." argument="--MEA"/>
+
+            <conditional name="measelect">
+                <param name="mea" type="select" label="Calculate Maximum Expected accuracy" argument="--MEA">
+                    <option value="no">No</option>
+                    <option value="yes">Yes</option>
+                </param>
+                <when value="yes">
+                    <param name="meavalue" type="float" value="1.0" label="Gamma Value" help="Calculate an MEA (maximum expected accuracy) structure. The parameter gamma tunes the importance of correctly predicted pairs versus unpaired bases. Thus, for small values of gamma the MEA structure will contain only pairs with very high probability. where the expected accuracy is computed from the pair probabilities: each base pair (i,j) gets a score 2*gamma*p_ij and the score of an unpaired base is given by the probability of not forming a pair."/>
+                </when>
+            </conditional>
+
             <param argument="--mis" type="boolean" checked="false" truevalue="--mis" falsevalue="" label="Most Informative Sequence" help="Output 'most informative sequence' instead of simple consensu"/>							
             <param name="stochBT_en" type="integer" value="1" label="Number of random structures." help="Compute a certain number of random structures with a probability dependend on the partition function. Print out the energies and probabilities of the backtraced structures. " argument="--stochBT_en"/>	        
             <param name="pfScale" type="float" value="1.07" label="Scaling factor" help="In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows). The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences." argument="--pfScale"/>						
@@ -217,6 +242,21 @@
             <param name="input" value="rnaalifold_input1.clustal"/>
             <output name="output" file="rnaalifold_result1.txt"/>
         </test>
+        <test>
+            <param name="input" value="rnaalifold_input1.fa"/>
+            <output name="output" file="rnaalifold_resultfa.txt"/>
+        </test>
+        <test>
+            <param name="input" value="rnaalifold_input1.stk"/>
+            <output name="output" file="rnaalifold_resultstk.txt"/>
+        </test>       
+        <test>
+            <param name="input" value="rnaalifold_input1.clustal"/>
+            <param name="mea" value="yes"/>
+            <output name="output" file="rnaalifold_result_MEA.txt"/>
+        </test>
+        
+
     </tests>
     <help>
 <![CDATA[
@@ -227,7 +267,7 @@
 **Input format**
 
 RNAalifold requires one input file
-- Clustal file
+- Clustal/AlignmentFasta/Stockholm/MAF file
 
 ------
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnaalifold_input1.fa	Tue Jul 18 01:45:43 2017 -0400
@@ -0,0 +1,4 @@
+>Anolis_carolinensis_chrUn_GL34
+TGGGAATTAGCTCAAATGGTAGAGCGCTCGCTTAGCATGTGAGAGGTAGTGGGATCGATGCCCACATTCTCCA
+>Anolis_carolinensis_chrUn_GL35
+GGGGAATTAGCTCAAATGGTAGAGCGCTCGCTTAGCATGCGAGAGGTAGCGGGATTGATGCCCGCATTCTCCA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnaalifold_input1.stk	Tue Jul 18 01:45:43 2017 -0400
@@ -0,0 +1,5 @@
+# STOCKHOLM 1.0
+#=GF SQ 2
+Anolis_carolinensis_chrUn_GL34 TGGGAATTAGCTCAAATGGTAGAGCGCTCGCTTAGCATGTGAGAGGTAGTGGGATCGATGCCCACATTCTCCA
+Anolis_carolinensis_chrUn_GL35 GGGGAATTAGCTCAAATGGTAGAGCGCTCGCTTAGCATGCGAGAGGTAGCGGGATTGATGCCCGCATTCTCCA
+//
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnaalifold_result_MEA.txt	Tue Jul 18 01:45:43 2017 -0400
@@ -0,0 +1,6 @@
+GGGGAAUUAGCUCAAAUGGUAGAGCGCUCGCUUAGCAUGCGAGAGGUAGCGGGAUCGAUGCCCACAUUCUCCA
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). (-26.45 = -26.20 +  -0.25)
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). [-26.77]
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). {-26.45 = -26.20 +  -0.25 d=1.28}
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). {-26.45 = -26.20 +  -0.25 MEA=70.93}
+ frequency of mfe structure in ensemble 0.773705; ensemble diversity 2.40  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnaalifold_resultfa.txt	Tue Jul 18 01:45:43 2017 -0400
@@ -0,0 +1,2 @@
+GGGGAAUUAGCUCAAAUGGUAGAGCGCUCGCUUAGCAUGCGAGAGGUAGCGGGAUCGAUGCCCACAUUCUCCA
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). (-26.45 = -26.20 +  -0.25)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnaalifold_resultstk.txt	Tue Jul 18 01:45:43 2017 -0400
@@ -0,0 +1,2 @@
+GGGGAAUUAGCUCAAAUGGUAGAGCGCUCGCUUAGCAUGCGAGAGGUAGCGGGAUCGAUGCCCACAUUCUCCA
+(((((((..((((........)))).(((((.......))))).....(((((.......)))))))))))). (-26.45 = -26.20 +  -0.25)