comparison sort_filter.xml @ 0:784a9f7f079e draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdock commit 9ffbed897a816616ac05c479dcff75103cf9a7e8"
author bgruening
date Tue, 17 Mar 2020 09:27:24 -0400
parents
children a6ec6c55267e
comparison
equal deleted inserted replaced
-1:000000000000 0:784a9f7f079e
1 <tool id="rdock_sort_filter" name="SDF sort and filter" version="0.1.0">
2 <description>using the sdsort provided with rDock</description>
3 <macros>
4 <import>rdock_macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <command><![CDATA[
8
9 sdsort -n $descending -s -f'$sort_field' -id'$name_field' '$input' |
10 sdfilter -f'\$_COUNT <= $top' -s'$name_field' |
11 sdsort -n $descending -f'$sort_field' > '$output'
12
13 ]]></command>
14
15 <inputs>
16 <param type="data" name="input" format="sdf" label="Molecules" help="Molecules in SDF format"/>
17 <param name="top" type="integer" value="1" label="Number of records to keep in output" help="Number of best scoring records to keep"/>
18 <param name="sort_field" type="text" label="Field to sort on" optional="false" help="Name of the field to sort records by">
19 <sanitizer>
20 <valid initial="string.printable">
21 <remove value="&apos;"/>
22 </valid>
23 <mapping initial="none"/>
24 </sanitizer>
25 </param>
26 <param name="name_field" type="text" label="Grouping field name" optional="false" help="Name of the field to group records by (must be sequential)">
27 <sanitizer>
28 <valid initial="string.printable">
29 <remove value="&apos;"/>
30 </valid>
31 <mapping initial="none"/>
32 </sanitizer>
33 </param>
34 <param name="descending" type="boolean" label="Sort descending" truevalue="-r" falsevalue="" checked="true"
35 help="Generate the name field (first line) for cases where this is empty"/>
36 </inputs>
37 <outputs>
38 <data name="output" format="sdf" label="SDF sort+filter on ${on_string}"/>
39 </outputs>
40 <tests>
41 <test>
42 <param name="input" value="poses.sdf"/>
43 <param name="sort_field" value="TransFSScore"/>
44 <param name="name_field" value="Name"/>
45 <output name="output" file="poses-descending.sdf" ftype="sdf" />
46 </test>
47 <test>
48 <param name="input" value="poses.sdf"/>
49 <param name="sort_field" value="TransFSScore"/>
50 <param name="name_field" value="Name"/>
51 <param name="descending" value="False"/>
52 <output name="output" file="poses-ascending.sdf" ftype="sdf" />
53 </test>
54 </tests>
55 <help><![CDATA[
56
57 .. class:: infomark
58
59 This tool sorts and filters SD files using the sdsort and sdfilter tools from the rDock suite.
60 See http://rdock.sourceforge.net/ for more details about rDock and associated programs.
61 The expected use is for filtering and sorting virtual screening results such as docking.
62
63 -----
64
65 .. class:: infomark
66
67 **Inputs**
68 An SD-file, together with names of fields to sort and group records by, and the number of records to appear in the output.
69 The sorting is performed on groups of molecules, with the group being identified by a field in the SDF (the name_field
70 parameter). Records from a group MUST be sequential.
71 The records within each group are sorted by the value of a field in the SDF (the sort_field parameter) and you can
72 specify ascending or descending order (the descending parameter).
73 Finally a number of top scoring (the top parameter, typically having a value of 1) are written to the output.
74
75 -----
76
77 .. class:: infomark
78
79 **Outputs**
80 An SD-file, containing molecules filtered by the field specified.
81
82 ]]></help>
83 <expand macro="citations"/>
84 </tool>