changeset 7:fd067a1143f3 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/intarna commit 6529d7f585194b5a8bed7c19707dc918f18ec6fc"
author bgruening
date Mon, 07 Oct 2019 06:18:13 -0400
parents 3f6715821198
children 0795d6cf0967
files intarna.xml test-data/intarna_result.tabular
diffstat 2 files changed, 309 insertions(+), 245 deletions(-) [+]
line wrap: on
line diff
--- a/intarna.xml	Tue Apr 10 12:24:44 2018 -0400
+++ b/intarna.xml	Mon Oct 07 06:18:13 2019 -0400
@@ -1,416 +1,480 @@
-<tool id="intarna" name="IntaRNA" version="2.2.0">
+<tool id="intarna" name="IntaRNA" version="3.1.1">
     <description>Efficient RNA-RNA interaction prediction incorporating accessibility and seeding of interaction sites.</description>
     <macros>
         <macro name="query_macro">
-            <param name="_query" argument="--query" format="fasta" type="data" label="Query sequence(s)" help="Sequences have to use IUPAC nucleotide encoding. File must be in FASTA format" />
+            <param argument="--query" format="fasta" help="Sequences have to use IUPAC nucleotide encoding. File must be in FASTA format" label="Query sequence(s)" name="query" type="data" />
             <conditional name="qAcc_cond">
-                <param argument="--qAcc" type="select" label="Accessibility computation" help="">
+                <param argument="--qAcc" help="" label="Accessibility computation" type="select">
                     <option value="N">No accessibility contributions ('N')</option>
-                    <option value="C" selected="true">Computation of accessibilities ('C')</option>
-                    <option value="P">Unpaired probabilities in RNAplfold format from --qAccFile</option>
-                    <option value="E">ED values in RNAplfold Pu-like format from --qAccFile</option>
-                </param>
-                <when value="N"/>
-                <when value="C"/>
-                <when value="P">
-                    <param argument="--qAccFile" format="txt" type="data" label="Accessibility computation" help="" />
-                </when>
-                <when value="E">
-                    <param argument="--qAccFile" format="txt" type="data" label="Accessibility computation" help="" />
-                </when>
-            </conditional>
-            <param argument="--qAccW" type="integer" value="150" min="0" max="99999"
-                label="Max. interaction length" help="... for query accessibility computation. Set to 0 to use full sequence length"/>
-            <param argument="--qAccL" type="integer" value="100" min="0" max="99999"
-                label="Max. loop length" help="... for query accessibility computation. 0 defaults to sliding window size 'qAccW'"/>
-        </macro>
-        <macro name="target_macro">
-            <param name="_target" argument="--target" format="fasta" type="data" label="Target sequence(s)" help="Sequences have to use IUPAC nucleotide encoding. File must be in FASTA format" />
-            <conditional name="tAcc_cond">
-                <param argument="--tAcc" type="select" label="Accessibility computation" help="">
-                    <option value="N">No accessibility contributions ('N')</option>
-                    <option value="C" selected="true">Computation of accessibilities ('C')</option>
+                    <option selected="true" value="C">Computation of accessibilities ('C')</option>
                     <option value="P">Unpaired probabilities in RNAplfold format from --qAccFile</option>
                     <option value="E">ED values in RNAplfold Pu-like format from --qAccFile</option>
                 </param>
-                <when value="N"/>
-                <when value="C"/>
+                <when value="N" />
+                <when value="C" />
                 <when value="P">
-                    <param argument="--tAccFile" format="txt" type="data" label="The file to be parsed" help="... for accessibility computation" />
+                    <param argument="--qAccFile" format="txt" help="Unpaired probabilities for subsequences as computed and reported by RNAplfold or IntaRNA" label="RNAplfold unpaired probability data" type="data" />
                 </when>
                 <when value="E">
-                    <param argument="--tAccFile" format="txt" type="data" label="Accessibility computation" help="" />
+                    <param argument="--qAccFile" format="txt" help="Accessibility energy penalty terms (ED) for subsequences as computed and reported by IntaRNA" label="IntaRNA accessibility energy penalties (ED terms)" type="data" />
                 </when>
             </conditional>
-            <param argument="--tAccW" type="integer" value="150" min="0" max="99999"
-                label="Max. interaction length" help="... for query accessibility computation. Set to 0 to use full sequence length"/>
-            <param argument="--tAccL" type="integer" value="100" min="0" max="99999"
-                label="Max. loop length" help="... for query accessibility computation. 0 defaults to sliding window size 'tAccW'"/>
+            <param argument="--qAccW" help="... for query accessibility computation. Set to 0 to use full sequence length" label="Max. interaction length" max="99999" min="0" type="integer" value="150" />
+            <param argument="--qAccL" help="... for query accessibility computation. 0 defaults to sliding window size 'qAccW'" label="Max. loop length" max="99999" min="0" type="integer" value="100" />
+        </macro>
+        <macro name="target_macro">
+            <param argument="--target" format="fasta" help="Sequences have to use IUPAC nucleotide encoding. File must be in FASTA format" label="Target sequence(s)" name="target" type="data" />
+            <conditional name="tAcc_cond">
+                <param argument="--tAcc" help="" label="Accessibility computation" type="select">
+                    <option value="N">No accessibility contributions ('N')</option>
+                    <option selected="true" value="C">Computation of accessibilities ('C')</option>
+                    <option value="P">Unpaired probabilities in RNAplfold format from --qAccFile</option>
+                    <option value="E">ED values in RNAplfold Pu-like format from --qAccFile</option>
+                </param>
+                <when value="N" />
+                <when value="C" />
+                <when value="P">
+                    <param argument="--tAccFile" format="txt" help="Unpaired probabilities for subsequences as computed and reported by RNAplfold or IntaRNA" label="RNAplfold unpaired probability data" type="data" />
+                </when>
+                <when value="E">
+                    <param argument="--tAccFile" format="txt" help="Accessibility energy penalty terms (ED) for subsequences as computed and reported by IntaRNA" label="IntaRNA accessibility energy penalties (ED terms)" type="data" />
+                </when>
+            </conditional>
+            <param argument="--tAccW" help="... for target accessibility computation. Set to 0 to use full sequence length" label="Max. interaction length" max="99999" min="0" type="integer" value="150" />
+            <param argument="--tAccL" help="... for target accessibility computation. 0 defaults to sliding window size 'tAccW'" label="Max. loop length" max="99999" min="0" type="integer" value="100" />
         </macro>
         <macro name="seed_macro">
