Mercurial > repos > bgruening > rxdock_sort_filter
diff sort_filter.xml @ 0:475cde209992 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rxdock commit bb19570293b920983b6856b30b42203a09543bc5"
author | bgruening |
---|---|
date | Sat, 04 Apr 2020 15:08:15 -0400 |
parents | |
children | 7be0793dd448 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sort_filter.xml Sat Apr 04 15:08:15 2020 -0400 @@ -0,0 +1,84 @@ +<tool id="rxdock_sort_filter" name="SDF sort and filter" version="0.1.0"> + <description>using the sdsort provided with rxDock</description> + <macros> + <import>rdock_macros.xml</import> + </macros> + <expand macro="requirements"/> + <command><![CDATA[ + +sdsort -n $descending -s -f'$sort_field' -id'$name_field' '$input' | +sdfilter -f'\$_COUNT <= $top' -s'$name_field' | +sdsort -n $descending -f'$sort_field' > '$output' + + ]]></command> + + <inputs> + <param type="data" name="input" format="sdf" label="Molecules" help="Molecules in SDF format"/> + <param name="top" type="integer" value="1" label="Number of records to keep in output" help="Number of best scoring records to keep"/> + <param name="sort_field" type="text" label="Field to sort on" optional="false" help="Name of the field to sort records by"> + <sanitizer> + <valid initial="string.printable"> + <remove value="'"/> + </valid> + <mapping initial="none"/> + </sanitizer> + </param> + <param name="name_field" type="text" label="Grouping field name" optional="false" help="Name of the field to group records by (must be sequential)"> + <sanitizer> + <valid initial="string.printable"> + <remove value="'"/> + </valid> + <mapping initial="none"/> + </sanitizer> + </param> + <param name="descending" type="boolean" label="Sort descending" truevalue="-r" falsevalue="" checked="true" + help="Generate the name field (first line) for cases where this is empty"/> + </inputs> + <outputs> + <data name="output" format="sdf" label="SDF sort+filter on ${on_string}"/> + </outputs> + <tests> + <test> + <param name="input" value="poses.sdf"/> + <param name="sort_field" value="TransFSScore"/> + <param name="name_field" value="Name"/> + <output name="output" file="poses-descending.sdf" ftype="sdf" /> + </test> + <test> + <param name="input" value="poses.sdf"/> + <param name="sort_field" value="TransFSScore"/> + <param name="name_field" value="Name"/> + <param name="descending" value="False"/> + <output name="output" file="poses-ascending.sdf" ftype="sdf" /> + </test> + </tests> + <help><![CDATA[ + +.. class:: infomark + +This tool sorts and filters SD files using the sdsort and sdfilter tools from the rxDock suite. +See https://www.rxdock.org for more details about rxDock and associated programs. +The expected use is for filtering and sorting virtual screening results such as docking. + +----- + +.. class:: infomark + +**Inputs** +An SD-file, together with names of fields to sort and group records by, and the number of records to appear in the output. +The sorting is performed on groups of molecules, with the group being identified by a field in the SDF (the name_field +parameter). Records from a group MUST be sequential. +The records within each group are sorted by the value of a field in the SDF (the sort_field parameter) and you can +specify ascending or descending order (the descending parameter). +Finally a number of top scoring (the top parameter, typically having a value of 1) are written to the output. + +----- + +.. class:: infomark + +**Outputs** +An SD-file, containing molecules filtered by the field specified. + + ]]></help> + <expand macro="citations"/> +</tool>