view ob_grep.xml @ 11:78640d0127ce draft

"planemo upload for repository commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
author bgruening
date Tue, 28 Jul 2020 08:36:19 -0400
parents 99517f9b780d
line wrap: on
line source

<tool id="openbabel_obgrep" name="Compound search" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
    <description>- an advanced molecular search program using SMARTS</description>
    <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism-->
        <token name="@GALAXY_VERSION@">0</token>
    <expand macro="requirements"/>

        #if $input_type.inp == 'single':
                #if $n_times:
                    -t $n_times
                #end if
                -i '${infile.ext}'
                > '${outfile}'
        #else if $input_type.inp == 'multi':
            python '$__tool_directory__/'
                -i $infile
                --iformat ${infile.ext}
                -q '${input_type.query}'
                -o '${outfile}'
                --n-times $n_times
                --processors "\${GALAXY_SLOTS:-12}"
        #end if

        <expand macro="infile_all_types"/>
        <conditional name="input_type">
            <param name="inp" type="select" label="Input">
                <option value="single">Enter a single SMARTS pattern</option>
                <option value="multi">Upload one or more SMARTS patterns in a text file</option>
            <when value="single">
                <param name="smarts_pattern" type="text" format="text" label="SMARTS Pattern" help="Specify a SMARTS Pattern for your search."/>
            <when value="multi">
                <param name="query" type='data' format="tabular,text" label="Query file" help="One SMARTS pattern in each line."/>
        <param name="invert_matches" type="boolean" label="Perform an inverted search, i.e. print non-matching molecules" truevalue="-v" falsevalue="" checked="false" />
        <param name="n_times" type="integer" value="0" min="0" optional="True"
            label="Print a molecule only if the pattern occurs this often 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" help="Print matching molecules only when the number of heavy atoms equals 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" />
    <options sanitize="False"/>
        <expand macro="output_like_input"/>
            <param name="infile" ftype="smi" value="8_mol.smi"/>
            <param name="inp" value="single"/>
            <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"/>
            <param name="infile" ftype="smi" value="2_mol.smi"/>
            <param name="inp" value="multi"/>
            <param name="query" value="pattern.smarts" />
            <output name="outfile" ftype="smi" file="ob_multi_obgrep.smi" />

.. 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. Not all SMARTS features from the original implementation in the Daylight Toolkit are supported by OpenBabel; please have a look here_.

The search query can be submitted either as a single SMARTS pattern or as a file containing multiple SMARTS patterns.

.. _Obgrep:
.. _here:


.. class:: infomark


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

.. _SD-Format:
.. _SMILES Format:


.. class:: infomark


Same as input format.

    <expand macro="citations"/>