-            <param argument="--noSeed" truevalue="--noSeed" falsevalue="" checked="false" type="boolean"
-                label="Disable seed constraint entirely for computation" help=""/>
-            <param argument="--seedBP" type="integer" value="7" min="2" max="20"  label="Min. number of basepairs in seed" help="number of inter-molecular base pairs within the seed region"/>
-            <param argument="--seedMaxUP" type="integer" value="0" min="0" max="20"
-                label="Max. overall number of unpaired bases (query+target)" help=""/>
+            <param argument="--noSeed" checked="false" falsevalue="" help="" label="Disable seed constraint entirely for computation" truevalue="--noSeed" type="boolean" />
+            <param argument="--seedBP" help="number of inter-molecular base pairs within the seed region" label="Min. number of basepairs in seed" max="20" min="2" type="integer" value="7" />
+            <param argument="--seedMaxUP" help="Maximal number of unpaired seed bases both in query and target" label="Max. overall number of unpaired bases in seed" max="10" min="0" type="integer" value="0" />
         </macro>
         <macro name="interaction_macro">
-            <param argument="--mode" type="select" label="Prediction mode" help="">
-                <option value="H" selected="true">Heuristic (fast and low memory)</option>
-                <option value="M">Exact and low memory</option>
-                <option value="E">Exact (high memory)</option>
+            <param argument="--mode" help="" label="Prediction mode" type="select">
+                <option selected="true" value="H">Heuristic ('H')</option>
+                <option value="M">Exact but slow ('M')</option>
             </param>
         </macro>
         <macro name="output_macro">
-            <param argument="--outMode" type="select" label="Output Mode" help="">
-                <option value="N">Normal output (ASCII char + energy)</option>
-                <option value="D">Detailed output (ASCII char + energy/position details)</option>
-                <option value="C" selected="true">CSV output (see --outCsvCols)</option>
-                <option value="1">backward compatible IntaRNA v1.* normal output</option>
-                <option value="O">backward compatible IntaRNA v1.* detailed output</option>
-            </param>
-
-
-            <param argument="--outCsvCols" type="text" optional="true"
-                    label="Comma separated list of CSV column IDs to print" help="An empty argument prints all possible columns from the following available ID list: [id1], [id2], [seq1], [seq2], [subseq1], [subseq2], [subseqDP], [subseqDB], [start1], [end1], [start2], [end2], [hybridDP], [hybridDB], [E], [ED1], [ED2], [Pu1], [Pu2], [E_init], [E_loops], [E_dangleL], [E_dangleR], [E_endL], [E_endR], [seedStart1], [seedEnd1], [seedStart2], [seedEnd2], [seedE], [seedED1], [seedED2], [seedPu1], [seedPu2]"/>
-            <param argument="--outNumber" type="integer" value="1" min="0" max="1000"
-                label="Max. number of predictions per query/target pair" help="Number of optimal and suboptimal interaction to predict per query-target pair"/>
-            <param argument="--outOverlap" type="select" label="Overlapping of suboptimal predictions" help="Whether or not interactions can overlap">
-                <option value="N" >in none of the sequences</option>
+            <param argument="--outCsvCols" help="An empty argument prints all possible columns from the following available ID list:        [id1], [id2], [seq1], [seq2], [subseq1], [subseq2], [subseqDP], [subseqDB], [start1], [end1], [start2], [end2], [hybridDP], [hybridDB], [hybridDPfull], [hybridDBfull], [E], [ED1], [ED2], [Pu1], [Pu2], [E_init], [E_loops], [E_dangleL], [E_dangleR], [E_endL], [E_endR], [E_hybrid], [E_norm], [E_hybridNorm], [E_add], [seedStart1], [seedEnd1], [seedStart2], [seedEnd2], [seedE], [seedED1], [seedED2], [seedPu1], [seedPu2], [w], [Eall], [Zall], [P_E]" label="Comma separated list of CSV column IDs to print" type="text" value="id1,start1,end1,id2,start2,end2,subseqDP,hybridDP,E" />
+            <param argument="--outCsvSort" help="One of the column IDs to be printed that is used to sort the CSV table output" label="Sort CSV output for the given column label from CSV column IDs to print" type="text" value="E" />
+            <param argument="--outNumber" help="Number of optimal and suboptimal interaction to predict per query-target pair" label="Max. number of predictions per query/target pair" max="1000" min="0" type="integer" value="1" />
+            <param argument="--outOverlap" help="Whether or not interactions can overlap" label="Overlapping of suboptimal predictions" type="select">
+                <option value="N">in none of the sequences</option>
                 <option value="T">in the target only</option>
