diff screen.xml @ 0:2c11d1f9e00b draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/im-pipelines commit 598dd288a384481b7602a0f6322c5081dc8da5d9"
author bgruening
date Tue, 21 Jul 2020 05:22:46 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screen.xml	Tue Jul 21 05:22:46 2020 -0400
@@ -0,0 +1,145 @@
+<tool id="ctb_im_screen" name="Screen" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
+    <description>a compound against a library using RDKit</description>
+    <macros>
+        <import>macros.xml</import>
+        <token name="@GALAXY_VERSION@">0</token>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        screen
+            #if $comparator.comparator_opts == 'str':
+                --qsmiles '${comparator.input}'
+            #else:
+                --qmolfile ${comparator.input}
+            #end if
+
+            -i '$infile'
+            -if sdf
+            #if $comparator.comparator_opts == 'mol'
+                --isMol
+            #end if
+            #if $fragment_opts
+                -f '$fragment_opts'
+            #end if
+            --simmin '$sim_min'
+            --simmax '$sim_max'
+            -d '$descriptor_opts'
+            -m '$metric_opts'
+            #if $hac_min != ''
+                --hacmin '$hac_min'
+            #end if
+            #if $hac_max != ''
+                --hacmax '$hac_max'
+            #end if
+            #if $mw_min != ''
+                --mwmin '$mw_min'
+            #end if
+            #if $mw_max != ''
+                --mwmax '$mw_max'
+            #end if
+            --meta
+            -o outp &>> $logfile &&  ## the script does not exit 0
+        cat outp_metrics.txt &>> $logfile &&
+        gzip -d outp.sdf.gz
+    ]]></command>
+    <inputs>
+        <conditional name="comparator">
+            <param name='comparator_opts' type='select' label="Input type" help="Enter SMILES string or Mol file.">
+                <option value='file'>Mol/SDF file</option>
+                <option value='str'>SMILES string</option>
+            </param>
+            <when value='str'>
+                <param name="input" type="text" label="SMILES input" help="Enter SMILES for a compound.">
+                    <validator type='length' min='5'/>
+                </param>
+            </when>
+            <when value='file'>
+                <param name="input" type="data" format="sdf,mol" label="Input" help="Input file in mol/sdf format"/>
+            </when>
+        </conditional>
+        <param name="infile" type="data" format="sdf" label="Input file" help="Input file in SDF or JSON format, for comparison"/>
+        <param name="sim_min" type="float" label="Similarity lower cutoff" value="0.7" min="0" max="1" help="(1.0 means identical)"/>
+        <param name="sim_max" type="float" label="Similarity upper cutoff" value="1.0" min="0" max="1" help="(1.0 means identical)"/>
+        <param name="descriptor_opts" type="select" label="Type of descriptor or fingerprint" help="Default is rdkit">
+            <option value="rdkit" selected="true">rdkit</option>
+            <option value="maccs">maccs</option>
+            <option value="morgan2">morgan2</option>
+            <option value="morgan3">morgan3</option>
+        </param>
+        <param name="metric_opts" type="select" label="Similarity metric" help="Default is the Tanimoto coefficient">
+            <option value="tanimoto" selected="true">tanimoto</option>
+            <option value="asymmetric">asymmetric</option>
+            <option value="braunblanquet">braunblanquet</option>
+            <option value="cosine">cosine</option>
+            <option value="dice">dice</option>
+            <option value="kulczynski">kulczynski</option>
+            <option value="mcconnaughey">mcconnaughey</option>
+            <option value="rogotgoldberg">rogotgoldberg</option>
+            <option value="russel">russel</option>
+            <option value="sokal">sokal</option>
+        </param>
+        <param name="fragment_opts" type="select" optional="true" label="Find single fragment" help="Find single fragment if more than one (hac = biggest by heavy atom count, mw = biggest by mol weight )">
+            <option value="hac">Biggest by heavy atom count</option>
+            <option value="mw">Biggest by molecular weight</option>
+        </param>
+        <param name="hac_min" type="integer" optional="true" label="Minimum heavy atom count" help="Minimum number of heavy atoms for a candidate to pass screening"/>
+        <param name="hac_max" type="integer" optional="true" label="Maximum heavy atom count" help="Maximum number of heavy atoms for a candidate to pass screening"/>
+        <param name="mw_min" type="float" optional="true" label="Minimum molecular weight" help="Minimum molecular weight for a candidate to pass screening"/>
+        <param name="mw_max" type="float" optional="true" label="Maximum molecular weight" help="Maximum molecular weight for a candidate to pass screening"/>
+    </inputs>
+    
+    <expand macro="outputs" />
+    
+    <tests>
+        <test>
+            <param name='comparator_opts' value="str"/>
+            <param name="input" value="C1N=C(C2=CC=CC=C2)C2=CC=CC=C2C2=C1C=NC(NC1=CC=CC=C1)=N2"/>
+            <param name="infile" value="dhfr_3d.sdf" ftype="sdf"/>
+            <param name="descriptor_opts" value="rdkit" />
+            <param name="metric_opts" value="tanimoto" />
+            <param name="sim_min" value="0.45" />
+            <param name="sim_max" value="1.0" />
+            <output name="outfile" ftype='sdf' file="screen_output1.sdf"/>
+        </test>
+        <test>
+            <param name='comparator_opts' value="file"/>
+            <param name="input" value="pyrimethamine.mol" ftype="mol"/>
+            <param name="infile" value="dhfr_3d.sdf" ftype="sdf"/>
+            <param name="descriptor_opts" value="rdkit" />
+            <param name="metric_opts" value="tanimoto" />
+            <param name="sim_min" value="0.7" />
+            <param name="sim_max" value="0.8" />
+            <output name="outfile" ftype='sdf' file="screen_output2.sdf"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+.. class:: infomark
+
+**What this tool does**
+
+Screen a library against a compound, filtering by fingerprint similarity and a number of other properties.
+
+.. class:: infomark
+
+**Input**
+
+| - Compound library in `SDF Format`_
+| - Compound to screen against in `SMILES`_ or `SDF Format`_
+| - Type of fingerprint
+| - Required molecular weight and heavy atom count
+
+.. _SDF Format: http://en.wikipedia.org/wiki/Chemical_table_file
+.. _SMILES: http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification
+
+-----
+
+.. class:: infomark
+
+ **Output**
+
+SD-file of screened compounds, with new 'Similarity' property.
+
+]]></help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file