Repository 'gmx_trj'
hg clone https://toolshed.g2.bx.psu.edu/repos/chemteam/gmx_trj

Changeset 16:32052c6c3310 (2022-10-24)
Previous changeset 15:4a303225d447 (2022-07-12)
Commit message:
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tree/master/tools/gromacs commit 4bffc6aa89cd0e6d6435a6e571b3836eaab076f1
modified:
trj.xml
added:
test-data/trjconv_skip2.xtc
b
diff -r 4a303225d447 -r 32052c6c3310 test-data/trjconv_skip2.xtc
b
Binary file test-data/trjconv_skip2.xtc has changed
b
diff -r 4a303225d447 -r 32052c6c3310 trj.xml
--- a/trj.xml Tue Jul 12 12:45:39 2022 +0000
+++ b/trj.xml Mon Oct 24 22:36:40 2022 +0000
[
b'@@ -1,8 +1,8 @@\n-<tool id="gmx_trj" name="Modify/convert GROMACS trajectories" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">\n+<tool id="gmx_trj" name="Modify/convert and concatate GROMACS trajectories" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="21.09">\n     <description>using trjconv and trjcat</description>\n     <macros>\n         <import>macros.xml</import>\n-        <token name="@GALAXY_VERSION@">1</token>\n+        <token name="@GALAXY_VERSION@">2</token>\n         <xml name="fit_when" token_option="none">\n             <when value="@OPTION@">\n                 <param name="index_fit" type="text" label="Index of group to use for fitting" help="Index of group to use for fitting - i.e. the group\'s position in the ndx file (using zero-based numbering, so the first group has index 0).">\n@@ -11,18 +11,33 @@\n             </when>\n         </xml>\n     </macros>\n-\n-    <expand macro="requirements" />\n-\n+    <expand macro="requirements"/>\n     <command detect_errors="exit_code"><![CDATA[\n     #if $trj.trj_op == \'trjcat\':\n         mkdir trajs &&\n-        #for $value, $file in enumerate($trj_input):\n-            ln -s \'$file\' trajs/traj_${str(value).rjust(10, \'0\')}.${file.ext} &&\n+        #set $file_count = 0  ## sets 1st input to 0\n+        #set $file_list = []\n+        #for $file_count, $file in enumerate($trj_input):  ## enumerates each input file, starting from 0\n+            #set $filename = "trajs/traj_%i.%s" % ($file_count, $file.ext)\n+            #silent $file_list.append($filename)\n+            ln -s \'$file\' \'$filename\' &&\n+        #end for\n+        \n+        ## runs inputs from a repeat block. By choosing each input, this allows the user to select individual input files at a time, as well as ensure the proper order.\n+        #for $traj_repeat in $trj.inputtrajs:\n+            #for $file in $traj_repeat.trj_input:\n+                #set $file_count = $file_count + 1 ## inputs from this repeat block will be numbered at + 1 ahead of inputs from first multiple select above\n+                #set $filename = "trajs/traj_%i.%s" % ($file_count, $file.ext)\n+                #silent $file_list.append($filename)\n+                ln -s \'$file\' \'$filename\' &&\n+            #end for\n         #end for\n \n         gmx trjcat\n-            -f trajs/traj* ## here we assume that they all have the same ext, probably reasonable\n+            -f \n+            #for $filename in $file_list:\n+                \'$filename\'\n+            #end for\n             $trj.cat\n             -e \'$time.e\'\n \n@@ -58,18 +73,20 @@\n         #if $time.e != -1:\n             -e \'$time.e\'\n         #end if\n+        #if $trj.skip:\n+            -skip $trj.skip\n+        #end if\n     #end if\n \n     -b \'$time.b\'\n     -dt \'$time.dt\'\n-    -o ./output.${output_format} &&\n-    &>> verbose.txt\n+    -o ./output.${output_format} \n+    >> verbose.txt 2>&1\n     #if not $trj.sep:\n         &&\n         mv ./output.${output_format} \'$output\'\n     #end if\n     ]]></command>\n-\n     <inputs>\n         <conditional name="trj">\n             <param name="trj_op" type="select" label="Modify a trajectory or concatenate multiple trajectories?">\n@@ -77,9 +94,9 @@\n                 <option value="trjcat">Concatenate (trjcat)</option>\n             </param>\n             <when value="trjconv">\n-                <param name="trj_input" type="data" format=\'xtc,trr,pdb,gro\' label="Input trajectory" help="In XTC or TRR format; structure files with PDB or GRO format can also be used."/>\n-                <param name="str_input" type="data" format=\'pdb,gro,tpr\' label="Input structure" help="In PDB, GRO or TPR format."/>\n-                <param name="ndx_input" type="data" format=\'ndx\' label="Index (NDX) file" optional="true" help="In NDX format. Optional."/>\n+                <param name="trj_input" type="data" format="xtc,trr,pdb,gro" label="Input trajectory" help="In XTC or TRR format; structure files with PDB or GRO format can also be used."/>\n+                <param name="str_input" type="data" format="pdb,gr'..b' name="trj">\n+                <param name="trj_op" value="trjcat"/>\n+                <param name="trj_input" value="npt.xtc"/>\n+                <repeat name="inputtrajs">\n+                    <param name="trj_input" value="nvt.xtc"/>\n+                </repeat>\n+                <param name="cat" value="true"/>\n+            </conditional>\n+            <param name="output_format" value="xtc"/>\n+            <section name="time">\n+                <param name="b" value="0"/>\n+                <param name="e" value="-1"/>\n+                <param name="dt" value="0"/>\n+            </section>\n             <output name="output" file="trjcat.xtc" ftype="xtc"/>\n         </test>\n         <test>\n             <!-- echo \'1 1\' | gmx trjconv -f npt.xtc -s npt.tpr -n -center -pbc mol -ur compact -o npt_c.xtc -->\n             <!-- <param name="trj_op" value="trjconv" /> -->\n-            <param name="trj_input" value="npt.xtc" />\n+            <param name="trj_input" value="npt.xtc"/>\n             <param name="str_input" value="npt.tpr" ftype="tpr"/>\n-            <param name="ndx_input" value="index.ndx" />\n-            <param name="b" value="0" />\n-            <param name="e" value="-1" />\n-            <param name="dt" value="0" />\n-            <param name="index_output" value="1" />\n-            <param name="index_center" value="1" />\n-            <param name="pbc" value="mol" />\n-            <param name="ur" value="tric" />\n+            <param name="ndx_input" value="index.ndx"/>\n+            <param name="b" value="0"/>\n+            <param name="e" value="-1"/>\n+            <param name="dt" value="0"/>\n+            <param name="index_output" value="1"/>\n+            <param name="index_center" value="1"/>\n+            <param name="pbc" value="mol"/>\n+            <param name="ur" value="tric"/>\n             <output name="output" file="trjconv.xtc" ftype="xtc"/>\n         </test>\n         <test>\n-            <!-- test sep flag -->\n-            <param name="trj_input" value="npt.xtc" />\n+            <!-- testing skip -->\n+            <!-- echo \'1 1\' | gmx trjconv -f npt.xtc -s npt.tpr -n -center -pbc mol -ur compact -skip 2 -o npt_c.xtc -->\n+            <!-- <param name="trj_op" value="trjconv" /> -->\n+            <param name="trj_input" value="npt.xtc"/>\n             <param name="str_input" value="npt.tpr" ftype="tpr"/>\n-            <param name="ndx_input" value="index.ndx" />\n-            <param name="b" value="0" />\n-            <param name="e" value="-1" />\n-            <param name="dt" value="0" />\n-            <param name="index_output" value="0" />\n-            <param name="sep" value="sep" />\n-            <param name="output_format" value="pdb" />\n+            <param name="ndx_input" value="index.ndx"/>\n+            <param name="b" value="0"/>\n+            <param name="e" value="-1"/>\n+            <param name="dt" value="0"/>\n+            <param name="index_output" value="1"/>\n+            <param name="index_center" value="1"/>\n+            <param name="pbc" value="mol"/>\n+            <param name="ur" value="compact"/>\n+            <param name="skip" value="2"/>\n+            <output name="output" file="trjconv_skip2.xtc" ftype="xtc"/>\n+        </test>\n+        <test>\n+            <!-- test sep flag -->\n+            <param name="trj_input" value="npt.xtc"/>\n+            <param name="str_input" value="npt.tpr" ftype="tpr"/>\n+            <param name="ndx_input" value="index.ndx"/>\n+            <param name="b" value="0"/>\n+            <param name="e" value="-1"/>\n+            <param name="dt" value="0"/>\n+            <param name="index_output" value="0"/>\n+            <param name="sep" value="sep"/>\n+            <param name="output_format" value="pdb"/>\n             <output_collection name="pdb_frames" type="list">\n                 <element name="output000000007.pdb" ftype="pdb" file="frame7.pdb"/>\n             </output_collection>\n@@ -250,5 +307,5 @@\n \n \n     ]]></help>\n-    <expand macro="citations" />\n+    <expand macro="citations"/>\n </tool>\n'