-                <option value="Q" selected="true">in the query only</option>
+                <option selected="true" value="Q">in the query only</option>
                 <option value="B">in both sequences</option>
             </param>
         </macro>
     </macros>
     <requirements>
-        <requirement type="package" version="2.2.0">intarna</requirement>
+        <requirement type="package" version="3.1.1">intarna</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>IntaRNA --version</version_command>
-    <command>
-    <![CDATA[
+    <command detect_errors="exit_code"><![CDATA[
+    
         IntaRNA
             #if $advancedOptions.advancedSelector == "advanced"
                 ## Query parameters
-                --query '$advancedOptions.query._query'
+                --query '$advancedOptions.query.query'
                 --qAcc $advancedOptions.query.qAcc_cond.qAcc
                 #if $advancedOptions.query.qAcc_cond.qAcc == "P" or $advancedOptions.query.qAcc_cond.qAcc == "E"
                     --qAccFile '$advancedOptions.query.qAcc_cond.qAccFile'
                 #end if
                 --qAccW $advancedOptions.query.qAccW
                 --qAccL $advancedOptions.query.qAccL
-                ## #if $advancedOptions.query.qAccConstr <> "."
-                ##    --qAccConstr $advancedOptions.query.qAccConstr
-                ## #end if
                 --qIntLoopMax $advancedOptions.query.qIntLoopMax
                 #if $advancedOptions.query.qRegion
                     --qRegion '$advancedOptions.query.qRegion'
                 #end if
-
                 ## Target param.
-                --target '$advancedOptions.target._target'
+                --target '$advancedOptions.target.target'
                 --tAcc $advancedOptions.target.tAcc_cond.tAcc
                 #if $advancedOptions.target.tAcc_cond.tAcc == "P" or $advancedOptions.target.tAcc_cond.tAcc == "E"
                     --tAccFile '$advancedOptions.target.tAcc_cond.tAccFile'
                 #end if
                 --tAccW $advancedOptions.target.tAccW
                 --tAccL $advancedOptions.target.tAccL
-                ## #if $advancedOptions.target.tAccConstr <> "."
-                ##    --tAccConstr $advancedOptions.target.tAccConstr
-                ## #end if
                 --tIntLoopMax $advancedOptions.target.tIntLoopMax
                 #if $advancedOptions.target.tRegion
                     --tRegion '$advancedOptions.target.tRegion'
                 #end if
-
                 ## Seed param.
-                $advancedOptions.seed.noSeed
-                --seedBP $advancedOptions.seed.seedBP
-                --seedMaxUP $advancedOptions.seed.seedMaxUP
-                --seedQMaxUP $advancedOptions.seed.seedQMaxUP
-                --seedTMaxUP $advancedOptions.seed.seedTMaxUP
-                --seedMaxE $advancedOptions.seed.seedMaxE
-                --seedMinPu $advancedOptions.seed.seedMinPu
-                --seedQRange '$advancedOptions.seed.seedQRange'
-                --seedTRange '$advancedOptions.seed.seedTRange'
-
-                ## Interaction param.
+                #if $advancedOptions.seed.noSeed
+                    $advancedOptions.seed.noSeed
+                #else
+                    --seedBP $advancedOptions.seed.seedBP
+                    --seedMaxE $advancedOptions.seed.seedMaxE
+                    --seedMinPu $advancedOptions.seed.seedMinPu
+                    #if $advancedOptions.seed.seedMaxUP > 0
+                        --seedMaxUP $advancedOptions.seed.seedMaxUP
+                    #end if
+                    #if $advancedOptions.seed.seedQMaxUP
+                        --seedQMaxUP $advancedOptions.seed.seedQMaxUP
+                    #end if
+                    #if $advancedOptions.seed.seedTMaxUP
+                        --seedTMaxUP $advancedOptions.seed.seedTMaxUP
+                    #end if
+                    #if $advancedOptions.seed.seedQRange
+                        --seedQRange '$advancedOptions.seed.seedQRange'
+                    #end if
+                    #if $advancedOptions.seed.seedTRange
+                        --seedTRange '$advancedOptions.seed.seedTRange'
+                    #end if
+                #end if
+                ## SHAPE param.
+                #if $advancedOptions.shape.qShape
+                    --qShape '$advancedOptions.shape.qShape'
+                #end if
+                #if $advancedOptions.shape.tShape
+                    --tShape '$advancedOptions.shape.tShape'
+                #end if
+                ## Prediction param.
                 --mode $advancedOptions.interaction.mode
-                --pred $advancedOptions.interaction.pred
-                --energy $advancedOptions.interaction.energy
-                #if $advancedOptions.interaction.energyVRNA
-                    --energyVRNA '$advancedOptions.interaction.energyVRNA'
+                --model $advancedOptions.interaction.model
+                --energy V
+                --energyVRNA '$advancedOptions.interaction.energyVRNA'
+                --temperature $advancedOptions.interaction.temperature
+                #if $advancedOptions.interaction.windowWidth
+                    --windowWidth $advancedOptions.interaction.windowWidth
+                    --windowOverlap $advancedOptions.interaction.windowOverlap
                 #end if
-                --temperature $advancedOptions.interaction.temperature
-
+                
                 ##Output param.
-                --out ./temp_tabular_output
-                --outMode $advancedOptions.output.outMode
+                 ## create temporary output file to be converted to tab-separated output (see below)
+                --out STDOUT
+                --outMode C
+                --outCsvCols '$advancedOptions.output.outCsvCols'
+                --outCsvSort '$advancedOptions.output.outCsvSort'
                 --outNumber $advancedOptions.output.outNumber
                 --outOverlap $advancedOptions.output.outOverlap
                 --outMaxE $advancedOptions.output.outMaxE
                 --outDeltaE $advancedOptions.output.outDeltaE
-                #if $advancedOptions.output.outCsvCols
-                    --outCsvCols '$advancedOptions.output.outCsvCols'
-                #end if
+                ## add additional output files
                 #if $advancedOptions.output.add_output_cond.selector == "add"
-                    #if str($advancedOptions.output.add_output_cond.add_output.value) != 'None'
-                       #for j in $advancedOptions.output.add_output_cond.add_output.value:
-                           --$j $getVar($j)
-                       #end for
-                   #end if
+                  #if str($advancedOptions.output.add_output_cond.add_output.value) != 'None'
+                    #for $outFile in $advancedOptions.output.add_output_cond.add_output.value:
+                      #if $outFile == 'qAcc' or $outFile == 'tAcc'
+                        #set curOutFile = str($outFile) + ':intarna_' + str($outFile) + '.led'
+                      #else
+                      #if $outFile == 'qAcc' or $outFile == 'tAcc' or $outFile == 'qPu' or $outFile == 'tPu'
+                        #set curOutFile = str($outFile) + ':intarna_' + str($outFile) + '.lpu'
+                      #else
+                        #set curOutFile = str($outFile) + ':intarna_' + str($outFile) + '.tabular'
+                      #end if
+                      #end if
+                      --out '$curOutFile'
+                    #end for
+                  #end if
                 #end if
-
             #elif $advancedOptions.advancedSelector == "basic"
                 ## Query parameters
-                --query '$advancedOptions.query._query'
+                --query '$advancedOptions.query.query'
                 --qAcc $advancedOptions.query.qAcc_cond.qAcc
                 #if $advancedOptions.query.qAcc_cond.qAcc == "P" or $advancedOptions.query.qAcc_cond.qAcc == "E"
                     --qAccFile '$advancedOptions.query.qAcc_cond.qAccFile'
                 #end if
                 --qAccW $advancedOptions.query.qAccW
                 --qAccL $advancedOptions.query.qAccL
-
                 ## Target param.
-                --target '$advancedOptions.target._target'
+                --target '$advancedOptions.target.target'
                 --tAcc $advancedOptions.target.tAcc_cond.tAcc
                 #if $advancedOptions.target.tAcc_cond.tAcc == "P" or $advancedOptions.target.tAcc_cond.tAcc == "E"
                     --tAccFile '$advancedOptions.target.tAcc_cond.tAccFile'
                 #end if
                 --tAccW $advancedOptions.target.tAccW
                 --tAccL $advancedOptions.target.tAccL
-
                 ## Seed param.
-                $advancedOptions.seed.noSeed
-                --seedBP $advancedOptions.seed.seedBP
-                --seedMaxUP $advancedOptions.seed.seedMaxUP
-
-                ## Interaction param.
+                #if $advancedOptions.seed.noSeed
+                    $advancedOptions.seed.noSeed
+                #else
+                    --seedBP $advancedOptions.seed.seedBP
+                    --seedMaxUP $advancedOptions.seed.seedMaxUP
+                #end if
+                ## Prediction param.
                 --mode $advancedOptions.interaction.mode
-
-                ##Output param.
-                --out ./temp_tabular_output
-                --outMode $advancedOptions.output.outMode
+                ## Output param.
+                ## create temporary output file to be converted to tab-separated output (see below)
+                --out STDOUT
                 --outNumber $advancedOptions.output.outNumber
                 --outOverlap $advancedOptions.output.outOverlap
-                #if $advancedOptions.output.outCsvCols
-                    --outCsvCols '$advancedOptions.output.outCsvCols'
-                #end if
+                --outMode C
+                --outCsvCols '$advancedOptions.output.outCsvCols'
+                --outCsvSort '$advancedOptions.output.outCsvSort'
             #end if
-            && sed 's/\t/     /g' ./temp_tabular_output > ./temp_output_no_tabs
-            && sed 's/;/\t/g' ./temp_output_no_tabs > '$outfile'
-
-    ]]>
+            
+            ## Multithreading param.
+            --threads "\${GALAXY_SLOTS:-1}"
+            ## convert semicolon-separated output to tab-separated file
+            | sed 's/\t/    /g' | sed 's/;/\t/g' > '$outfile'
+            ## convert additional semicolon-separated output to tab-separated file
+            #if $advancedOptions.advancedSelector == "advanced"
+              #if $advancedOptions.output.add_output_cond.selector == "add"
+                #if str($advancedOptions.output.add_output_cond.add_output.value) != 'None'
+                  #for $outFile in $advancedOptions.output.add_output_cond.add_output.value:
+                    #if $outFile != 'qAcc' and $outFile != 'tAcc' and $outFile != 'qPu' and $outFile != 'tPu'
+                      #set curOutFile = 'intarna_' + str($outFile) + '*.tabular'
+                      && sed -i 's/\t/    /g' $curOutFile
+                      && sed -i 's/;/\t/g' $curOutFile
+                    #end if
+                  #end for
+                #end if
+              #end if
+            #end if
+]]>  
     </command>
     <inputs>
