Repository 'mea'
hg clone https://toolshed.g2.bx.psu.edu/repos/rnateam/mea

Changeset 0:399593f05b4d (2015-08-01)
Next changeset 1:9ebd60531aa6 (2017-11-20)
Commit message:
planemo upload commit 6f0b360c2f718f0d3bd436db0f89af3805d7c332-dirty
added:
mea.xml
test-data/test_compare.out
test-data/test_dp.ps
test-data/test_predict.out
test-data/test_reference.txt
test-data/test_structure.txt
tool_dependencies.xml
b
diff -r 000000000000 -r 399593f05b4d mea.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mea.xml Sat Aug 01 04:46:19 2015 -0400
[
@@ -0,0 +1,176 @@
+<tool id="mea" name="MEA" version="0.6.4.0">
+    <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 str($compare_mode.compare_selector) == 'compare':
+            --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="True"
+                       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 value" type="float"
+                            optional="False" value="0.012"
+                            help="Slope of base pair distance penalty. (--alpha)"/>
+                    <param name="beta" label="Beta value" type="float"
+                            optional="False" value="315"
+                            help="Turning point of base pair distance penalty. (--beta)" />
+                    <param name="gamma" label="Gamma value" type="float"
+                            optional="False" value="0.5"
+                            help="Base pair weight factor. (--gamma)" />
+                    <param name="delta" label="Delta value" type="float"
+                            optional="False" value="0.003"
+                            help="Minimum penalty factor for base pairs. (--delta)" />
+                    </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. (--structure)" />
+            </when>
+        </conditional>
+        <conditional name="compare_mode">
+            <param name="compare_selector" type="select" label="Compare to a reference structure"
+                help="Whether to compare the predicted (or specified) structure to a reference structure.">
+                <option value="dont_compare">Do not compare</option>
+                <option value="compare">Compare to reference structure</option>
+            </param>
+            <when value="dont_compare" />
+            <when value="compare">
+                <param name="reference"
+                       optional="false"
+                       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="True" falsevalue="--no-slide-rule" truevalue="" help="Use slide rule. (--no-slide-rule)" />
+                <param name="conflict_rule" label="Conflict Rule" type="boolean"
+                       optional="False" checked="True" falsevalue="--no-conflict-rule" truevalue="" help="Use onflict rule. (--no-conflict-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="compare" />
+            <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="compare" />
+            <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 <http://www.bioinf.uni-leipzig.de/Software/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'http://www.bioinf.uni-leipzig.de/Software/mea/
+
+* 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.
+
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1007/978-3-319-02624-4_1</citation>
+    </citations>
+</tool>
b
diff -r 000000000000 -r 399593f05b4d test-data/test_compare.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_compare.out Sat Aug 01 04:46:19 2015 -0400
b
@@ -0,0 +1,1 @@
+22 0 6 4067 0.785714 1 0.88 0.885752
b
diff -r 000000000000 -r 399593f05b4d test-data/test_dp.ps
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_dp.ps Sat Aug 01 04:46:19 2015 -0400
[
b'@@ -0,0 +1,854 @@\n+%!PS-Adobe-3.0 EPSF-3.0\n+%%Title: RNA Dot Plot\n+%%Creator: PS_dot.c,v 1.38 2007/02/02 15:18:13 ivo Exp $, ViennaRNA-2.1.8\n+%%CreationDate: Tue Jun 30 15:53:02 2015\n+%%BoundingBox: 66 211 518 662\n+%%DocumentFonts: Helvetica\n+%%Pages: 1\n+%%EndComments\n+\n+%Options: -d2 \n+% \n+%This file contains the square roots of the base pair probabilities in the form\n+% i  j  sqrt(p(i,j)) ubox\n+\n+%%BeginProlog\n+/DPdict 100 dict def\n+DPdict begin\n+/logscale false def\n+/lpmin 1e-05 log def\n+\n+/box { %size x y box - draws box centered on x,y\n+   2 index 0.5 mul sub            % x -= 0.5\n+   exch 2 index 0.5 mul sub exch  % y -= 0.5\n+   3 -1 roll dup rectfill\n+} bind def\n+\n+/ubox {\n+   logscale {\n+      log dup add lpmin div 1 exch sub dup 0 lt { pop 0 } if\n+   } if\n+   3 1 roll\n+   exch len exch sub 1 add box\n+} bind def\n+\n+/lbox {\n+   3 1 roll\n+   len exch sub 1 add box\n+} bind def\n+\n+/drawseq {\n+% print sequence along all 4 sides\n+[ [0.7 -0.3 0 ]\n+  [0.7 0.7 len add 0]\n+  [-0.3 len sub -0.4 -90]\n+  [-0.3 len sub 0.7 len add -90]\n+] {\n+   gsave\n+    aload pop rotate translate\n+    0 1 len 1 sub {\n+     dup 0 moveto\n+     sequence exch 1 getinterval\n+     show\n+    } for\n+   grestore\n+  } forall\n+} bind def\n+\n+/drawgrid{\n+  0.01 setlinewidth\n+  len log 0.9 sub cvi 10 exch exp  % grid spacing\n+  dup 1 gt {\n+     dup dup 20 div dup 2 array astore exch 40 div setdash\n+  } { [0.3 0.7] 0.1 setdash } ifelse\n+  0 exch len {\n+     dup dup\n+     0 moveto\n+     len lineto \n+     dup\n+     len exch sub 0 exch moveto\n+     len exch len exch sub lineto\n+     stroke\n+  } for\n+  [] 0 setdash\n+  0.04 setlinewidth \n+  currentdict /cutpoint known {\n+    cutpoint 1 sub\n+    dup dup -1 moveto len 1 add lineto\n+    len exch sub dup\n+    -1 exch moveto len 1 add exch lineto\n+    stroke\n+  } if\n+  0.5 neg dup translate\n+} bind def\n+\n+end\n+%%EndProlog\n+DPdict begin\n+%delete next line to get rid of title\n+270 665 moveto /Helvetica findfont 14 scalefont setfont (dot.ps) show\n+\n+/sequence { (\\\n+ACGUAGCGGCGAUCGUAGCUAGCGCGCGAGUCGAUCGGCGCGGAUGCAUGCGGCGCGAGCGGUAGCGCGUAGGAGAUAUUAGCGGCGCGAUGCG\\\n+) } def\n+/len { sequence length } bind def\n+\n+72 216 translate\n+72 6 mul len 1 add div dup scale\n+/Helvetica findfont 0.95 scalefont setfont\n+\n+drawseq\n+0.5 dup translate\n+% draw diagonal\n+0.04 setlinewidth\n+0 len moveto len 0 lineto stroke \n+\n+/min { 2 copy gt { exch } if pop } bind def\n+\n+/utri{ % i j prob utri\n+  gsave\n+  1 min 2 div\n+  0.85 mul 0.15 add 0.95  0.33\n+  3 1 roll % prepare hsb color\n+  sethsbcolor\n+  % now produce the coordinates for lines\n+  exch 1 sub dup len exch sub dup 4 -1 roll dup 3 1 roll dup len exch sub\n+  moveto lineto lineto closepath fill\n+  grestore\n+} bind def\n+\n+%data starts here\n+\n+%start of quadruplex data\n+\n+%draw the grid\n+drawgrid\n+\n+%start of base pair probability data\n+1 45 0.037521086 ubox\n+1 63 0.014295566 ubox\n+1 91 0.020645728 ubox\n+2 6 0.004367449 ubox\n+2 8 0.021705446 ubox\n+2 11 0.013667321 ubox\n+2 15 0.003271257 ubox\n+2 22 0.035590809 ubox\n+2 24 0.012104068 ubox\n+2 26 0.004697631 ubox\n+2 40 0.008961167 ubox\n+2 42 0.099828325 ubox\n+2 43 0.149022299 ubox\n+2 46 0.130891127 ubox\n+2 52 0.005379135 ubox\n+2 57 0.039834753 ubox\n+2 59 0.013489281 ubox\n+2 61 0.240340024 ubox\n+2 62 0.014748017 ubox\n+2 65 0.012986509 ubox\n+2 87 0.018454189 ubox\n+2 89 0.198685971 ubox\n+2 92 0.258042883 ubox\n+2 94 0.239140657 ubox\n+3 7 0.020435524 ubox\n+3 10 0.013735849 ubox\n+3 14 0.003249549 ubox\n+3 19 0.012487128 ubox\n+3 23 0.012668579 ubox\n+3 25 0.004730655 ubox\n+3 39 0.008994103 ubox\n+3 41 0.076982114 ubox\n+3 45 0.190948035 ubox\n+3 47 0.015810575 ubox\n+3 51 0.005415168 ubox\n+3 56 0.039802053 ubox\n+3 60 0.241563115 ubox\n+3 63 0.003875608 ubox\n+3 86 0.018481981 ubox\n+3 88 0.199541373 ubox\n+3 91 0.257491606 ubox\n+3 93 0.249218165 ubox\n+4 9 0.013378812 ubox\n+4 18 0.012395370 ubox\n+4 21 0.107585739 ubox\n+4 22 0.009274398 ubox\n+4 24 0.004418681 ubox\n+4 38 0.008727279 ubox\n+4 40 0.070572076 ubox\n+4 42 0.061372098 ubox\n+4 43 0.104490298 ubox\n+4 44 0.200010'..b'6 87 0.024772209 ubox\n+56 92 0.008626194 ubox\n+57 66 0.025306963 ubox\n+57 68 0.065891741 ubox\n+57 70 0.230571481 ubox\n+57 77 0.005164467 ubox\n+57 79 0.009166416 ubox\n+57 80 0.102921631 ubox\n+57 83 0.004543159 ubox\n+57 86 0.024594341 ubox\n+57 91 0.008356748 ubox\n+58 63 0.006090708 ubox\n+58 70 0.026598818 ubox\n+58 77 0.008004488 ubox\n+58 79 0.113644146 ubox\n+58 80 0.112782577 ubox\n+59 66 0.128669116 ubox\n+59 68 0.801896747 ubox\n+59 70 0.124445033 ubox\n+59 77 0.004642866 ubox\n+59 79 0.081824095 ubox\n+59 80 0.018016421 ubox\n+59 83 0.041658916 ubox\n+59 88 0.010840428 ubox\n+59 93 0.091998057 ubox\n+60 65 0.129083699 ubox\n+60 67 0.802618719 ubox\n+60 69 0.128700330 ubox\n+60 72 0.004269792 ubox\n+60 73 0.004251557 ubox\n+60 75 0.013383322 ubox\n+60 82 0.041685356 ubox\n+60 84 0.012512459 ubox\n+60 87 0.010967331 ubox\n+60 92 0.092308158 ubox\n+60 94 0.010509920 ubox\n+61 66 0.799006510 ubox\n+61 68 0.128296443 ubox\n+61 77 0.027527913 ubox\n+61 79 0.012802671 ubox\n+61 80 0.058425842 ubox\n+61 83 0.012517462 ubox\n+61 86 0.010550821 ubox\n+61 91 0.089635301 ubox\n+61 93 0.016515255 ubox\n+62 66 0.016092620 ubox\n+62 68 0.008939286 ubox\n+62 77 0.184365063 ubox\n+62 79 0.098074869 ubox\n+62 80 0.003783512 ubox\n+62 86 0.004120089 ubox\n+62 88 0.013646910 ubox\n+62 91 0.024352420 ubox\n+62 93 0.278387764 ubox\n+63 67 0.009731503 ubox\n+63 71 0.010836445 ubox\n+63 72 0.004005127 ubox\n+63 74 0.009262094 ubox\n+63 75 0.044289773 ubox\n+63 76 0.186008241 ubox\n+63 78 0.100799889 ubox\n+63 81 0.012702778 ubox\n+63 84 0.006377925 ubox\n+63 85 0.004693129 ubox\n+63 87 0.013530602 ubox\n+63 89 0.007178144 ubox\n+63 90 0.027351004 ubox\n+63 92 0.278426675 ubox\n+64 70 0.010922997 ubox\n+64 77 0.093995775 ubox\n+64 79 0.003756619 ubox\n+64 80 0.012545301 ubox\n+64 91 0.232970816 ubox\n+65 77 0.003856379 ubox\n+65 79 0.010283574 ubox\n+65 83 0.010452049 ubox\n+65 86 0.010405874 ubox\n+65 88 0.119955935 ubox\n+65 91 0.007155932 ubox\n+65 93 0.007298737 ubox\n+66 72 0.083401356 ubox\n+66 73 0.190878754 ubox\n+66 75 0.083919306 ubox\n+66 82 0.010468713 ubox\n+66 84 0.019553940 ubox\n+66 85 0.009603068 ubox\n+66 87 0.120137686 ubox\n+66 89 0.276151499 ubox\n+66 92 0.006803754 ubox\n+67 77 0.006659374 ubox\n+67 83 0.021320354 ubox\n+67 86 0.120043445 ubox\n+67 88 0.278633972 ubox\n+68 72 0.021773601 ubox\n+68 73 0.093874610 ubox\n+68 75 0.035898725 ubox\n+68 82 0.021525030 ubox\n+68 84 0.067109636 ubox\n+68 85 0.100654537 ubox\n+68 87 0.278647007 ubox\n+69 77 0.035753327 ubox\n+69 79 0.188994541 ubox\n+69 80 0.012025776 ubox\n+69 83 0.094055814 ubox\n+69 86 0.278570056 ubox\n+70 74 0.010727916 ubox\n+70 75 0.011552397 ubox\n+70 76 0.037676632 ubox\n+70 78 0.201236372 ubox\n+70 81 0.175792959 ubox\n+70 82 0.087904386 ubox\n+70 84 0.008008457 ubox\n+70 85 0.269224462 ubox\n+71 77 0.200786870 ubox\n+71 79 0.023407691 ubox\n+71 80 0.183844324 ubox\n+72 77 0.018375803 ubox\n+72 79 0.175344507 ubox\n+72 80 0.026989439 ubox\n+72 83 0.217675516 ubox\n+73 77 0.009943918 ubox\n+73 79 0.023475545 ubox\n+73 80 0.162325910 ubox\n+73 83 0.065050489 ubox\n+74 79 0.163619801 ubox\n+74 80 0.054426892 ubox\n+75 79 0.039481991 ubox\n+75 80 0.096270277 ubox\n+75 83 0.011150614 ubox\n+76 80 0.038209845 ubox\n+77 81 0.012538807 ubox\n+77 82 0.007217726 ubox\n+77 84 0.003386513 ubox\n+82 93 0.005527246 ubox\n+83 92 0.005542929 ubox\n+84 91 0.005065037 ubox\n+85 93 0.007029342 ubox\n+86 92 0.007053740 ubox\n+86 94 0.005293461 ubox\n+87 91 0.004357089 ubox\n+87 93 0.011645051 ubox\n+88 92 0.011626182 ubox\n+89 93 0.003620304 ubox\n+6 41 0.9500000 lbox\n+7 40 0.9500000 lbox\n+8 39 0.9500000 lbox\n+10 37 0.9500000 lbox\n+11 36 0.9500000 lbox\n+12 35 0.9500000 lbox\n+13 34 0.9500000 lbox\n+14 33 0.9500000 lbox\n+15 32 0.9500000 lbox\n+18 27 0.9500000 lbox\n+19 26 0.9500000 lbox\n+45 94 0.9500000 lbox\n+46 93 0.9500000 lbox\n+47 92 0.9500000 lbox\n+48 91 0.9500000 lbox\n+49 90 0.9500000 lbox\n+50 88 0.9500000 lbox\n+51 87 0.9500000 lbox\n+52 86 0.9500000 lbox\n+54 84 0.9500000 lbox\n+55 83 0.9500000 lbox\n+56 82 0.9500000 lbox\n+59 68 0.9500000 lbox\n+60 67 0.9500000 lbox\n+61 66 0.9500000 lbox\n+showpage\n+end\n+%%EOF\n'
b
diff -r 000000000000 -r 399593f05b4d test-data/test_predict.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_predict.out Sat Aug 01 04:46:19 2015 -0400
b
@@ -0,0 +1,3 @@
+ACGUAGCGGCGAUCGUAGCUAGCGCGCGAGUCGAUCGGCGCGGAUGCAUGCGGCGCGAGCGGUAGCGCGUAGGAGAUAUUAGCGGCGCGAUGCG
+.....(((.((((((..((......))....)))))).)))....(((.(((.(((..(((....))).............))).)))..))). (53.4375)
+23 0 2 4070 0.92 1 0.958333 0.958931
b
diff -r 000000000000 -r 399593f05b4d test-data/test_reference.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_reference.txt Sat Aug 01 04:46:19 2015 -0400
b
@@ -0,0 +1,1 @@
+.....(((.((((((..((......))....)))))).)))...((((((((.(((..(((....))).............))).))).)))))
b
diff -r 000000000000 -r 399593f05b4d test-data/test_structure.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_structure.txt Sat Aug 01 04:46:19 2015 -0400
b
@@ -0,0 +1,2 @@
+.....(((.((((((..((......))....)))))).)))......(((((.(((.....(((....))).........).)).))).))...
+
b
diff -r 000000000000 -r 399593f05b4d tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Sat Aug 01 04:46:19 2015 -0400
b
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="gengetopt" version="2.22.6">
+        <repository changeset_revision="6071205c5cd3" name="package_gengetopt_2_22_6" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="mea" version="0.6.4">
+        <install version="1.0">
+            <actions>
+                <action type="download_by_url">
+                    http://www.bioinf.uni-leipzig.de/Software/mea/mea-0.6.4.tar.gz
+                </action>
+                <action type="set_environment_for_install">
+                    <repository changeset_revision="6071205c5cd3" name="package_gengetopt_2_22_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu">
+                        <package name="gengetopt" version="2.22.6" />
+                    </repository>
+                </action>
+                <action type="autoconf" />
+                <action type="set_environment">
+                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
+                    <environment_variable action="set_to" name="MEA_ROOT_PATH">$INSTALL_DIR</environment_variable>
+                </action>
+            </actions>
+        </install>
+        <readme>Compiling MEA requires a C++ compiler (usually g++)</readme>
+    </package>
+</tool_dependency>