comparison dpocket.xml @ 3:4cc9d85c3bae draft default tip

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/fpocket/ commit 06eccf2513b3394e79606f320e019be4793386b9"
author bgruening
date Fri, 10 Sep 2021 08:20:08 +0000
parents
children
comparison
equal deleted inserted replaced
2:4fb73be7f4cb 3:4cc9d85c3bae
1 <tool id="dpocket" name="dpocket" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
2 <description>to calculate descriptors for protein pockets</description>
3 <macros>
4 <import>macros.xml</import>
5 <token name="@GALAXY_VERSION@">0</token>
6 </macros>
7 <expand macro="requirements" />
8 <command detect_errors="exit_code"><![CDATA[
9 ## create config file
10 #for i in $input:
11 ln -s '$i' $i.name.replace(' ', '_') &&
12 echo $i.name.replace(' ', '_') >> pdbs.txt &&
13 #end for
14 paste pdbs.txt '$ligs' > dp_conf.txt &&
15
16 ## run dpocket
17 dpocket
18 -f dp_conf.txt
19
20 ## pocket definition params common with fpocket
21 #if $inp.pocket_type == 'channel':
22 --min_alpha_size 2.8 --max_alpha_size 5.5 --min_spheres_per_pocket 30
23 #elif $inp.pocket_type == 'external':
24 --min_alpha_size 3.5 --max_alpha_size 10 --min_spheres_per_pocket 30
25 #elif $inp.pocket_type == 'custom':
26 --min_alpha_size '$inp.min'
27 --max_alpha_size '$inp.max'
28 --min_spheres_per_pocket '$inp.i'
29 --clustering_distance '$inp.D'
30 --clustering_method '$inp.C'
31 ##--clustering_measure $inp.e
32 #end if
33
34 ## specific params for explicit pocket definition
35 #if $explicit_output.output == "true":
36 $explicit_output.interface_definition
37 -d $explicit_output.dist
38 #end if
39
40 &&
41 ## reformat output files to match Galaxy tabular
42 sed -e "s/\s\+/\t/g" dpout_fpocketp.txt > $fpocketp &&
43 sed -e "s/\s\+/\t/g" dpout_fpocketnp.txt > $fpocketnp
44 #if $explicit_output.output:
45 &&
46 sed -e "s/\s\+/\t/g" dpout_explicitp.txt > $explicitp
47 #end if
48
49 ]]></command>
50 <inputs>
51 <param name="input" type="data" format="pdb" multiple="true" label="Input file" help="Protein structure file(s) (PDB) to search."/>
52 <param name="ligs" type="data" format="txt" label="Ligand codes" help="List of ligand codes (as provided in the PDB files), one per line. The number of codes must match the number of input PDB files."/>
53 <expand macro="inputs" />
54 <!-- <param name="outputs" type="select" display="checkboxes" multiple="true" label="Output files">
55 <option value="fpocketp" selected="true">Pockets which match the ligand position</option>
56 <option value="fpocketnp">Pockets which do NOT match the ligand position</option>
57 <option value="explicitp">Define pocket explicitly as all vertices/atoms within a given distance from the ligand, regardless of what fpocket found. </option>
58 </param> -->
59 <conditional name="explicit_output">
60 <param name="output" type="select" label="Calculate explicit pocket?" help="Define pocket explicitly as all vertices/atoms within a given distance from the ligand, regardless of what fpocket found.">
61 <option value="true" selected="true">Yes</option>
62 <option value="false">No</option>
63 </param>
64 <when value="false" />
65 <when value="true">
66 <param name="interface_definition" type="select" label="Definition of the explicit pocket" help="Protein-ligand explicit interface definition">
67 <option value="-e" selected="true">All atoms in contact with alpha spheres within a distance threshold from any ligand atom</option>
68 <option value="-E">All atoms within a distance threshold from any ligand atom</option>
69 </param>
70 <param name="dist" type="float" value="4.0" min="0" label="Distance threshold for explicit pocket definition (angstroms)" />
71 </when>
72
73 </conditional>
74 </inputs>
75
76 <outputs>
77 <data name="fpocketp" format="tabular" label="Pockets matching the submitted ligands"/>
78 <data name="fpocketnp" format="tabular" label="Pockets NOT matching the submitted ligands"/>
79 <data name="explicitp" format="tabular" label="Pockets defined explicitly based on the submitted ligands">
80 <filter>explicit_output['output'] == "true"</filter>
81 </data>
82 </outputs>
83
84 <tests>
85 <test expect_num_outputs="3">
86 <param name="input" ftype="pdb" value="2brc.pdb"/>
87 <param name="ligs" ftype="txt" value="ligs.txt"/>
88 <param name='pocket_type' value='custom' />
89 <param name="min" value="4.0"/>
90 <param name="max" value="7.0"/>
91 <param name="i" value="20" />
92 <param name="D" value="2.0"/>
93 <param name="C" value="s" />
94 <param name="interface_definition" value="-E" />
95 <param name="dist" value="5" />
96 <param name='explicit_output' value='true' />
97 <output name="fpocketp" ftype="tabular">
98 <assert_contents>
99 <has_n_columns n="57" />
100 <has_n_lines n="2" />
101 <has_text_matching expression="2brc.pdb\s+CT5\s+31.15\s+1\s+1.07\s+0.77\s+1.00\s+1\s+1.54"/>
102 <has_text_matching expression="6.50\s+0.96\s+0.44\s+14.39\s+23.64\s+12.20\s+42.27\s+15.29\s+2\s+1\s+0\s+2"/>
103 </assert_contents>
104 </output>
105 <output name="fpocketnp" ftype="tabular">
106 <assert_contents>
107 <has_n_columns n="57" />
108 <has_n_lines n="2" />
109 <has_text_matching expression="2brc.pdb\s+CT5\s+0.00\s+0\s+17.62\s+0.00\s+0.00\s+0\s+-1.25"/>
110 <has_text_matching expression="4.36\s+0.69\s+0.00\s+4.37\s+31.43\s+42.10\s+33.81\s+17.20\s+5\s+0\s+1\s+1"/>
111 </assert_contents>
112 </output>
113 <output name="explicitp" ftype="tabular">
114 <assert_contents>
115 <has_n_columns n="57" />
116 <has_n_lines n="2" />
117 <has_text_matching expression="2brc.pdb\s+CT5\s+100.00\s+1\s+0.00\s+1.00\s+1.00\s+1\s+2.00"/>
118 <has_text_matching expression="11.97\s+0.00\s+0.00\s+107.35\s+56.94\s+61.01\s+57.97\s+34.40\s+3\s+2\s+0\s+2"/>
119 </assert_contents>
120 </output>
121 </test>
122 <test expect_num_outputs="3">
123 <param name="input" ftype="pdb" value="2brc.pdb,1L83.pdb"/>
124 <param name="ligs" ftype="txt" value="ligs2.txt"/>
125 <param name='pocket_type' value='small_mol' />
126 <param name='explicit_output' value='false' />
127 <output name="fpocketp" ftype="tabular">
128 <assert_contents>
129 <has_n_columns n="57" />
130 <has_n_lines n="3" />
131 <has_text_matching expression="2brc.pdb\s+CT5\s+38.60\s+1\s+0.54\s+0.46\s+0.80\s+0\s+0.67"/>
132 <has_text_matching expression="1L83.pdb\s+BNZ\s+100.00\s+1\s+0.83\s+1.00\s+0.85\s+1\s+1.81"/>
133 </assert_contents>
134 </output>
135 <output name="fpocketnp" ftype="tabular">
136 <assert_contents>
137 <has_n_columns n="57" />
138 <has_n_lines n="19" />
139 <has_text_matching expression="2brc.pdb\s+CT5\s+0.00\s+0\s+17.15\s+0.00\s+0.00\s+0\s+-1.25"/>
140 <has_text_matching expression="29.17\s+4.03\s+0.65\s+11.05\s+0.65\s+0.14\s+13.17\s+29.13\s+19.24"/>
141 </assert_contents>
142 </output>
143 </test>
144 </tests>
145 <help><![CDATA[
146
147 Calculate descriptors (i.e. featurize) 'pockets' in a protein structure, using the
148 dpocket module of the fpocket software.
149
150 To use, upload one or more protein structures in PDB format and select the type of pocket to
151 detect. 'Custom options' can also be selected - this exposes all internal fpocket
152 parameters. Using this option requires some knowledge of the fpocket prediction
153 algorithm. Please consult the cited publications for more details.
154
155 In addition, a list of ligand identifiers should be provided as a text file, one per line and
156 one for each of the protein structures.
157
158
159 -----
160
161 .. class:: infomark
162
163 **Input**
164
165 - One or more protein structures in PDB format. If using multiple structures, submitting them as a dataset collection is recommended to ensure ordering is preserved.
166 - Text file with ligand identifiers, matching the ligand code in the PDB files. One identifier should be listed per line and one per PDB file.
167
168 -----
169
170 .. class:: infomark
171
172 **Output**
173
174 - Tabular file with descriptors of pockets matching the positions of the input ligands.
175 - Tabular file with descriptors of pockets which do NOT match the positions of the input ligands.
176 - (Optional) Tabular file with descriptors of pockets which are explicitly defined by the positions of the input ligands.
177
178 Each tabular file contains 57 columns (55 descriptors, plus protein and ligand names), a header line, and
179 one row per pocket found.
180
181 ]]></help>
182 <expand macro="citations" />
183 </tool>