view chembl.xml @ 5:1ade252ebe08 draft

"planemo upload for repository https://github.com/chembl/chembl_webresource_client commit 944ea4bb8a9cd4244152a4a4fecd0485fabc2ad0"
author bgruening
date Tue, 28 Jul 2020 08:20:47 -0400
parents 59eea7d0d720
children a57de37f12c2
line wrap: on
line source

<tool id="chembl" name="Search ChEMBL database" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
    <macros>
        <token name="@TOOL_VERSION@">0.10.1</token>
        <token name="@GALAXY_VERSION@">2</token>
    </macros>
    <description>for compounds which are similar to a SMILES string</description>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">chembl_webresource_client</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        python -W ignore '$__tool_directory__/chembl.py'
            $input.format '$input.smiles'
            -o $outfile
            $search.type
            #if $search.type == '-t':
                $search.tanimoto
            #end if
            $drugs
            $biotherapeutic
            $natprod
            $ro5
    ]]></command>
    <inputs>
        <conditional name="input">
            <param name='format' type='select' format='text' label="SMILES input type" help="Enter SMILES as either text or file.">
                <option value='-i'>Text</option>
                <option value='-f'>File</option>
            </param>
            <when value='-i'>
                <param name="smiles" type="text" label="SMILES input" help="Enter SMILES for a compound.">
                    <validator type='length' min='5'/>
                </param>
            </when>
            <when value='-f'>
                <param name="smiles" type="data" format="smi" label="Input file" help="File containing a single compound in SMILES format. Note only the first line of the file will be read, if the file contains multiple compounds."/>
            </when>
        </conditional>
        
        <conditional name="search">
            <param name='type' type='select' format='text' label="Search type" help="Search for compounds are similar to the SMILES input, or which contain the SMILES input as a substructure">
                <option value='-t'>Similarity</option>
                <option value='-s'>Substructure</option>
            </param>
            <when value="-t">
                <param type="integer" name="tanimoto" label="Tanimoto cutoff score" help="Score for similarity search. Minimum value is 70." value="70" min="70" max="100"/>
            </when>
            <when value="-s"/>
        </conditional>
        
        <param name="drugs" type="boolean" value="false" label="Filter to return only approved drugs" truevalue="-d" falsevalue=""/>
        <param name="biotherapeutic" type="boolean" value="false" label="Filter to return only biotherapeutic molecules" truevalue="-b" falsevalue=""/>
        <param name="natprod" type="boolean" value="false" label="Filter to return only natural products" truevalue="-n" falsevalue=""/>
        <param name="ro5" type="boolean" value="false" label="Filter for Lipinski's Rule of Five" truevalue="-r" falsevalue=""/>
    </inputs>
    <outputs>
        <data name="outfile" format="smi" />
    </outputs>
    <tests>
        <test>
            <param name="format" value="-f"/>
            <param name="smiles" value="in1.smi"/>
            <param name='type' value='-t' />
            <param name='tanimoto' value='70' />
            <output name="outfile" ftype="smi" file='out1.smi' compare="sim_size"/>
        </test>
        <test>
            <param name="format" value="-f"/>
            <param name="smiles" value="in1.smi"/>
            <param name='type' value='-t' />
            <param name='tanimoto' value='70' />
            <param name='drugs' value='true'/>
            <output name="outfile" ftype="smi" file='out2.smi' compare="sim_size"/>
        </test>
        <test>
            <param name="format" value="-f"/>
            <param name="smiles" value="in1.smi"/>
            <param name='type' value='-s' />
            <output name="outfile" ftype="smi" file='out3.smi' compare="sim_size"/>
        </test>    
        <test>
            <param name="format" value="-i"/>
            <param name="smiles" value="C1CCCCC1"/>
            <param name='type' value='-t' />
            <param name='tanimoto' value='70' />
            <output name="outfile" ftype="smi" file='out4.smi' compare="sim_size"/>
        </test>       
    </tests>
    <help><![CDATA[

Search the ChEMBL database for compounds which resemble a SMILES string. Two 
search options are possible: similarity (searches for compounds which are 
similar to the input within a specified Tanimoto cutoff) and substructure 
(searches for compounds which contain the input substructure).

Results can be filtered for compounds which are 1) approved drugs 2) biotherapeutic
3) natural products and 4) fulfil all of the Lipinski rule of five criteria.

-----

.. class:: infomark

**Input**

A single molecule in SMILES format. This can be submitted either as text or as a 
file containing the SMILES string on the first line. Note that if the file contains 
multiple lines, only the SMILES string on the first line will be used for the search.

-----

.. class:: infomark

**Output**

A SMILES file with search results, each on a new line.

    ]]></help>

    <citations>
        <citation type="doi">10.1093/nar/gkv352</citation>
        <citation type="doi">arXiv:1607.00378v1</citation>
    </citations>
</tool>