Mercurial > repos > bgruening > openbabel_filter
comparison ob_filter.xml @ 0:0d6e836460be draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit 01da22e4184a5a6f6a3dd4631a7b9c31d1b6d502
author | bgruening |
---|---|
date | Sat, 20 May 2017 08:38:22 -0400 |
parents | |
children | 0e382252d23d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0d6e836460be |
---|---|
1 <tool id="openbabel_filter" name="Filter" version="@VERSION@.0"> | |
2 <description> a set of molecules from a file</description> | |
3 <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="outfile"></parallelism--> | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="requirements"/> | |
8 <command detect_errors="aggressive"> | |
9 <![CDATA[ | |
10 python '$__tool_directory__/ob_filter.py' | |
11 -i '${infile}' | |
12 -o '${outfile}' | |
13 -iformat "${infile.ext}" | |
14 -oformat "${infile.ext}" | |
15 --filters '{ | |
16 #if $filter_methods.filter_methods_opts == "ruleof5": | |
17 "hbd" : [0, 5], | |
18 "hba" : [0, 10], | |
19 "molwt" : [0, 500], | |
20 "logp" : [-5, 5], | |
21 #elif $filter_methods.filter_methods_opts == "LeadLike": | |
22 "rotbonds" : [0, 7], | |
23 "molwt" : [0, 350], | |
24 "logp" : [-5, 3.5], | |
25 #elif $filter_methods.filter_methods_opts == "DrugLike": | |
26 "hba" : [0, 10], | |
27 "rotbonds" : [0, 8], | |
28 "molwt" : [150, 500], | |
29 "logp" : [-5, 5], | |
30 "psa" : [0, 150], | |
31 #elif $filter_methods.filter_methods_opts == "FragmentLike": | |
32 "rotbonds" : [0, 5], | |
33 "molwt" : [0, 250], | |
34 "logp" : [-5, 2.5], | |
35 #else: | |
36 #for $filter in $filter_methods.filter_set: | |
37 #set $filter_selected = $filter.filter_sel.filter_sel_opts | |
38 #set $filter_min = $filter_selected + "_min" | |
39 #set $filter_max = $filter_selected + "_max" | |
40 "$filter_selected" : [$filter.filter_sel[$filter_min], $filter.filter_sel[$filter_max] ], | |
41 #end for | |
42 #end if | |
43 }' | |
44 ]]> | |
45 </command> | |
46 <inputs> | |
47 <param name="infile" type="data" format="sdf,smi,mol,mol2,cml,inchi" | |
48 label="Select input file previously annotated with the 'Compute physico-chemical properties' tool"/> | |
49 <conditional name="filter_methods"> | |
50 <param name="filter_methods_opts" type="select" label="Select a pre-defined filtering set"> | |
51 <option value="user">User-defined properties</option> | |
52 <option value="ruleof5">Lipinski's Rule-of-Five</option> | |
53 <option value="LeadLike">Lead-like properties</option> | |
54 <option value="DrugLike">Drug-like properties</option> | |
55 <option value="FragmentLike">Fragment-like properties</option> | |
56 </param> | |
57 <when value="ruleof5" /> | |
58 <when value="LeadLike" /> | |
59 <when value="DrugLike" /> | |
60 <when value="FragmentLike" /> | |
61 <when value="user"> | |
62 <repeat name="filter_set" title="Filters selection"> | |
63 <conditional name="filter_sel"> | |
64 <param name="filter_sel_opts" type="select" label="Select properties to filter"> | |
65 <option value="hbd">Number of Hydrogen-bond donor groups</option> | |
66 <option value="hba">Number of Hydrogen-bond acceptor groups</option> | |
67 <option value="psa">Total polar Surface Area</option> | |
68 <option value="rotbonds">Number of rotatable bonds</option> | |
69 <option value="molwt">Molecular weight</option> | |
70 <option value="logp">Predicted value of LogP</option> | |
71 <option value="mr">Predicted value for the Molecular Refractivity</option> | |
72 <option value="atoms">Number of atoms</option> | |
73 <!-- Add later, we need to add a new smarts pattern to plugindefines.txt | |
74 <option value="hatoms">Number of heavy atoms</option>--> | |
75 <!-- We skip that options, for further information please read: http://www.dalkescientific.com/writings/diary/archive/2011/06/04/dealing_with_sssr.html --> | |
76 <!--<option value="rings">Number of rings</option>--> | |
77 </param> | |
78 <when value="hbd"> | |
79 <param name="hbd_min" type="integer" value="" label="Minimum number of HB donors"/> | |
80 <param name="hbd_max" type="integer" value="" label="Maximum number of HB donors"/> | |
81 </when> | |
82 <when value="hba"> | |
83 <param name="hba_min" type="integer" value="" label="Minimum number of HB acceptors"/> | |
84 <param name="hba_max" type="integer" value="" label="Maximum number of HB acceptors"/> | |
85 </when> | |
86 <when value="psa"> | |
87 <param name="psa_min" type="integer" value="" label="Minimum threshold for the Total Polar Surface Area"/> | |
88 <param name="psa_max" type="integer" value="" label="Maximum threshold for the Total Polar Surface Area"/> | |
89 </when> | |
90 <when value="rotbonds"> | |
91 <param name="rotbonds_min" type="integer" value="" label="Minimum number of rotatable bonds"/> | |
92 <param name="rotbonds_max" type="integer" value="" label="Maximum number of rotatable bonds"/> | |
93 </when> | |
94 <when value="molwt"> | |
95 <param name="molwt_min" type="integer" value="" label="Minimum threshold value for the Molecular Weight"/> | |
96 <param name="molwt_max" type="integer" value="" label="Maximum threshold value for the Molecular Weight"/> | |
97 </when> | |
98 <when value="logp"> | |
99 <param name="logp_min" type="float" value="" label="Minimum threshold value for the log-P"/> | |
100 <param name="logp_max" type="float" value="" label="Maximum threshold value for the log-P"/> | |
101 </when> | |
102 <when value="mr"> | |
103 <param name="mr_min" type="float" value="" label="Minimum threshold value for the Molecular Refractivity"/> | |
104 <param name="mr_max" type="float" value="" label="Maximum threshold value for the Molecular Refractivity"/> | |
105 </when> | |
106 <when value="atoms"> | |
107 <param name="atoms_min" type="integer" value="" label="Minimum number of atoms"/> | |
108 <param name="atoms_max" type="integer" value="" label="Maximum number of atoms"/> | |
109 </when> | |
110 <!--<when value="rings"> | |
111 <param name="rings_min" type="integer" value="" label="Minimum number of rings"/> | |
112 <param name="rings_max" type="integer" value="" label="Maximum number of rings"/> | |
113 </when>--> | |
114 </conditional> | |
115 </repeat> | |
116 </when> | |
117 </conditional> | |
118 </inputs> | |
119 <outputs> | |
120 <expand macro="output_like_input"/> | |
121 </outputs> | |
122 <tests> | |
123 <test> | |
124 <param name="infile" ftype="smi" value="CID_2244.smi"/> | |
125 <param name="filter_methods_opts" value="ruleof5" /> | |
126 <output name="outfile" ftype="smi" file="ob_filter_on_CID2244.smi" /> | |
127 </test> | |
128 <!-- | |
129 Limitation of the test framework: | |
130 https://trello.com/card/disambiguated-conditional-parameters-not-supported-in-unit-tests/506338ce32ae458f6d15e4b3/820 | |
131 <test> | |
132 <param name="infile" ftype="smi" value="CID_2244.smi"/> | |
133 <param name="filter_methods_opts" value="user" /> | |
134 <param name="filter_sel_opts" value="hba" /> | |
135 <param name="hbd_min" value="0" /> | |
136 <param name="hbd_max" value="5" /> | |
137 <output name="outfile" ftype="smi" file="ob_filter_on_CID2244_2.smi" /> | |
138 </test> | |
139 --> | |
140 </tests> | |
141 <help> | |
142 <![CDATA[ | |
143 | |
144 | |
145 .. class:: infomark | |
146 | |
147 **What this tool does** | |
148 | |
149 Filters a library of compounds based on user-defined physico-chemical parameters or predefined options (e.g. Ro5, lead-like properties, etc.). Multiple parameters can be selected for more specific queries. | |
150 | |
151 ----- | |
152 | |
153 .. class:: warningmark | |
154 | |
155 **Hint** | |
156 | |
157 | If your input file is in SDF format you can use the *Compute physico-chemical properties* tool to precalulate the properties and use the filter on that precomputed dataset. It should be faster and can be reused but it's bigger than a SMILES file. | |
158 | | |
159 | For exact matches please use the target value for both minimum and maximum parameters (e.g. a selection of exactly 4 rotatable bonds can be performed by selecting 4 as minimum and maximum value). | |
160 | | |
161 | Selecting the same property multiple times with different parameters will result in querying the largest overlapping subset of values for the parameter (e.g. a selection of between 0 and 3 rotatable bonds plus a selection between 2 and 4 will result in a query for compounds between 2 and 3 rotatable bonds). | |
162 | |
163 ----- | |
164 | |
165 .. class:: infomark | |
166 | |
167 **Definition of the pre-defined filtering rules** | |
168 | |
169 **# Lipinski's Rule of Five:** | |
170 =< 5 Hydrogen-bond donor groups | |
171 | |
172 =< 10 Hydrogen-bond acceptor groups | |
173 | |
174 =< 500 Molecular weight | |
175 | |
176 =< 5 octanol/water partition coefficient (log P) | |
177 | |
178 **# Lead Like properties** (Teague, Davis, Leeson, Oprea, Angew Chem Int Ed Engl. 1999 Dec 16;38(24):3743-3748): | |
179 =< 7 rotatable bonds | |
180 | |
181 =< 350 Molecular weight | |
182 | |
183 =< 3.5 octanol/water partition coefficient (log P) | |
184 | |
185 **# Drug Like properties** (Lipinski, J Pharmacol Toxicol Methods. 2000 Jul-Aug;44(1):235-49): | |
186 =< 10 Hydrogen-bond acceptor groups | |
187 | |
188 =< 8 rotatable bonds | |
189 | |
190 150 =< Molecular weight =< 500 | |
191 | |
192 =< 150 Polar Surface Area | |
193 | |
194 =< 5 octanol/water partition coefficient (log P) | |
195 | |
196 **# Fragment Like properties** (Carr RA, Congreve M, Murray CW, Rees DC, Drug Discov Today. 2005 Jul 15;10(14):987): | |
197 =< 5 rotatable bonds | |
198 | |
199 =< 250 Molecular weight | |
200 | |
201 =< 2.5 octanol/water partition coefficient (log P) | |
202 | |
203 ----- | |
204 | |
205 .. class:: infomark | |
206 | |
207 **Input** | |
208 | |
209 | - `SD-Format`_ | |
210 | - `SMILES Format`_ | |
211 | |
212 .. _SD-Format: http://en.wikipedia.org/wiki/Chemical_table_file | |
213 .. _SMILES Format: http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification | |
214 | |
215 ----- | |
216 | |
217 .. class:: infomark | |
218 | |
219 **Output** | |
220 | |
221 | SDF formatted coordinates of the molecules, with selected properties stored as meta-data for each compound. | |
222 | | |
223 | SMILES, InChI or mol2 formatted files containing the 1D strings or 3D coordinates of each compound. | |
224 | |
225 | |
226 | |
227 ]]> | |
228 </help> | |
229 <expand macro="citations"> | |
230 <citation type="doi">10.1186/1752-153X-2-5</citation> | |
231 </expand> | |
232 </tool> |