-
         <conditional name="advancedOptions">
-            <param name="advancedSelector" type="select" label="Options">
+            <param label="Options" name="advancedSelector" type="select">
                 <option value="basic">Basic Options</option>
                 <option value="advanced">Advanced Options</option>
             </param>
             <when value="advanced">
-                <section name="query" title="Query Parameters" expanded="True">
-                    <expand macro="query_macro"/>
-                    <!--
-                    <param name="qAccConstr" type="select" label="Structure constraint for each sequence position" help="">
-                        <option value="." selected="true">No constraint</option>
-                        <option value="x">Unpaired</option>
-                        <option value="b">Blocked positions are excluded from interaction prediction and considered unpaired </option>
-                    </param>
-                -->
-                    <param argument="--qIntLoopMax" type="integer" value="16" min="0" max="30"
-                        label="Maximal number of unpaired bases between neighbored interacting bases" help="... to be considered in interactions within the query"/>
-                    <param argument="--qRegion" type="text" optional="true" label="Query regions to be considered for interaction prediction"
-                        help="In the format 'from1-to1,from2-to2,..' assuming indexing starts with 1" />
+                <section expanded="True" name="query" title="Query Parameters">
+                    <expand macro="query_macro" />
+                    <param argument="--qIntLoopMax" help="... to be considered in interactions within the query" label="Maximal number of unpaired bases between neighbored interacting bases" max="30" min="0" type="integer" value="16" />
+                    <param argument="--qRegion" help="In the format 'from1-to1,from2-to2,..' assuming indexing starts with 1" label="Query regions to be considered for interaction prediction" optional="true" type="text" />
                 </section>
