Mercurial > repos > bgruening > rxdock_rbdock
changeset 1:07309bad01df draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rxdock commit e9c627440028cfd2c743462927672e0c5e3576aa"
author | bgruening |
---|---|
date | Sat, 25 Apr 2020 08:58:20 -0400 |
parents | 35ee2e002bb0 |
children | 6fe6b0e10ed6 |
files | rbdock.xml rdock_macros.xml rxdock_macros.xml test-data/receptor.prm test-data/wrong_receptor.prm |
diffstat | 5 files changed, 86 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/rbdock.xml Sat Apr 04 15:00:22 2020 -0400 +++ b/rbdock.xml Sat Apr 25 08:58:20 2020 -0400 @@ -1,13 +1,21 @@ -<tool id="rxdock_rbdock" name="rxDock docking" version="0.1.3" profile="19.01"> +<tool id="rxdock_rbdock" name="rxDock docking" version="0.1.4" profile="19.01"> <description>- perform protein-ligand docking with rxDock</description> <macros> - <import>rdock_macros.xml</import> + <import>rxdock_macros.xml</import> </macros> <expand macro="requirements"/> <command><![CDATA[ ln -s '$active_site' receptor.as && ln -s '$receptor' receptor.mol2 && -ln -s $receptor_prm receptor.prm && + +#if $custom_rec.custom_rec_select == 'true': + ## simple check that the receptor file name is correct + grep -q 'RECEPTOR_FILE receptor.mol2' $custom_rec.prm_file || (echo "Error: a custom receptor.prm file must contain the line 'RECEPTOR_FILE receptor.mol2'" >&2 && exit 1) && + ln -s '$custom_rec.prm_file' receptor.prm && +#else + ln -s '$receptor_prm' receptor.prm && +#end if + #if $name == 'Y': sdmodify -f_REC '$ligands' > ligands.sdf && #else @@ -42,7 +50,9 @@ <configfiles> <configfile name="receptor_prm">RBT_PARAMETER_FILE_V1.00 RECEPTOR_FILE receptor.mol2 -RECEPTOR_FLEX 3.0 +#if $custom_rec.custom_rec_select == 'false': +RECEPTOR_FLEX $custom_rec.flex +#end if </configfile> </configfiles> @@ -50,6 +60,19 @@ <param type="data" name="receptor" format="mol2" label="Receptor" help="Select a receptor (mol2 format)."/> <param type="data" name="active_site" format="rdock_as" label="Active site" help="Active site file"/> <param type="data" name="ligands" format="sdf,mol" label="Ligands" help="Ligands in SDF format (or single ligand in MOL format)"/> + <conditional name="custom_rec"> + <param name="custom_rec_select" type="select" label="Use a custom receptor.prm file?" help="Useful for more advanced use-cases, such as tethered docking."> + <option value="true">Use custom receptor.prm file</option> + <option value="false" selected="true">Use default options (no user upload required)</option> + </param> + <when value="true"> + <param type="data" name="prm_file" format="txt" label="Receptor prm file" help="Note the file must contain the line 'RECEPTOR_FILE receptor.mol2', else the tool will fail."/> + </when> + <when value="false"> + <param name="flex" type="float" value="3.0" min="0.0" label="Receptor flex" help="Value for RECEPTOR_FLEX (default 3)"/> + </when> + </conditional> + <param name="num" type="integer" value="10" label="Number of dockings" help="Number of poses to generate"/> <conditional name="filter"> <param name="filter_select" type="select" label="Filter the docking results" help="Using sdfilter"> @@ -80,6 +103,7 @@ <param name="ligands" value="broken_ligand.sdf"/> <param name="active_site" value="receptor.as"/> <param name="num" value="3"/> + <param name="flex" value="3"/> <param name="seed" value="3"/> <conditional name="filter"> <param name="filter_select" value="filter"/> @@ -92,6 +116,7 @@ <param name="ligands" value="ligands_names.sdf"/> <param name="active_site" value="receptor.as"/> <param name="num" value="3"/> + <param name="flex" value="3"/> <param name="seed" value="3"/> <conditional name="filter"> <param name="filter_select" value="filter"/> @@ -110,6 +135,7 @@ <param name="ligands" value="ligands_nonames.sdf"/> <param name="active_site" value="receptor.as"/> <param name="num" value="3"/> + <param name="flex" value="3"/> <param name="seed" value="3"/> <conditional name="filter"> <param name="filter_select" value="filter"/> @@ -129,6 +155,7 @@ <param name="ligands" value="ligands_nonames.sdf"/> <param name="active_site" value="receptor.as"/> <param name="num" value="3"/> + <param name="flex" value="3"/> <param name="seed" value="3"/> <conditional name="filter"> <param name="filter_select" value="no_filter"/> @@ -146,6 +173,7 @@ <param name="ligands" value="ligands_names.sdf"/> <param name="active_site" value="receptor.as"/> <param name="num" value="1"/> + <param name="flex" value="3"/> <param name="seed" value="3"/> <conditional name="filter"> <param name="filter_select" value="filter"/> @@ -160,6 +188,42 @@ </assert_contents> </output> </test> + <!-- test with custom receptor.prm --> + <test> + <param name="receptor" value="receptor.mol2"/> + <param name="ligands" value="ligands_names.sdf"/> + <param name="active_site" value="receptor.as"/> + <param name="custom_rec_select" value="true"/> + <param name="prm_file" value="receptor.prm"/> + <param name="num" value="1"/> + <param name="seed" value="3"/> + <conditional name="filter"> + <param name="filter_select" value="filter"/> + <param name="score" value="10"/> + <param name="nscore" value="1"/> + </conditional> + <param name="name"/> + <output name="output"> + <assert_contents> + <has_text text="Rbt.Current_Directory"/> + <has_n_lines n="355"/> + </assert_contents> + </output> + </test> + <!-- test with custom but broken receptor.prm --> + <test expect_failure="true" expect_exit_code="1"> + <param name="receptor" value="receptor.mol2"/> + <param name="ligands" value="ligands_names.sdf"/> + <param name="active_site" value="receptor.as"/> + <param name="custom_rec_select" value="true"/> + <param name="prm_file" value="wrong_receptor.prm"/> + <param name="num" value="1"/> + <param name="seed" value="3"/> + <conditional name="filter"> + <param name="filter_select" value="no_filter"/> + </conditional> + <param name="name"/> + </test> </tests> <help><![CDATA[
--- a/rdock_macros.xml Sat Apr 04 15:00:22 2020 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -<macros> - <xml name="citations"> - <citations> - <citation type="doi">10.1371/journal.pcbi.1003571</citation> - </citations> - </xml> - <xml name="requirements"> - <requirements> - <requirement type="package" version="2013.1.0_b93747f3">rxdock</requirement> - </requirements> - </xml> -</macros>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rxdock_macros.xml Sat Apr 25 08:58:20 2020 -0400 @@ -0,0 +1,12 @@ +<macros> + <xml name="citations"> + <citations> + <citation type="doi">10.1371/journal.pcbi.1003571</citation> + </citations> + </xml> + <xml name="requirements"> + <requirements> + <requirement type="package" version="2013.1.0_b93747f3">rxdock</requirement> + </requirements> + </xml> +</macros>