Previous changeset 4:9363254ef848 (2020-05-20) Next changeset 6:6dcfdac2dcae (2020-11-23) |
Commit message:
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/gromacs commit 98e34b799346c6bbe5d28d4659d93d92cc7827cc" |
modified:
trj.xml |
b |
diff -r 9363254ef848 -r cdf93d057569 trj.xml --- a/trj.xml Wed May 20 12:58:22 2020 -0400 +++ b/trj.xml Tue Oct 20 10:38:49 2020 +0000 |
[ |
b'@@ -2,13 +2,19 @@\n <description>using trjconv and trjcat</description>\n <macros>\n <import>macros.xml</import>\n- <token name="@GALAXY_VERSION@">0</token>\n+ <token name="@GALAXY_VERSION@">1</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+ <validator type="regex" message="Only numeric values allowed">^[0-9]*$</validator>\n+ </param>\n+ </when>\n+ </xml>\n </macros>\n \n <expand macro="requirements" />\n \n <command detect_errors="exit_code"><![CDATA[\n-\n #if $trj.trj_op == \'trjcat\':\n mkdir trajs &&\n #for $value, $file in enumerate($trj_input):\n@@ -24,30 +30,44 @@\n ln -s \'$ndx_input\' ./index.ndx &&\n ln -s \'$str_input\' ./str.${str_input.ext} &&\n ln -s \'$trj_input\' ./traj.${trj_input.ext} &&\n- #if $trj.center:\n- echo \'$trj.index_center $trj.index_output\' | gmx trjconv\n- #else\n- echo \'$trj.index_output\' | gmx trjconv\n- #end if\n- -f ./traj.${trj_input.ext}\n- -s ./str.${str_input.ext}\n+\n+ echo ## optionally pipe in the following\n+\t#if $trj.fit.fit != \'none\':\n+\t \'$trj.fit.index_fit\'\n+ #end if\n+ #if $trj.pbc.pbc == \'cluster\':\n+\t \'$trj.pbc.index_cluster\'\n+ #end if\n+ \'$trj.index_center\'\t\'$trj.index_output\' | gmx trjconv\n+ \t-f ./traj.${trj_input.ext}\n+ -s ./str.${str_input.ext}\n+ #if $ndx_input:\n -n ./index.ndx\n- $trj.center\n- -pbc $trj.pbc\n- -ur $trj.ur\n- -boxcenter $trj.boxcenter\n- #if $time.e != -1:\n- -e \'$time.e\'\n- #end if\n-\n+ #end if\n+ #if $trj.index_center:\n+ -center\n+ #end if\n+ #if $trj.sep:\n+ -sep\n+ -nzero 9 ## hopefully the traj has < 1 bn frames, or collection order will be wrong\n+ #end if\n+ -pbc $trj.pbc.pbc\n+ -ur $trj.ur\n+ -boxcenter $trj.boxcenter\n+ -fit $trj.fit.fit\n+ #if $time.e != -1:\n+ -e \'$time.e\'\n+ #end if\n #end if\n \n -b \'$time.b\'\n -dt \'$time.dt\'\n -o ./output.${output_format} &&\n- &>> verbose.txt &&\n- mv ./output.${output_format} \'$output\'\n-\n+ &>> verbose.txt\n+ #if not $trj.sep:\n+ &&\n+ mv ./output.${output_format} \'$output\'\n+ #end if\n ]]></command>\n \n <inputs>\n@@ -57,27 +77,43 @@\n <option value="trjcat">Concatenate (trjcat)</option>\n </param>\n <when value="trjconv">\n- <param name="trj_input" type="data" format=\'xtc,trr\' label="Input trajectory" help="In XTC or TRR format."/>\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" help="In NDX format."/>\n- <param name="index_output" type="text" label="Index of group to save in the output" help="Index of group to save in the output - i.e. the group\'s position in the ndx file (using zero-based numbering, so the first group has index 0).">\n+ <param name="ndx_input" type="data" format=\'ndx\' label="Index (NDX) file" optional="true" help="In NDX format. Optional."/>\n+ <param name="index_output" value="0" type="text" label="Index of group to save in the output" help="Index of group to save in the output - i.e. the group\'s position in the ndx file (u'..b'macro="fit_when" option="rot+trans"/>\n+ <expand macro="fit_when" option="rotxy+transxy"/>\n+ <expand macro="fit_when" option="translation"/>\n+ <expand macro="fit_when" option="transxy"/>\n+ <expand macro="fit_when" option="progressive"/>\n+ </conditional>\n </when>\n <when value="trjcat">\n <param name="trj_input" type="data" format=\'xtc,trr\' label="Input trajectories" help="In XTC or TRR format, but please do not mix the two. Please note this tool does not currently take order into account when concatenating." multiple="true"/>\n <param name="cat" type="boolean" label="Do not discard double time frames" truevalue="-cat" falsevalue="-nocat"/>\n+ <param name="sep" type="hidden" value="" />\n </when>\n </conditional>\n <param name="output_format" type="select" label="Output format" >\n@@ -107,6 +160,7 @@\n </inputs>\n <outputs>\n <data name="output" format="xtc">\n+ <filter>not trj.get("sep") or output_format in ["xtc", "trr"]</filter>\n <change_format>\n <when input="output_format" value="trr" format="trr"/>\n <when input="output_format" value="xtc" format="xtc"/>\n@@ -114,7 +168,16 @@\n <when input="output_format" value="pdb" format="pdb"/>\n </change_format>\n </data>\n- </outputs> \n+ <collection type="list" name="gro_frames" label="Trajectory frames">\n+ <filter>trj.get("sep") and output_format == "gro"</filter>\n+ <discover_datasets pattern="(?P<designation>^output[0-9]{9}\\.gro$)" ext="gro"/>\n+ </collection>\n+ <collection type="list" name="pdb_frames" label="Trajectory frames">\n+ <filter>trj.get("sep") and output_format == \'pdb\'</filter>\n+ <discover_datasets pattern="(?P<designation>^output[0-9]{9}\\.pdb$)" ext="pdb"/>\n+ </collection>\n+ <expand macro="log_outputs" />\n+ </outputs>\n <tests>\n <test>\n <!-- gmx trjcat -f npt.xtc nvt.xtc -cat -o test.xtc -->\n@@ -126,9 +189,9 @@\n <param name="cat" value="true" />\n <output name="output" file="trjcat.xtc" ftype="xtc"/>\n </test>\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_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@@ -137,12 +200,25 @@\n <param name="dt" value="0" />\n <param name="index_output" value="1" />\n <param name="index_center" value="1" />\n- <param name="center" value="true" />\n <param name="pbc" value="mol" />\n- <param name="ur" value="compact" />\n <param name="ur" value="tric" />\n <output name="output" file="trjconv.xtc" ftype="xtc"/>\n- </test> -->\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="output00000007" ftype="pdb" file="frame7.pdb"/>\n+ </output_collection>\n+ </test>\n </tests>\n <help><![CDATA[\n \n' |