-                <section name="target" title="Target Parameters" expanded="True">
-                    <expand macro="target_macro"/>
-                    <!-- <param name="tAccConstr" type="select" label="Structure constraint for each sequence position" help="">
-                        <option value="." selected="true">No constraint</option>
-                        <option value="x">Unpaired</option>
-                        <option value="b">Blocked.blocked positions are excluded from interaction prediction and considered unpaired </option>
-                    </param>
-                -->
-
-                    <param argument="--tIntLoopMax" type="integer" value="16" min="0" max="30"
-                        label="Maximal number of unpaired bases between neighbored interacting bases" help="... to be considered in interactions within the target"/>
-                    <param argument="--tRegion" type="text" optional="true" label="Target regions to be considered for interaction prediction"
-                        help="In the format 'from1-to1,from2-to2,..' assuming indexing starts with 1" />
+                <section expanded="True" name="target" title="Target Parameters">
+                    <expand macro="target_macro" />
+                    <param argument="--tIntLoopMax" help="... to be considered in interactions within the target" label="Maximal number of unpaired bases between neighbored interacting bases" max="30" min="0" type="integer" value="16" />
+                    <param argument="--tRegion" help="In the format 'from1-to1,from2-to2,..' assuming indexing starts with 1" label="Target regions to be considered for interaction prediction" optional="true" type="text" />
                 </section>
                 <section name="seed" title="Seed Parameters">
-                    <expand macro="seed_macro"/>
-                    <param argument="--seedQMaxUP" type="integer" value="-1" min="-1" max="20"
-                        label="Max. number of unpaired bases within the query's seed region" help=""/>
-                    <param argument="--seedTMaxUP" type="integer" value="-1" min="-1" max="20"
-                        label="Max. number of unpaired bases within the target's seed region" help=""/>
-                    <param argument="--seedMaxE" type="integer" value="0" min="-999" max="999"
-                        label="Max. energy a seed region may have" help=""/>
-                    <param argument="--seedMinPu" type="float" value="0" min="0" max="1"
-                        label="Min. unpaired probability (per sequence)" help=""/>
-
-                    <param argument="--seedQRange" type="text" value=""
-                        label="Interval(s) in the query to search for seeds" help="in format 'from1-to1,from2-to2,...' (Note, only for single query)"/>
-                    <param argument="--seedTRange" type="text" value=""
-                        label="Interval(s) in the target to search for seeds" help="in format 'from1-to1,from2-to2,...' (Note, only for single query)"/>
+                    <expand macro="seed_macro" />
+                    <param argument="--seedQMaxUP" help="" label="Max. number of unpaired bases within the query's seed region" max="20" min="-1" type="integer" value="-1" />
+                    <param argument="--seedTMaxUP" help="" label="Max. number of unpaired bases within the target's seed region" max="20" min="-1" type="integer" value="-1" />
+                    <param argument="--seedMaxE" help="" label="Max. energy a seed region may have" max="999" min="-999" type="integer" value="0" />
+                    <param argument="--seedMinPu" help="" label="Min. unpaired probability (per sequence)" max="1" min="0" type="float" value="0" />
+                    <param argument="--seedQRange" help="in format 'from1-to1,from2-to2,...' (Note, only for single query)" label="Interval(s) in the query to search for seeds" optional="true" type="text" value="" />
+                    <param argument="--seedTRange" help="in format 'from1-to1,from2-to2,...' (Note, only for single query)" label="Interval(s) in the target to search for seeds" optional="true" type="text" value="" />
+                </section>
+                <section name="shape" title="SHAPE Input Parameters">
+                    <param argument="--qShape" format="txt" help="Two column text file with sequence positions (1-based) and normalized reactivity values. Missing values may be left out, or assigned a negative score" label="SHAPE reactivity data to guide the query's accessibility computation" optional="true" type="data" />
+                    <param argument="--tShape" format="txt" help="Two column text file with sequence positions (1-based) and normalized reactivity values. Missing values may be left out, or assigned a negative score" label="SHAPE reactivity data to guide the query's accessibility computation" optional="true" type="data" />
                 </section>
