view sdf_to_tab.xml @ 6:4beb3e026bbb draft default tip

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit c1d813d3f0fec60ea6efe8a11e59d98bfdc1636f"
author bgruening
date Sat, 04 Dec 2021 16:39:05 +0000
parents 55553120df69
children
line wrap: on
line source

<tool id="sdf_to_tab" name="Extract values from an SD-file" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
    <macros>
        <token name="@TOOL_VERSION@">2020.03.4</token>
        <token name="@GALAXY_VERSION@">0</token>
    </macros>
    <description>into a tabular file using RDKit</description>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">rdkit</requirement>     
    </requirements>
    <command detect_errors="exit_code">
<![CDATA[
        python '$__tool_directory__/sdf_to_tab.py'
            -i '${infile}'
            -o '${outfile}'
            -p '$props'
            $header
            $smiles
            $name
]]>
    </command>
    <inputs>
        <param name="infile" format="sdf" type="data" label="Input SD-file"/>
        <param name="header" type="boolean" label="Include the property name as header"
            truevalue="--header" falsevalue="" checked="false" />
        <param name="smiles" type="boolean" label="Include SMILES as column in output"
            truevalue="--smiles" falsevalue="" checked="false" />
        <param name="name" type="boolean" label="Include molecule name as column in output"
            truevalue="--name" falsevalue="" checked="false" />
        <param name="props" type="text" optional="true" label="Properties to extract from the SD-file" help="Separated with a comma, e.g. RMSD_UB,RMSD_LB,SCORE. To extract values for all properties in the file, leave the field blank."/>
    </inputs>
    <outputs>
        <data format="tabular" name="outfile" />
    </outputs>
    <tests>
        <test>
            <param name="infile" ftype='sdf' value="CID_3037.sdf" />
            <param name="header" value="True" />
            <param name="props" value="" />
            <param name="name" value="True" />
            <output name="outfile" ftype='tabular' file="CID_3037.tab" />

        </test>
        <test>
            <param name="infile" ftype='sdf' value="ligand.sdf" />
            <param name="header" value="True" />
            <param name="props" value="RMSD_UB,RMSD_LB,SCORE" />
            <param name="smiles" value="True" />
            <output name="outfile" ftype='tabular' file="ligand.tab" />
        </test>
    </tests>
    <help>
<![CDATA[

.. class:: infomark

**What this tool does**

Structure-data (SD-) files may contain values for various properties saved under each of the records. These are indicated using angled brackets, as in the following extract::

    >  <TORSDO>
    F 3

    >  <SCORE>
    -4.9

    >  <RMSD_LB>
    0.000

    >  <RMSD_UB>
    0.000

This tool extracts properties for all molecules saved within an input SD-file, using RDKit, and saves them to tabular format.


-----

.. class:: infomark

**Input**

An SD-file. The properties to be extracted can also be specified, separated with a comma; for example, SCORE,RMSD_LB,RMSD_UB.

If the field is left blank, all properties found in the SD-file will be saved, excluding properties with values that contain newline or tab characters, which would disrupt the tabular format.

-----

.. class:: infomark

 **Output**

Tabular file, where each property is shown in a separate column, with compounds found in the SD-file listed in each row::

    Name    RMSD_LB RMSD_UB SCORE
    pose1   0.0     0.0     -4.9
    pose2   0.118   2.246   -4.9
    pose3   2.96    5.795   -4.9
    pose4   2.958   5.379   -4.8
    pose5   2.763   5.379   -4.5
    pose6   3.106   4.85    -4.4
    pose7   2.847   5.816   -4.4
    pose8   3.964   5.892   -4.3
    pose9   3.971   6.363   -4.3

]]>
    </help>
    <citations>
        <citation type="bibtex">
            @article{rdkit,
                author = {Greg Landrum and others},
                title = {RDKit: Open-source cheminformatics},
                url ={http://www.rdkit.org}
            }</citation>
    </citations>
</tool>