view md_converter.xml @ 7:ccfbd956a2d3 draft

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tools/mdfileconverter commit 6ad78fe2018af0202f86c56b83dbbab9f9ee1e51"
author chemteam
date Thu, 11 Mar 2021 19:57:47 +0000
parents
children
line wrap: on
line source

<tool id="md_converter" name="MDTraj file converter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
    <description>- interconvert between MD trajectory file formats.</description>
    <macros>
        <token name="@TOOL_VERSION@">1.9.5</token>
        <token name="@GALAXY_VERSION@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">mdtraj</requirement>
    </requirements>

    <command detect_errors="exit_code"><![CDATA[

        ln -s '$input_file' ./input.$input_file.ext &&
        mdconvert ./input.$input_file.ext -o ./output.${output_format} &&
        cp ./output.${output_format} $output

    ]]></command>
    <inputs>
        <param argument="input_file" type="data" format='xtc,trr,dcd,netcdf' label="Input file for conversion"/>
        <param argument="output_format" type="select" label="Output format">
            <option value="trr">TRR file</option>
            <option value="xtc">XTC file</option>
            <option value="dcd">DCD file</option>
            <option value="netcdf">NETCDF file</option>
        </param>
    </inputs>

    <outputs>
        <data name="output">
            <change_format>
                <when input="output_format" value="trr" format="trr"/>
                <when input="output_format" value="xtc" format="xtc"/>
                <when input="output_format" value="dcd" format="dcd"/>
                <when input="output_format" value="netcdf" format="netcdf"/>
            </change_format>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="conversion" value="traj" />
            <param name="output_format" value="dcd" />
            <param name="input_file" value="traj.xtc" ftype="xtc"/>
            <output name="output" file="traj.dcd" compare="sim_size"/>
        </test>
        <test>
            <param name="conversion" value="traj" />
            <param name="output_format" value="trr" />
            <param name="input_file" value="traj.dcd" ftype="dcd"/>
            <output name="output" file="traj.trr"/>
        </test>
        <test>
            <param name="conversion" value="traj" />
            <param name="output_format" value="netcdf" />
            <param name="input_file" value="traj.trr" ftype="trr"/>
            <output name="output">
              <assert_contents>
                  <has_size value="461416" delta="6000"/>
              </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool interconverts between MD trajectory file formats: xtc, trr, dcd and netcdf.

_____


.. class:: infomark

**Input**

       - Trajectory file (trr, xtc, dcd, netcdf)

_____


.. class:: infomark

**Output**

       - Trajectory file (trr, xtc, dcd, netcdf)
    ]]></help>
    <citations>
        <citation type="doi">10.1016/j.bpj.2015.08.015</citation>
    </citations>
</tool>