changeset 5:345c2a16b95f draft

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit 3846f6c5a15ba0586afbd5c901229e237a4e4f17"
author chemteam
date Fri, 08 May 2020 07:45:15 -0400
parents 5579659312e6
children c8d2c0162b6e
files energy.xml macros.xml test-data/md_0_1.tabular
diffstat 3 files changed, 35 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/energy.xml	Wed Apr 15 14:25:30 2020 -0400
+++ b/energy.xml	Fri May 08 07:45:15 2020 -0400
@@ -11,6 +11,11 @@
         ln -s '$edr_input' ./edr_input.edr &&
         echo #echo str($terms).replace(',', ' ')# | gmx energy -f ./edr_input.edr -o ./energy.xvg
         ## echo #echo ' '.join(str($terms).split(','))# | gmx energy -f ./edr_input.edr -o ./energy.xvg
+        #if $fmt == 'tabular':
+            &&
+            grep '@\|#' energy.xvg &&
+            grep -v '@\|#' energy.xvg | sed 's/[[:space:]]*//' | sed  's/  /\t/g' > energy.tabular
+        #end if
 
     ]]></command>
 
@@ -67,21 +72,36 @@
             <option value="48">Protein lambda values</option>
             <option value="49">Non-protein lambda values</option>
         </param>
-
+        <param argument="fmt" type='select' label="Output format" help="Format for output; either standard GROMACS XVG, or Galaxy tabular file.">
+            <option value="xvg">GROMACS XVG format</option>
+            <option value="tabular" selected="true">Galaxy tabular</option>
+        </param>
 
     <expand macro="log" />
 
     </inputs>
     <outputs>
-        <data name="output1" format="xvg" from_work_dir="energy.xvg"/>
+        <data name="output1" format="xvg" from_work_dir="energy.xvg">
+            <filter>fmt == 'xvg'</filter>
+        </data>
+        <data name="output2" format="tabular" from_work_dir="energy.tabular">
+            <filter>fmt == 'tabular'</filter>
+        </data>
         <expand macro="log_outputs" />
     </outputs>
     <tests>
         <test>
             <param name="edr_input" value="md_0_1.edr" />
             <param name="terms" value="10,12,13" />
+            <param name="fmt" value="xvg" />
             <output name="output1" file="md_0_1.xvg" ftype="xvg" lines_diff="12"/>
         </test>
+        <test>
+            <param name="edr_input" value="md_0_1.edr" />
+            <param name="terms" value="10,12,13" />
+            <param name="fmt" value="tabular" />
+            <output name="output1" file="md_0_1.tabular" ftype="tabular"/>
+        </test>
     </tests>
     <help><![CDATA[
 
@@ -107,7 +127,7 @@
 
 **Output**
 
-       - Tabular file containing selected terms and some header lines
+       - Tabular or XVG file containing selected terms and some header lines
 
     ]]></help>
 
--- a/macros.xml	Wed Apr 15 14:25:30 2020 -0400
+++ b/macros.xml	Fri May 08 07:45:15 2020 -0400
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@VERSION@">2019.1.4</token>
+    <token name="@VERSION@">2019.1.5</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="2019.1">gromacs</requirement>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/md_0_1.tabular	Fri May 08 07:45:15 2020 -0400
@@ -0,0 +1,11 @@
+0.000000	-593300.312500	-497358.281250	300.761719
+0.100000	-592522.125000	-497450.843750	298.032074
+0.200000	-593496.500000	-497942.718750	299.544647
+0.300000	-593921.062500	-497878.187500	301.077850
+0.400000	-593262.062500	-497926.406250	298.860870
+0.500000	-593674.437500	-498809.312500	297.385773
+0.600000	-594222.062500	-498825.562500	299.051605
+0.700000	-593496.625000	-498020.125000	299.302399
+0.800000	-593813.875000	-498131.031250	299.949219
+0.900000	-594351.437500	-498515.812500	300.428131
+1.000000	-595232.000000	-499672.000000	299.564087