comparison rbdock.xml @ 4:a428230b38f6 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdock commit db567a29443284f2cec1444ec9db9aa6bd913fad"
author bgruening
date Fri, 03 Apr 2020 13:32:13 -0400
parents bad150d12198
children 07fa39ed62c7
comparison
equal deleted inserted replaced
3:1709d2c3dc20 4:a428230b38f6
1 <tool id="rdock_rbdock" name="rDock docking" version="0.1.2"> 1 <tool id="rdock_rbdock" name="rDock docking" version="0.1.3" profile="19.01">
2 <description>- perform protein-ligand docking with rDock</description> 2 <description>- perform protein-ligand docking with rDock</description>
3 <macros> 3 <macros>
4 <import>rdock_macros.xml</import> 4 <import>rdock_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
11 #if $name == 'Y': 11 #if $name == 'Y':
12 sdmodify -f_REC '$ligands' > ligands.sdf && 12 sdmodify -f_REC '$ligands' > ligands.sdf &&
13 #else 13 #else
14 ln -s '$ligands' ligands.sdf && 14 ln -s '$ligands' ligands.sdf &&
15 #end if 15 #end if
16 rbdock -i ligands.sdf -r receptor.prm -p dock.prm -n $num -o output && 16
17 sdsort -n -s -fSCORE output.sd | 17 python '$__tool_directory__/rbdock.py'
18 #if $score: 18 -n '$num'
19 sdfilter -f'\$SCORE <= $score' | 19 #if $seed:
20 -s '$seed'
21 #end if
22 &&
23
24 cat rdock_output.sd
25
26 #if $filter.filter_select == "filter":
27 #if $filter.score:
28 | sdfilter -f'\$SCORE <= ${filter.score}'
29 #end if
30 #if $filter.nscore:
31 | sdfilter -f'\$SCORE.norm <= ${filter.nscore}'
32 #end if
33 #if $filter.top
34 | sdsort -n -s -fSCORE | sdfilter -f'\$_COUNT <= $filter.top'
35 #end if
20 #end if 36 #end if
21 #if $nscore: 37
22 sdfilter -f'\$SCORE.norm <= $nscore' | 38 > '$output'
23 #end if 39
24 sdfilter -f'\$_COUNT <= $top' > '$output'
25 ]]></command> 40 ]]></command>
26 41
27 <configfiles> 42 <configfiles>
28 <configfile name="receptor_prm">RBT_PARAMETER_FILE_V1.00 43 <configfile name="receptor_prm">RBT_PARAMETER_FILE_V1.00
29 RECEPTOR_FILE receptor.mol2 44 RECEPTOR_FILE receptor.mol2
34 <inputs> 49 <inputs>
35 <param type="data" name="receptor" format="mol2" label="Receptor" help="Select a receptor (mol2 format)."/> 50 <param type="data" name="receptor" format="mol2" label="Receptor" help="Select a receptor (mol2 format)."/>
36 <param type="data" name="active_site" format="rdock_as" label="Active site" help="Active site file"/> 51 <param type="data" name="active_site" format="rdock_as" label="Active site" help="Active site file"/>
37 <param type="data" name="ligands" format="sdf,mol" label="Ligands" help="Ligands in SDF format (or single ligand in MOL format)"/> 52 <param type="data" name="ligands" format="sdf,mol" label="Ligands" help="Ligands in SDF format (or single ligand in MOL format)"/>
38 <param name="num" type="integer" value="10" label="Number of dockings" help="Number of poses to generate"/> 53 <param name="num" type="integer" value="10" label="Number of dockings" help="Number of poses to generate"/>
39 <param name="top" type="integer" value="1" label="Number of best poses" help="Number of best scoring poses to keep"/> 54 <conditional name="filter">
40 <param name="score" type="float" optional="true" label="Score filter" 55 <param name="filter_select" type="select" label="Filter the docking results" help="Using sdfilter">
41 help="Exclude poses with score greater than this value"/> 56 <option value="filter">Show filter options</option>
42 <param name="nscore" type="float" optional="true" label="Normalised score filter" 57 <option value="no_filter">No filtering</option>
43 help="Exclude poses with normalised score greater than this value"/> 58 </param>
59 <when value="filter">
60 <param name="score" type="float" optional="true" label="Score filter"
61 help="Exclude poses with score greater than this value"/>
62 <param name="nscore" type="float" optional="true" label="Normalised score filter"
63 help="Exclude poses with normalised score greater than this value"/>
64 <param name="top" type="integer" value="1" optional="true" min="1" label="Number of best poses"
65 help="Number of best scoring poses to keep"/>
66 </when>
67 <when value="no_filter"/>
68 </conditional>
44 <param name="name" type="boolean" label="Generate name field" truevalue="Y" falsevalue="N" checked="false" 69 <param name="name" type="boolean" label="Generate name field" truevalue="Y" falsevalue="N" checked="false"
45 help="Generate the name field (first line) for cases where this is empty"/> 70 help="Generate the name field (first line) for cases where this is empty"/>
71 <param argument="-seed" type="integer" optional="true" label="Random seed" help=""/>
46 </inputs> 72 </inputs>
47 <outputs> 73 <outputs>
48 <data name="output" format="sdf" label="rDock on ${on_string}"/> 74 <data name="output" format="sdf" label="rDock on ${on_string}"/>
49 </outputs> 75 </outputs>
50 <tests> 76 <tests>
77 <!-- broken ligand test -->
78 <test expect_failure="true" expect_exit_code="23">
79 <param name="receptor" value="receptor.mol2"/>
80 <param name="ligands" value="broken_ligand.sdf"/>
81 <param name="active_site" value="receptor.as"/>
82 <param name="num" value="3"/>
83 <param name="seed" value="3"/>
84 <conditional name="filter">
85 <param name="filter_select" value="filter"/>
86 <param name="top" value="1"/>
87 </conditional>
88 <param name="name" value="false"/>
89 </test>
51 <test> 90 <test>
52 <param name="receptor" value="receptor.mol2"/> 91 <param name="receptor" value="receptor.mol2"/>
53 <param name="ligands" value="ligands_names.sdf"/> 92 <param name="ligands" value="ligands_names.sdf"/>
54 <param name="active_site" value="receptor.as"/> 93 <param name="active_site" value="receptor.as"/>
55 <param name="num" value="3"/> 94 <param name="num" value="3"/>
56 <param name="top" value="1"/> 95 <param name="seed" value="3"/>
96 <conditional name="filter">
97 <param name="filter_select" value="filter"/>
98 <param name="top" value="1"/>
99 </conditional>
57 <param name="name" value="false"/> 100 <param name="name" value="false"/>
58 <output name="output"> 101 <output name="output">
59 <assert_contents> 102 <assert_contents>
60 <has_text text="Rbt.Current_Directory"/> 103 <has_text text="Rbt.Current_Directory"/>
104 <has_n_lines n="352"/>
61 </assert_contents> 105 </assert_contents>
62 </output> 106 </output>
63 </test> 107 </test>
64 <test> 108 <test>
65 <param name="receptor" value="receptor.mol2"/> 109 <param name="receptor" value="receptor.mol2"/>
66 <param name="ligands" value="ligands_nonames.sdf"/> 110 <param name="ligands" value="ligands_nonames.sdf"/>
67 <param name="active_site" value="receptor.as"/> 111 <param name="active_site" value="receptor.as"/>
68 <param name="num" value="3"/> 112 <param name="num" value="3"/>
69 <param name="top" value="1"/> 113 <param name="seed" value="3"/>
114 <conditional name="filter">
115 <param name="filter_select" value="filter"/>
116 <param name="top" value="1"/>
117 </conditional>
70 <param name="name" value="true"/> 118 <param name="name" value="true"/>
71 <output name="output"> 119 <output name="output">
72 <assert_contents> 120 <assert_contents>
73 <has_text text="Rbt.Current_Directory"/> 121 <has_text text="Rbt.Current_Directory"/>
122 <has_n_lines n="352"/>
74 </assert_contents> 123 </assert_contents>
75 </output> 124 </output>
76 </test> 125 </test>
126 <!-- no filter test -->
77 <test> 127 <test>
78 <param name="receptor" value="receptor.mol2"/> 128 <param name="receptor" value="receptor.mol2"/>
79 <param name="ligands" value="ligands_names.sdf"/> 129 <param name="ligands" value="ligands_nonames.sdf"/>
80 <param name="active_site" value="receptor.as"/> 130 <param name="active_site" value="receptor.as"/>
81 <param name="num" value="1"/> 131 <param name="num" value="3"/>
82 <param name="score" value="10"/> 132 <param name="seed" value="3"/>
83 <param name="nscore" value="1"/> 133 <conditional name="filter">
84 <param name="name" value="false"/> 134 <param name="filter_select" value="no_filter"/>
135 </conditional>
136 <param name="name" value="true"/>
85 <output name="output"> 137 <output name="output">
86 <assert_contents> 138 <assert_contents>
87 <has_text text="Rbt.Current_Directory"/> 139 <has_text text="Rbt.Current_Directory"/>
140 <has_n_lines n="1056"/>
141 </assert_contents>
142 </output>
143 </test>
144 <test>
145 <param name="receptor" value="receptor.mol2"/>
146 <param name="ligands" value="ligands_names.sdf"/>
147 <param name="active_site" value="receptor.as"/>
148 <param name="num" value="1"/>
149 <param name="seed" value="3"/>
150 <conditional name="filter">
151 <param name="filter_select" value="filter"/>
152 <param name="score" value="10"/>
153 <param name="nscore" value="1"/>
154 </conditional>
155 <param name="name"/>
156 <output name="output">
157 <assert_contents>
158 <has_text text="Rbt.Current_Directory"/>
159 <has_n_lines n="352"/>
88 </assert_contents> 160 </assert_contents>
89 </output> 161 </output>
90 </test> 162 </test>
91 </tests> 163 </tests>
92 <help><![CDATA[ 164 <help><![CDATA[