-                <section name="interaction" title="Interaction Parameters">
-                    <expand macro="interaction_macro"/>
-                    <param argument="--pred" type="select" label="Prediction target" help="Sets what to optimize for">
-                        <option value="S" selected="true">Single-site minimum-free-energy interaction</option>
-                        <option value="P">Single-site maximum-probability interaction</option>
+                <section name="interaction" title="Prediction Parameters">
+                    <expand macro="interaction_macro" />
+                    <param argument="--model" help="Sets what to optimize for" label="Prediction target" type="select">
+                        <option value="S">Single-site minimum-free-energy interaction (IntaRNA v1+2 mode)</option>
+                        <option selected="true" value="X">Single-site minimum-free-energy interaction (via seed-extension)</option>
+                        <option value="P">Single-site interaction with minimal free ensemble energy per site</option>
                     </param>
-                    <param argument="--energy" type="select" label="Energy computation" help="">
-                        <!-- <option value="B">Base pair == -1 ()</option> -->
-                        <option value="V" selected="true">VRNA-based computation</option>
+                    <param argument="--energyVRNA" help="" label="Energy parameter" type="select">
+                        <option value="Turner99">Turner-1999</option>
+                        <option selected="true" value="Turner04">Turner-2004</option>
+                        <option value="Andronescu07">Andronescu-2007</option>
                     </param>
-                    <param argument="--energyVRNA" type="data" format="txt" optional="true"
-                        label="Energy parameter file of VRNA package" help="If not provided, the default parameter set of the linked Vienna RNA package is used."/>
-                    <param argument="--temperature" type="integer" value="37" min="0" max="100"
-                        label="Temperature [°C]" help="VRNA energy parameters"/>
+                    <param argument="--temperature" help="Temperature scaling of ViennaRNA energy parameters" label="Temperature [Celsius]" max="100" min="0" type="integer" value="37" />
+                    <param argument="--windowWidth" help="If set, large sequences are decomposed in overlapping windows of the given size to reduce the memory consumption of IntaRNA." label="Window-based computation: window width" max="99999" min="10" optional="True" type="integer" />
+                    <param argument="--windowOverlap" help="If window width is set, this specifies the overlap of the windows. Note, it has to exceed the maximal interaction length of both query and target." label="Window-based computation: window overlap" max="99999" min="10" type="integer" value="150" />
                 </section>
                 <section name="output" title="Output Options">
-                    <expand macro="output_macro"/>
-                    <param argument="--outMaxE" type="float" value="0"
-                        label="Max. absolute energy of an interaction" help="Only interactions with E &#8804; maxE are reported"/>
-                    <param argument="--outDeltaE" type="float" value="100"
-                        label="Max. delta energy above mfe of an interaction" help="suboptimal output: only interactions with E &#8804; (minE+deltaE) are reported"/>
-
+                    <expand macro="output_macro" />
+                    <param argument="--outMaxE" help="Only interactions with E ≤ maxE are reported" label="Max. absolute energy of an interaction" type="float" value="0" />
+                    <param argument="--outDeltaE" help="suboptimal output: only interactions with E ≤ (minE+deltaE) are reported" label="Max. delta energy above mfe of an interaction" type="float" value="100" />
                     <conditional name="add_output_cond">
-                        <param name="selector" type="select" label="Additional output files">
+                        <param label="Additional output files" name="selector" type="select">
                             <option value="add">Output additional files</option>
-                            <option value="none" selected="true">Don't output additional files</option>
+                            <option selected="true" value="none">Don't output additional files</option>
                         </param>
                         <when value="add">
-                            <param name="add_output" type="select" display="checkboxes" multiple="True"
-                                label="Additional output files" help="Written in a format similar to RNAplfold unpaired probability output.">
-                                <option value="outQAccFile" selected="true">The query's ED values (--outQAccFile)</option>
-                                <option value="outTAccFile">The target's ED values (--outTAccFile) </option>
-                                <option value="outQPuFile">The query's unpaired probabilities used for ED values (--outQPuFile) </option>
-                                <option value="outTPuFile">The target's unpaired probabilities used for ED values (--outTPuFile)</option>
+                            <param display="checkboxes" help="Written in a format similar to RNAplfold unpaired probability output." label="Additional output files" multiple="True" name="add_output" type="select">
+                                <option value="spotProb">Spot probabilities of all index combinations (spotProb)</option>
+                                <option value="qSpotProb">Spot probabilities for all query indices (qSpotProb)</option>
+                                <option value="tSpotProb">Spot probabilities for all target indices (tSpotProb)</option>
+                                <option value="pMinE">For all index combinations: minimal energy of any interaction covering the index pair (pMinE)</option>
+                                <option value="qMinE">For all query indices: minimal energy of any interaction covering the position (qMinE)</option>
+                                <option value="tMinE">For all target indices: minimal energy of any interaction covering the position (tMinE)</option>
+                                <option value="qAcc">The query's ED values (qAcc)</option>
+                                <option value="tAcc">The target's ED values (tAcc) </option>
+                                <option value="qPu">The query's unpaired probabilities used for ED values (qPu) </option>
+                                <option value="tPu">The target's unpaired probabilities used for ED values (tPu)</option>
                             </param>
                         </when>
