view ob_depiction_svg.xml @ 0:88f229c63734 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit 01da22e4184a5a6f6a3dd4631a7b9c31d1b6d502
author bgruening
date Sat, 20 May 2017 08:38:05 -0400
parents
children 672b3365ddbc
line wrap: on
line source

<tool id="openbabel_svg_depiction" name="Visualisation" version="@VERSION@.0">
    <description>of compounds</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="aggressive">
<![CDATA[
    obabel
        -i${infile.ext}
        "${infile}"
        $embed_molecule_as_cml
        $draw_all_carbon_atoms
        -xC
        -O
        "${outfile}"
        -o$oformat
        #if $sort:
            --sort $sort
        #end if
        #if str($display_name) != "None" and len(str($display_name)) > 0 and str($display_name) != 'title':
            --append "$display_name"
            --title ""
        #end if
        $thick_lines
    2>&1
]]>
    </command>
    <inputs>
        <expand macro="infile_all_types"/>
        <param name="embed_molecule_as_cml" type="boolean" truevalue="-e" falsevalue="" label="Embed molecule as CML"/>
        <param name="draw_all_carbon_atoms" type="boolean" truevalue="-a" falsevalue="" label="draw all carbon atoms"/>
        <param name="thick_lines" type="boolean" truevalue="-xt" falsevalue="" label="use thicker lines"/>

        <param name='display_name' type='select' format='text' label="The property which is displayed under the molecule">
            <option value='title'>Molecule's title</option>
            <option value='MW'>Molecular Weight</option>
            <option value='abonds'>Number of aromatic bonds</option>
            <option value='atoms'>Number of atoms</option>
            <option value='bonds'>Number of bonds</option>
            <option value='cansmi'>Canonical SMILES</option>
            <option value='cansmiNS'>Canonical SMILES without isotopes or stereo</option>
            <option value='dbonds'>Number of double bonds</option>
            <option value='formula'>Chemical formula</option>
            <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
            <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
            <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
            <option value='InChI'>IUPAC InChI identifier</option>
            <option value='L5'>Lipinski Rule of Five</option>
            <option value='logP'>octanol/water partition coefficient</option>
            <option value='MR'>molar refractivity</option>
            <option value='nF'>Number of Fluorine Atoms</option>
            <option value='s'>SMARTS filter</option>
            <option value='sbonds'>Number of single bonds</option>
            <option value='smarts'>SMARTS filter</option>
            <option value='tbonds'>Number of triple bonds</option>
            <option value='TPSA'>topological polar surface area</option>
        </param>

        <param name='sort' type='select' format='text' optional="True" label="Sorting the displayed molecules by">
            <option value='MW'>Molecular Weight</option>
            <option value='abonds'>Number of aromatic bonds</option>
            <option value='atoms'>Number of atoms</option>
            <option value='bonds'>Number of bonds</option>
            <option value='dbonds'>Number of double bonds</option>
            <option value='HBA1'>Number of Hydrogen Bond Acceptors 1 (JoelLib)</option>
            <option value='HBA2'>Number of Hydrogen Bond Acceptors 2 (JoelLib)</option>
            <option value='HBD'>Number of Hydrogen Bond Donors (JoelLib)</option>
            <option value='L5'>Lipinski Rule of Five</option>
            <option value='logP'>octanol/water partition coefficient</option>
            <option value='MR'>molar refractivity</option>
            <option value='nF'>Number of Fluorine Atoms</option>
            <option value='sbonds'>Number of single bonds</option>
            <option value='tbonds'>Number of triple bonds</option>
            <option value='TPSA'>topological polar surface area</option>
        </param>

        <param name='oformat' type='select' format='text' label="Format of the resulting picture">
            <option value='svg'>SVG</option>
            <option value='png'>PNG</option>
        </param>

    </inputs>
    <outputs>
        <data name="outfile" format="png" label="${tool.name} on ${on_string}">
            <change_format>
                <when input="oformat" value="svg" format="svg"/>
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="infile" ftype="smi" value="8_mol.smi" />
            <param name="embed_molecule_as_cml" value="False" />
            <param name="draw_all_carbon_atoms" value="True" />
            <param name="thick_lines" value="True" />
            <param name='display_name' value="title" />
            <output name="outfile" ftype="svg" file="ob_depiction_svg_on_8_mol.svg" lines_diff="100" />
        </test>
    </tests>
    <help>
<![CDATA[

.. class:: infomark

**What this tool does**

Creates an .svg or .png image of a small set of molecules (few hundreds). Based on Open Babel PNG_/SVG_ 2D depiction.

.. _PNG: http://openbabel.org/docs/dev/FileFormats/PNG_2D_depiction.html
.. _SVG: http://openbabel.org/docs/dev/FileFormats/SVG_2D_depiction.html

-----

.. class:: warningmark

**Hint**

Use only libraries with at most a few hundred molecules.


]]>
    </help>
    <expand macro="citations"/>
</tool>