view filter/ob_grep.xml @ 0:6493d130f018

Uploaded
author bgruening
date Tue, 26 Mar 2013 14:49:44 -0400
parents
children 77b82f259298
line wrap: on
line source

<tool id="ctb_obgrep" name="Compound Search" version="0.1">
    <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>
    <requirements>
        <requirement type="package" version="2.3.2">openbabel</requirement>
    </requirements>
    <command>
        ## The command is a Cheetah template which allows some Python based syntax.
        ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
        obgrep

        $invert_matches
        #if $n_times != 0:
            -t $n_times
        #end if

        $only_name
        $full_match
        $number_of_matches
        -i ${infile.ext}
        "${smarts_pattern}"
        "${infile}"
        > "${outfile}" 2>&#38;1
    </command>
    <inputs>
        <param name="infile" type="data" format="sdf,mol,mol2,cml,inchi,smi" label="Compound File" help="Specify a compound file in SDF Format."/>
        <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="0" 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>
        <data name="outfile" format_source="infile" />
    </outputs>
    <tests>
    <test>
        <param name="infile" ftype="smi" value="8_mol.smi"/>
        <param name="smarts_pattern" value="CO"/>
        <param name="invert_matches" value="" />
        <param name="n_times" value="0"/>
        <param name="only_name" value="" />
        <param name="full_match" value="" />
        <param name="number_of_matches" value="" />
        <output name="outfile" ftype="smi" file="obgrep_on_8_mol.smi"/>
    </test>
    </tests>
    <help>
.. class:: warningmark

**What it does**

The obgrep tool can be used to search for molecules inside multi-molecule database files (e.g., SMILES, SDF, etc.) or across multiple files.

-----

**Output format**


**References**

Rajarshi Guha, Michael T. Howard, Geoffrey R. Hutchison, Peter Murray-Rust, Henry Rzepa, Christoph Steinbeck, Joerg Kurt Wegner, Egon Willighagen. "The Blue Obelisk -- Interoperability in Chemical Informatics." J. Chem. Inf. Model. (2006) 46(3) 991-998. DOI:10.1021/ci050400b
The Open Babel Package http://openbabel.sourceforge.net/

    </help>
</tool>