-                        <when value="none"/>
+                        <when value="none" />
                     </conditional>
-
                 </section>
             </when>
             <when value="basic">
-                <section name="query" title="Query Parameters" expanded="True">
-                    <expand macro="query_macro"/>
+                <section expanded="True" name="query" title="Query Parameters">
+                    <expand macro="query_macro" />
                 </section>
-                <section name="target" title="Target Parameters" expanded="True">
-                    <expand macro="target_macro"/>
+                <section expanded="True" name="target" title="Target Parameters">
+                    <expand macro="target_macro" />
                 </section>
                 <section name="seed" title="Seed Parameters">
-                    <expand macro="seed_macro"/>
+                    <expand macro="seed_macro" />
                 </section>
                 <section name="interaction" title="Interaction Parameters">
-                    <expand macro="interaction_macro"/>
+                    <expand macro="interaction_macro" />
                 </section>
                 <section name="output" title="Output Options">
-                    <expand macro="output_macro"/>
+                    <expand macro="output_macro" />
                 </section>
             </when>
         </conditional>
     </inputs>
     <outputs>
-        <data  name="outfile" format="txt" label="IntaRNA on ${on_string}">
-            <change_format>
-                <when input="advancedOptions.output.outMode" value="C" format="tabular" />
-            </change_format>
-        </data>
-        <data name="outQAccFile" format="txt" label="Query's ED values, on ${on_string}">
+        <data format="tabular" label="IntaRNA on ${on_string}" name="outfile" />
+        <collection label="Spot probability of all index combinations, on ${on_string}" name="spotProb_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'spotProb' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;spotProb.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="Spot probability for all query indices, on ${on_string}" name="qSpotProb_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'qSpotProb' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;qSpotProb.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="Spot probability for all target indices, on ${on_string}" name="tSpotProb_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'tSpotProb' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;tSpotProb.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="For all query indices: minimal energy of any interaction covering the position, on ${on_string}" name="qMinE_output" type="list">
             <filter>
                 ((
                 advancedOptions['advancedSelector'] == "advanced" and
                 advancedOptions['output']['add_output_cond']['selector'] == "add" and
-                'outQAccFile' in advancedOptions['output']['add_output_cond']['add_output']
+                'qMinE' in advancedOptions['output']['add_output_cond']['add_output']
                 ))
             </filter>
-        </data>
-        <data name="outTAccFile" format="txt" label="Target's ED values, on ${on_string}">
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;qMinE.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="For all target indices: minimal energy of any interaction covering the position, on ${on_string}" name="tMinE_output" type="list">
             <filter>
                 ((
                 advancedOptions['advancedSelector'] == "advanced" and
                 advancedOptions['output']['add_output_cond']['selector'] == "add" and
-                'outTAccFile' in advancedOptions['output']['add_output_cond']['add_output']
+                'tMinE' in advancedOptions['output']['add_output_cond']['add_output']
                 ))
             </filter>
-        </data>
-        <data name="outQPuFile" format="txt" label="Query's unpaired probabilities used for ED values, on ${on_string}">
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;tMinE.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="For all index combinations: minimal energy of any interaction covering the index pair, on ${on_string}" name="pMinE_output" type="list">
             <filter>
                 ((
                 advancedOptions['advancedSelector'] == "advanced" and
                 advancedOptions['output']['add_output_cond']['selector'] == "add" and
-                'outQPuFile' in advancedOptions['output']['add_output_cond']['add_output']
+                'pMinE' in advancedOptions['output']['add_output_cond']['add_output']
                 ))
             </filter>
-        </data>
-        <data name="outTPuFile" format="txt" label="Target's unpaired probabilities used for ED values, on ${on_string}">
+            <discover_datasets format="tabular" pattern="intarna_(?P&lt;designation&gt;pMinE.*)\.tabular" visible="true" />
+        </collection>
+        <collection label="Query local accessibility penalties (ED values), on ${on_string}" name="qAcc_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'qAcc' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="txt" pattern="intarna_(?P&lt;designation&gt;qAcc.*)\.led" visible="true" />
+        </collection>
+        <collection label="Target local accessibility penalties (ED values), on ${on_string}" name="tAcc_output" type="list">
             <filter>
                 ((
                 advancedOptions['advancedSelector'] == "advanced" and
                 advancedOptions['output']['add_output_cond']['selector'] == "add" and
-                'outTPuFile' in advancedOptions['output']['add_output_cond']['add_output']
+                'tAcc' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="txt" pattern="intarna_(?P&lt;designation&gt;tAcc.*)\.led" visible="true" />
+        </collection>
+        <collection label="Query local unpaired probabilities, on ${on_string}" name="qPu_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'qPu' in advancedOptions['output']['add_output_cond']['add_output']
                 ))
             </filter>
