view mea.xml @ 5:12a975bbf94c draft

planemo upload commit 9099c0a9ff5f7f3d9407e2ec3598957e02850d88-dirty
author rnateam
date Mon, 06 Jul 2015 05:33:34 -0400
parents 00e0ba24886a
children 44984b9450ca
line wrap: on
line source

<tool id="mea" name="MEA" version="0.6.4.1">
    <description>Predict MEA structures and compare structures of RNAs</description>
    
    <requirements>
	<requirement type="package" version="2.22.6" >gengetopt</requirement>
	<requirement type="package" version="0.6.4" >mea</requirement>
    </requirements>
    
    <stdio>
	<exit_code range=":-1"/>
	<exit_code range="1:" />
    </stdio>

    <version_command>mea --version</version_command>

    <command><![CDATA[
        mea
        #if str($predict_mode.predict_selector) == "predict"
            $predict_mode.dotplot
        	#if str($predict_mode.mea_parameters.mea_parameters_selector) == "no_default"
                --alpha $predict_mode.mea_parameters.alpha
        	    --beta $predict_mode.mea_parameters.beta
        	    --gamma $predict_mode.mea_parameters.gamma
        	    --delta $predict_mode.mea_parameters.delta
        	#end if
        #else
            --structure `cat $predict_mode.structure`
        #end if
	#if $compare_mode.compare_selector
            --reference `cat $compare_mode.reference`
            $compare_mode.slide_rule
            $compare_mode.conflict_rule
        #end if
        > $stdout
    ]]></command>
    
    <inputs>
	<conditional name="predict_mode">
	    <param name="predict_selector" type="select" label="Predict MEA structure">
		<option value="predict">Predict MEA structure</option>
		<option value="compare">Specify structure (for comparison)</option>
	    </param>
	    <when value="predict">
		<param name="dotplot" type="data" format="rna_eps" label="Dotplot"
		       optional="false" help="Dotplot file (RNA base pair probabilities)"/>
		<conditional name="mea_parameters">
		    <param name="mea_parameters_selector"
			   type="boolean"
			   label="Use default parameters"
			   truevalue="default"
			   falsevalue="no_default"
			   checked="yes"
			   help="The default parameters assign a base pair weight
				 of 0.5 and penalize long base pairs."
			   />
		    <when value="default" />
		    <when value="no_default">
			<param name="alpha" label="Alpha" type="float"
			       optional="false" value="0.012"
			       help="Slope of base pair distance penalty"/>
			<param name="beta" label="Beta" type="float"
			       optional="false" value="315"
			       help="Turning point of base pair distance penalty" />
			<param name="gamma" label="Gamma" type="float"
			       optional="false" value="0.5"
			       help="Base pair weight factor" />
			<param name="delta" label="Delta" type="float"
			       optional="false" value="0.003"
			       help="Minimum penalty factor for base pairs" />
		    </when>
		</conditional>
	    </when>
	    <when value="compare">
		<param name="structure" format="txt" type="data" label="Structure"
		       optional="false"
		       help="(Predicted) RNA secondary structure
			     for comparison to a reference structure." />
	    </when>
	</conditional>

	
	<conditional name="compare_mode">
	    <param name="compare_selector"
		   type="boolean"
		   label="Compare to a reference structure"
		   optional="false"
		   checked="false"
		   truevalue="compare"
		   falsevalue="dont_compare"
		   help="Whether to compare the predicted (or specified) structure
			 to a reference structure."
		   />
	    <when value="dont_compare" />
	    <when value="compare">
		<param name="reference"
		       optional="true"
		       format="txt" type="data"
		       label="Reference"
		       help="Reference structure in dot-bracket format"/>
		
		<param name="slide_rule" label="Slide Rule" type="boolean"
		       optional="false"
 		       checked="yes"
		       falsevalue="--no-slide-rule" truevalue=""
		       help="Use slide rule" />
		<param name="conflict_rule" label="Conflict Rule" type="boolean"
		       optional="false"
		       checked="yes"
		       falsevalue="--no-conflict-rule" truevalue=""
		       help="Use onflict rule"/>
	    </when>
	</conditional>
    </inputs>
    
    <outputs>
	<data format="txt" name="stdout" label="${tool.name} on ${on_string}" />
    </outputs>
    
    <tests>
	<test>
	    <param name="mea_parameter_selector" value="default" />

	    <param name="predict_selector" value="predict" />
	    <param name="compare_selector"  value="true" />

	    <param name="dotplot" value="test_dp.ps" />
	    <param name="reference" value="test_reference.txt" />
	    
	    <output name="stdout" file="test_predict.out" />
	</test>
	
	<test>
	    <param name="mea_parameter_selector" value="default" />
	    <param name="predict_selector" value="compare" />
	    <param name="compare_selector" value="true" />

	    <param name="structure" value="test_structure.txt" />
	    <param name="reference" value="test_reference.txt" />

	    <output name="stdout" file="test_compare.out" />
	</test>
    </tests>
    

    <help><![CDATA[
=====
MEA
=====

MEA predicts RNA maximum expected accuracy structures from RNA base
pair probabilities and optionally compares them to a reference
structure. In a special mode it skips the prediction and compares a
given structure to the reference.  For the prediction, MEA allows to
penalize long base pairs, using parameters alpha, beta, gamma, and
delta. For the comparison of secondary structures, several measures
are computed from the confusion matrix of the RNA base pairs.

------
Inputs
------

The tool accepts dot plot files as generated by RNAfold -p.

For (predicted) structure and reference, the tool accepts
dot-bracket structures with pseudoknots (supporting bracket pairs
(),{},[],<>,Aa,Bb,...)

-------
Outputs
-------

If predicting a structure, the tool outputs the sequence and the
predicted dot bracket strucuture with computed score in parenthesis
following the structure. This mimicks the output of the Vienna
tools.

The result of structure comparison is reported as a line of numbers

TP FP FN TN SENS PPV F1 MCC

where 

* TP   = # true positives

* FP   = # false positives

* FN   = # false negatives

* TN   = # true negatives

* SENS = TP/(TP+FN) 'Sensitivity'

* PPV  = TP/(TP+FP) 'Positive Predictive Value'

* F1   = PPV*SENS / (PPV+SENS), if PPV+SENS!=0; 0, otherwise   'F1-score'

* MCC  = (TP*TN - FP*FN) / sqrt( (TP+FP)*(TP+FN)*(TN+FP)*(TN+FN) ) 'Mathews correlation coefficient'


Special rules for prediction evaluation:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Slide rule: tolerate shift of one base pair end by one base. This
rule directly affects the number of true positives.  

* Conflict rule: predicted base pairs are false only if they
conflict with the reference; two base pair conflict if and only if
they share one end This rule directly affects the number of false
positives.

--------
Download
--------

The command line tool MEA is free software available for download and
local installation at
.. __: http://www.bioinf.uni-leipzig.de/Software/mea/
    ]]></help>
    <citations>
	<citation type="doi">10.1007/978-3-319-02624-4_1</citation>
    </citations>

</tool>