view ob_grep.xml @ 5:50dc8ca09a50 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit 3ba9268697beb4827bd9e8e639e70166f224cb8b
author bgruening
date Mon, 03 Sep 2018 16:40:06 -0400
parents b0311f002a5f
children 99517f9b780d
line wrap: on
line source

<tool id="openbabel_obgrep" name="Compound Search" version="@VERSION@.0">
    <description>an advanced molecular grep program using SMARTS</description>
    <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism-->
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
<![CDATA[
        obgrep
            $invert_matches
            #if $n_times:
                -t $n_times
            #end if
            $only_name
            $full_match
            $number_of_matches
            -i '${infile.ext}'
            '${smarts_pattern}'
            '${infile}'
            > '${outfile}'
]]>
    </command>
    <inputs>
        <expand macro="infile_all_types"/>
        <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/>
        <param name="invert_matches" type="boolean" label="Invert the matching, print non-matching molecules" truevalue="-v" falsevalue="" checked="false" />
        <param name="n_times" type="integer" value="" min="1" optional="True"
            label="Print a molecule only if the pattern occurs # times inside the molecule" />
        <param name="only_name" type="boolean" label="Only print the name of the molecules" truevalue="-n" falsevalue="" checked="false" />
        <param name="full_match" type="boolean" label="Full match, print matching-molecules only when the number of heavy atoms is also equal to the number of atoms in the SMARTS pattern" truevalue="-f" falsevalue="" checked="false" />
        <param name="number_of_matches" type="boolean" label="Print the number of matches" truevalue="-c" falsevalue="" checked="false" />
    </inputs>
    <options sanitize="False"/>
    <outputs>
        <expand macro="output_like_input"/>
    </outputs>
    <tests>
        <test>
            <param name="infile" ftype="smi" value="8_mol.smi"/>
            <param name="smarts_pattern" value="CO"/>
            <param name="invert_matches" value="False" />
            <param name="only_name" value="False" />
            <param name="full_match" value="False" />
            <param name="number_of_matches" value="False" />
            <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/>
        </test>
    </tests>
    <help>
<![CDATA[

.. class:: infomark

**What this tool does**

Uses the Open Babel Obgrep_ to search for molecules inside multi-molecule files (e.g. SMI, SDF, etc.) or across multiple files.
It is known that not all SMARTS features from the Daylight Toolkit are supported, please have a look here_.


.. _Obgrep: http://openbabel.org/wiki/Obgrep
.. _here: http://openbabel.org/wiki/SMARTS

-----

.. class:: infomark

**Input**

| - `SD-Format`_
| - `SMILES Format`_

.. _SD-Format: http://en.wikipedia.org/wiki/Chemical_table_file
.. _SMILES Format: http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification

-----

.. class:: infomark

**Output**

Same as input format.

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