-        </data>
+            <discover_datasets format="txt" pattern="intarna_(?P&lt;designation&gt;qPu.*)\.lpu" visible="true" />
+        </collection>
+        <collection label="Target local unpaired probabilities, on ${on_string}" name="tPu_output" type="list">
+            <filter>
+                ((
+                advancedOptions['advancedSelector'] == "advanced" and
+                advancedOptions['output']['add_output_cond']['selector'] == "add" and
+                'tPu' in advancedOptions['output']['add_output_cond']['add_output']
+                ))
+            </filter>
+            <discover_datasets format="txt" pattern="intarna_(?P&lt;designation&gt;tPu.*)\.lpu" visible="true" />
+        </collection>
     </outputs>
     <tests>
         <test>
             <conditional name="advancedOptions">
-                <param name="advancedSelector" value="basic"/>
+                <param name="advancedSelector" value="basic" />
                 <section name="query">
-                    <param name="_query" value="intarna_query.fa" />
+                    <param name="query" value="intarna_query.fa" />
+                </section>
+                <section name="target">
+                    <param name="target" value="intarna_target.fa" />
+                </section>
+            </conditional>
+            <output file="intarna_result.tabular" name="outfile" />
+        </test>
+        <test>
+            <conditional name="advancedOptions">
+                <param name="advancedSelector" value="advanced" />
+                <section name="query">
+                    <param name="query" value="intarna_query.fa" />
                 </section>
                 <section name="target">
-                    <param name="_target" value="intarna_target.fa"/>
+                    <param name="target" value="intarna_target.fa" />
+                </section>
+                <section name="output">
+                    <conditional name="add_output_cond">
+                        <param name="selector" value="add" />
+                        <param name="add_output" value="spotProb,qMinE,tAcc,qPu" />
+                    </conditional>
                 </section>
             </conditional>
-            <output name="outfile" file="intarna_result.tabular"/>
+            <output file="intarna_result.tabular" name="outfile" />
+            <output_collection count="4" name="spotProb_output" type="list">
+            </output_collection>
+            <output_collection count="4" name="qMinE_output" type="list">
+            </output_collection>
+            <output_collection count="2" name="qPu_output" type="list">
+            </output_collection>
+            <output_collection count="2" name="tAcc_output" type="list">
+            </output_collection>
         </test>
     </tests>
-
-    <help>
-<![CDATA[
+    <help><![CDATA[
 
 **What it does**
-
 Efficient RNA-RNA interaction prediction incorporating accessibility and seeding of interaction sites
-
 During the last few years, several new small regulatory RNAs (sRNAs) have been discovered in bacteria. Most of them act as post-transcriptional regulators by base pairing to a target mRNA, causing translational repression or activation, or mRNA degradation. Numerous sRNAs have already been identified, but the number of experimentally verified targets is considerably lower. Consequently, computational target prediction is in great demand. Many existing target prediction programs neglect the accessibility of target sites and the existence of a seed, while other approaches are either specialized to certain types of RNAs or too slow for genome-wide searches.
-
 IntaRNA, developed by `Prof. Backofen's bioinformatics group at Freiburg University <http://www.bioinf.uni-freiburg.de/>`_, is a general and fast approach to the prediction of RNA-RNA interactions incorporating both the accessibility of interacting sites as well as the existence of a user-definable seed interaction. We successfully applied IntaRNA to the prediction of bacterial sRNA targets and determined the exact locations of the interactions with a higher accuracy than competing programs.
-
 .. class:: infomark
-
 Please refer to  `IntaRNA github repository <https://github.com/BackofenLab/IntaRNA>`_ for use cases and additional information.
-
-
 **Input**
-
-
-
 RNA sequences in *FASTA* format
-
-
 **Output**
-
 RNA-RNA interaction information in CSV format and additional information/files on demand
 
 ]]>
-
     </help>
-
     <citations>
         <citation type="doi">10.1093/nar/gkx279</citation>
         <citation type="doi">10.1093/nar/gku359</citation>
         <citation type="doi">10.1093/bioinformatics/btn544</citation>
     </citations>
-
 </tool>
--- a/test-data/intarna_result.tabular	Tue Apr 10 12:24:44 2018 -0400
+++ b/test-data/intarna_result.tabular	Mon Oct 07 06:18:13 2019 -0400
@@ -1,4 +1,4 @@
 id1	start1	end1	id2	start2	end2	subseqDP	hybridDP	E
-mRNA1	85	95	ncRNA1	21	32	GUGGUGAGGAG&CUCCUCACACAC	(((((((((((&)))))))).)))	-11.8783
-mRNA1	52	58	ncRNA2	28	34	UCAGUUA&UGACUGA	(((((((&)))))))	-3.08648
-mRNA2	86	97	ncRNA1	20	31	UGUGUGACGAGU&ACUCCUCACACA	(((((((.((((&)))).)))))))	-8.16744
+mRNA1	85	95	ncRNA1	21	32	GUGGUGAGGAG&CUCCUCACACAC	(((((((((((&)))))))).)))	-11.86
+mRNA2	86	97	ncRNA1	20	31	UGUGUGACGAGU&ACUCCUCACACA	(((((((.((((&)))).)))))))	-8.17
+mRNA1	52	58	ncRNA2	28	34	UCAGUUA&UGACUGA	(((((((&)))))))	-3.08