view rnaalifold.xml @ 0:c8fff1159bbb draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/vienna_rna commit 0065dafe7bbd382bb995b28cc4089c9e4f4eeeb9
author rnateam
date Tue, 06 Dec 2016 12:31:07 -0500
parents
children 10b56bba8dee
line wrap: on
line source

<tool id="viennarna_rnaalifold" name="@EXECUTABLE@" version="@VERSION@.0">
    <description>Calculate minimum free energy secondary structures and partition function on a multiple alignment file</description>
    <macros>
        <token name="@EXECUTABLE@">RNAalifold</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
<![CDATA[
        
        RNAalifold  < '$input' > '$tabularFile'
        -T$model_options.temperature -d$model_options.dangling
        $general_options.verbose
        $general_options.color
        $general_options.alignment
        #if $general_options.layout_type ==0
            --layout-type=$general_options.layout_type
        #end if
        $general_options.noPS
        #if str($IDs.id_prefix) <> "alignment"
            --id-prefix='$IDs.id_prefix'
        #end if
        $IDs.continuous_ids
        $IDs.auto_id
        #if $IDs.id_digits <> 4
            --id-digits=$IDs.id_digits
        #end if
        #if $IDs.id_start <> 1
            --id-start=$IDs.id_start
        #end if
        #if $constraints.maxBPspan <> -1
            --maxBPspan=$constraints.maxBPspan
        #end if
        #if str($constraints.constraintLocation.constraintSelector) == "fromFile"
            --constraint='$constraints.constraintLocation.constraintsFile'
            $constraints.constraintLocation.batch
            $constraints.ss_cons
        #end if        
        #if str($constraints.shapeOption.shapeSelector) == "isUsed"
            #if len($constraints.shapeOption.shape_files) > 0
                #set $sf=list()
                #for $i in $constraints.shapeOption.shape_files
                    $sf.append(str('$i.shape'))
                #end for
                --shape= #echo ','.join($sf)
                #if $constraints.shapeOption.m <> 1.8 or  $constraints.shapeOption.b <> -0.6
                    #set $s="Dm"+str($constraints.shapeOption.m)+"b"+str($constraints.shapeOption.b)
                    --shapeMethod=$s
                #end if		
            #end if
        #end if		
        #if $algorithm_options.pf <> "-1"
            --partfunc=$algorithm_options.pf
        #end if
        #if $algorithm_options.mea <> 1.0
            --mea=$algorithm_options.mea
        #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
        #end if
        $algorithm_options.gquad
        $algorithm_options.sci		
        $model_options.notetra
        $model_options.nolp
        $model_options.nogu
        $model_options.noclosinggu
        #if $model_options.cfactor <> 1.0
            --cfactor=$model_options.cfactor
        #end if
        #if $model_options.nfactor <> 1.0
            --nfactor=$model_options.nfactor
        #end if
        $model_options.endgaps
        $model_options.ribosum
        #if $model_options.nsp
            --nsp='$model_options.nsp'
        #end if
        #if $model_options.betaScale <> 1.0
            --betaScale=$model_options.betaScale
        #end if
        && tar -cf '$imagesFile' *.ps		
]]>
    </command>
    <inputs>
        <param format="txt" name="input" type="data" label="Clustal 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." argumen="--MEA"/>
            <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." argumen="--pfScale"/>						
            <param name="circular" type="boolean" truevalue="--circ" falsevalue="" checked="false" label="Assume circular RNA structure" help="--circ"/>
            <param name="bppmThreshold" type="float" value="1e-6" label="Threshold for base pair probabilities" help="By setting the threshold the base pair probabilities that are included in the output can be varied. By default only those exceeding 1e−5 in probability will be shown as squares in the dot plot. Changing the threshold to any other value allows for increase or decrease of data." argumen="--bppmThreshold"/>
            <param name="gquad" type="boolean" truevalue="--gquad" falsevalue="" checked="false" label="G Quadruplex formation" help="Take into account G Quadruplex formation (-g)"/>
            <param name="sci" type="boolean" truevalue="--sci" falsevalue="" checked="false" label="Structure conservation index" 
                help="Compute the structure conservation index (SCI) for the MFE consensus structure of the alignment" argument="--sci"/>
        </section>    
        <section name="general_options" title="General Options">
            <param name="verbose" type="boolean" truevalue="--v" falsevalue="" checked="false" label=" Be verbose" argument="--v"/>
            <param name="color" type="boolean" truevalue="--color" falsevalue="" checked="false" label="Colored secondary structure image" 
                help="Produce a colored version of the consensus strcture plot" argument="--color"/>
            <param name="alignment" type="boolean" truevalue="--aln" falsevalue="" checked="false" 
                label="Colored and annotated alignment image" 
                help="Produce a colored and structure annotated alignment" 
                argument="--aln"/>
            <param name="layout_type" type="select" label="Layout algorithm" argument="--layout-type">
                <option value="1" selected="true">Default: Naview layout</option>
                <option value="0">Simple radial layout</option>
            </param>
            <param name="noPS" type="boolean" truevalue="" falsevalue="--noPS" checked="true" label="Produce postscript output" help="" argument="--noPS"/>
        </section>
        <section name="IDs" title="Naming Conventions">		
                <param name="continuous_ids" 
                    type="boolean" truevalue="--continuous-ids" falsevalue="" checked="false" 
                    label="Continuous alignment ID numbering" 
                    help="Use continuous alignment ID numbering when no alignment ID can be retrieved from input data." 
                    argument="--continuous-ids"/>
                <param name="auto_id" 
                    type="boolean" truevalue="--auto-id" falsevalue="" checked="false" 
                    label="Automatically generate an ID for each alignment." 
                    help="If this flag is active, RNAalifold ignores any IDs retrieved from the input and automatically generates an ID for each alignment." 
                    argument="--auto-id"/>
                <param name="id_prefix" 
                    type="text" value="alignment" 
                    label="Prefix for automatically generated IDs (as used in output file names)" 
                    help="If this parameter is set, each alignment will be prefixed with the provided string. Hence, the output files will obey the following naming scheme: 'prefix_xxxx_ss.ps' (secondary structure plot), 'prefix_xxxx_dp.ps' (dot−plot), 'prefix_xxxx_aln.ps' (annotated alignment), etc. where xxxx is the alignment number beginning with the second alignment in the input. Use this setting in conjunction with the −−continuous−ids flag to assign IDs beginning with the first input alignment." 
                    argument="--id-prefix"/>
                <param name="id_digits" 
                    type="integer" value="4" min="1" max="18" 
                    label="The number of digits of the counter in automatically generated alignment IDs" 
                    help="When alignments IDs are automatically generated, they receive an increasing number, starting with 1. This number will always be left−padded by leading zeros, such that the number takes up a certain width. Using this parameter, the width can be specified to the users need. We allow numbers in the range [1:18]." 
                    argument="--id-digits"/>
                <param name="id_start" 
                    type="integer" value="1" min="0" 
                    label="First number in automatically generated alignment IDs" 
                    help="When alignment IDs are automatically generated, they receive an increasing number, usually starting with 1. Using this parameter, the first number can be specified to the users requirements. Note: negative numbers are not allowed. Note: Setting this parameter implies continuous alignment IDs, i.e. it activates the −−continuous−ids flag.." 
                    argument="--id-start"/>
        </section>
        <section name="constraints" title="Structure constraints">
                <param name="maxBPspan" type="integer" value="-1" label="Set the maximum base pair span" help="" argument="--maxBPspan"/>
                <conditional name="constraintLocation">
                    <param name="constraintSelector" type="select" label="Constraints" argument="--constraint">
                        <!--	<option value="fromInput">The constraints are included in the input file</option> -->
                        <option value="fromFile">The constraints are in a seperate file</option>
                        <option value="none" selected="true">Don't use constraints</option>
                    </param>
                <!--	<when value="fromInput"></when> -->
                    <when value="none"></when>
                    <when value="fromFile">
                        <param name="constraintsFile" type="data" format="*" label="Constraints file"/>
                        <param name="batch" type="boolean" checked="false" truevalue="--batch" falsevalue="" 
                            label="Use constraints for all alignment records" 
                            help="Usually, constraints provided from input file are only applied to a single sequence alignment. Therefore, RNAalifold will stop its computation and quit after the first input alignment was processed. Using this switch, RNAalifold processes all sequence alignments in the input and applies the same provided constraints to each of them." 
                            argument="--batch"/>
                        <param name="ss_cons" type="boolean" checked="false" truevalue="--SS_cons" falsevalue="" 
                            label="Use consensus structures from Stockholm file (#=GF SS_cons) as constraint" 
                            help="Stockholm formatted alignment files have the possibility to store a secondary structure string in one of if ('#=GC') column annotation meta tags. The corresponding tag name is usually 'SS_cons', a consensus secondary structure. Activating this flag allows one to use this consensus secondary structure from the input file as structure constraint. Note: Activating this flag implies −−constraint." 
                            argument="--SS_cons"/>	
                    </when>
                </conditional>
                <conditional name="shapeOption">
                        <param name="shapeSelector" type="select" label="Shape reactivity data">
                            <option value="isUsed">Use shape reactivity data</option>
                            <option value="notUsed" selected="true">Don't use shape reactivity data</option>
                        </param>
                        <when value ="isUsed">
                            <repeat name="shape_files" title="Shape File" default="0" argument="--shape">
                                <param type="data" name="shape" format="shape,*" label="Shape file"/>
                            </repeat>
                                <param name="m" type="float" value="1.8" label="Slope m" />
                                <param name="b" type="float" value="-0.6" label="Intercept b" help="Currently, the only data conversion method available is that of to Deigan et al 2009. This method is the default. The slope 'm' and the intercept 'b' can be set to a non−default value if necessary. Otherwise m=1.8 and b=−0.6 as stated in the paper mentioned before."/>
                        </when>
                        <when value="notUsed">
                        </when>
                </conditional>
        </section>
        <section name="model_options" title="Model Options" expanded="true">
            <param name="temperature" type="float" value="37.0" label="temperature [°C]" help="-T"/>
            <param name="dangling" type="select" label="How to treat dangling end energies" help="-d">
                <option value="0">0: ignore dangling ends</option>
                <option value="2" selected="True">2: unpaired bases participate in all dangling ends</option>
            </param>
            <param name="nolp" type="boolean" truevalue="" falsevalue="--noLP" checked="true" label="Allow lonely base-pairs" help="(--noLP)"/>
            <param name="nogu" type="boolean" truevalue="" falsevalue="--noGU" checked="true" label="Allow GU pairing" help="--noGU"/>
            <param name="noclosinggu" type="boolean" truevalue="" falsevalue="--noClosingGU" checked="true" label="Allow GU pairing at the ends" help="Allow pairing of G and U at the ends of helices. --noClosingGU"/>            
            <param name="notetra" type="boolean" truevalue="" falsevalue="--noTetra" checked="true" label="Allow stabilization for loops, hairpins etc." help=" Include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins. Mostly for testing. (--noTetra)"/>              
            <param name="cfactor" type="float" value="1.0" label="Weight of the covariance term" help="--cfactor"/>
            <param name="nfactor" type="float" value="1.0" label="Penalty for non-compatible sequences in the covariance term" help="--nfactor"/>
            <param name="endgaps" type="boolean" truevalue="--endgaps" falsevalue="" checked="false" label="Score pairs with endgaps same as gap-gap pairs" help="--endgaps"/>
            <param name="ribosum" type="boolean" truevalue="--ribosum_scoring" falsevalue="" checked="false" label="Use ribosum scoring matrix" help="--ribosum_scoring"/>
            <param name="nsp" type="text" value="" label="Allow other pairs in addition to the usual AU,GC,and GU pairs." help="Its argument is a comma separated list of additionally allowed pairs. If the first character is '-' then AB will imply that AB and BA are allowed pairs. e.g. RNAfold -nsp -GA  will allow GA and AG pairs. Nonstandard pairs are given 0 stacking energy."   argument="--nsp"/>
            <param name="betaScale" type="float" value="1.0" label="Scaling of Boltzman factors" 
                help=" The argument provided with this option enables to scale the thermodynamic temperature used in the Boltzmann factors independently from the temperature used to scale the individual energy contributions of the loop types." 
                argument="--betaScale"/>
        </section>
    </inputs>
    <outputs>
        <data format="txt" name="tabularFile"/>
        <data format="tar" name="imagesFile"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="rnaalifold_input1.clustal"/>
            <output name="output" file="rnaalifold_result1.txt"/>
        </test>
    </tests>
    <help>
<![CDATA[
**RNAalifold**

-----

**Input format**

RNAalifold requires one input file
- Clustal file

------

**Outputs**

- energy of the consensus structures in the clustal file
- several possible postscript images bundled together in a tar file


]]>
    </help>
    <expand macro="citations" />
</tool>