Mercurial > repos > tduigou > rptools_rpcompletion
changeset 5:ec5e25d1a3f1 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rptools commit e6166111b59ed3077aef629dbd7b404f27896311-dirty
author | tduigou |
---|---|
date | Wed, 22 Oct 2025 12:03:06 +0000 |
parents | e59d28e31f88 |
children | 64ccaeec8554 |
files | macros.xml rpcompletion.xml |
diffstat | 2 files changed, 65 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Wed Jul 24 08:42:16 2024 +0000 +++ b/macros.xml Wed Oct 22 12:03:06 2025 +0000 @@ -1,15 +1,15 @@ <macros> - <token name="@TOOL_VERSION@">6.5.0</token> + <token name="@TOOL_VERSION@">6.6.6</token> <token name="@VERSION_SUFFIX@">0</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">rptools</requirement> - <yield/> + <yield /> </requirements> </xml> <xml name="creator"> <creator> - <organization name="BioRetroSynth" url="https://github.com/brsynth"/> + <organization name="BioRetroSynth" url="https://github.com/brsynth" /> </creator> </xml> </macros>
--- a/rpcompletion.xml Wed Jul 24 08:42:16 2024 +0000 +++ b/rpcompletion.xml Wed Oct 22 12:03:06 2025 +0000 @@ -1,49 +1,96 @@ -<tool id="rptools_rpcompletion" name="Complete Reactions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> - <description>Completes mono-component reactions output by RetroPath2.0 with the appropriate cofactors</description> +<tool id="rptools_rpcompletion" name="Complete Reactions" + version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> + <description>Completes mono-component reactions output by RetroPath2.0 with the appropriate + cofactors</description> <macros> <import>macros.xml</import> </macros> - <expand macro="requirements"/> + <expand macro="requirements" /> <stdio> <exit_code range="1" level="fatal" description="Could not Xref compartment_id" /> <exit_code range="2" level="fatal" description="ValueError returned" /> + <regex match="Continuing without sink molecule" source="both" level="warning" + description="The sink file is empty or not found" /> </stdio> <command detect_errors="exit_code"><![CDATA[ + #if str($sink.cond) == 'empty' + echo '"Name","InChI"' > empty_sink.csv && + #set sinkfile='empty_sink.csv' + #else + #set sinkfile=$sink.sinkfile + #end if python -m rptools.rpcompletion '$rp2_pathways' - '$sink' + $sinkfile '$rp2paths_compounds' '$rp2paths_pathways' completed_pathways --upper_flux_bound '$adv.upper_flux_bound' --lower_flux_bound '$adv.lower_flux_bound' --max_subpaths_filter '$adv.max_subpaths_filter' - --cache-dir "\${TMPDIR:-.}" + --chemical-space '$adv.chemical_space' + #if $adv.cofile + --cofactors '$adv.cofile' + #end if + #if not $sink.error_codes + --silent + #end if ]]></command> <inputs> <param name="rp2paths_pathways" type="data" format="csv" label="RP2paths pathways" /> <param name="rp2paths_compounds" type="data" format="tabular" label="RP2paths compounds" /> <param name="rp2_pathways" type="data" format="csv" label="RetroPath2.0 metabolic network" /> - <param name="sink" type="data" format="csv" label="Sink from SBML" /> + <conditional name="sink"> + <param name="cond" type="select" label="Empty sink"> + <option value="provided" selected="True">Provided</option> + <option value="empty">Empty</option> + </param> + <when value="provided"> + <param name="sinkfile" type="data" format="csv" label="Sink File" + help="Sink file which comprises all compounds that are considered as granted in your system." /> + <param name="error_codes" type="boolean" checked="true" + label="Return error codes" /> + </when> + <when value="empty"> + <param name="error_codes" type="boolean" checked="false" + label="Return error codes" /> + </when> + </conditional> <section name="adv" title="Advanced Options" expanded="false"> - <param argument="max_subpaths_filter" type="integer" value="10" min="1" max="1000" label="Max subpaths generated per pathway" help="Maximal number of subpaths to be created per master pathway." /> - <param argument="upper_flux_bound" type="integer" value="10000" min="-10000" max="10000" label="Upper flux bound" help="Upper flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created." /> - <param argument="lower_flux_bound" type="integer" value="-10000" min="-10000" max="10000" label="Lower flux bound" help="Lower flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created." /> + <param argument="max_subpaths_filter" type="integer" value="10" min="0" + label="Max subpaths generated per pathway" + help="Maximal number of subpaths to be created per master pathway." /> + <param argument="upper_flux_bound" type="integer" value="10000" min="-10000" max="10000" + label="Upper flux bound" + help="Upper flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created." /> + <param argument="lower_flux_bound" type="integer" value="-10000" min="-10000" + max="10000" label="Lower flux bound" + help="Lower flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created." /> + <param name="chemical_space" type="select" label="Chemical space"> + <option value="mnx4.4" selected="True">mnx4.4</option> + <option value="mnx3.1">mnx3.1</option> + </param> + <param name="cofile" type="data" format="txt,tsv,tabular" optional="True" + label="Cofactor file" /> </section> </inputs> <outputs> <collection name="pathways" type="list" label="${tool.name}"> - <discover_datasets pattern="(?P<designation>.+)\.xml" format="xml" directory="completed_pathways" visible="false" /> + <discover_datasets pattern="(?P<designation>.+)\.xml" format="xml" + directory="completed_pathways" visible="false" /> </collection> </outputs> <tests> <test> - <!-- test 1: check if outputs are represented in an expected number --> + <!-- test 1: check if outputs are represented in an expected number --> <param name="rp2paths_pathways" value="4-rp2paths_pathways.csv" /> <param name="rp2paths_compounds" value="3-rp2paths_compounds.tsv" /> <param name="rp2_pathways" value="1-rp2_metnet.csv" /> - <param name="sink" value="2-sink.csv" /> - <output_collection name="pathways" type="list" count="10"/> + <conditional name="sink"> + <param name="cond" value="provided" /> + <param name="sinkfile" value="2-sink.csv" /> + </conditional> + <output_collection name="pathways" type="list" count="10" /> </test> </tests> <help><![CDATA[ @@ -52,29 +99,13 @@ Completes mono-component reactions output by `RetroPath2.0 <https://www.doi.org/10.1016/j.ymben.2017.12.002>`_ with the appropriate cofactors. Creates sub-paths when multiple reaction rules are associated with a single reaction. Input is a single pathways file produced by RP2Paths. It stands on rpCache which store pre-computed data. -Input ------ - -Required: - -* **RetroPath2.0 metabolic network**: RetroPath2.0 pathways file -* **Sink from SBML**: rpextractsink file containing infos on molecules in the sink -* **RP2paths compounds**: rp2paths compounds file -* **RP2paths pathways**: rp2paths pathways file - -Advanced options: - -* **Upper flux bound**: (integer, default=9999) Upper flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created. -* **Lower flux bound**: (integer, default=0) Lower flux bound value to be used in outputted SBML models (fbc SBML package) for new reactions created. -* **Max subpaths generated per pathway**: (integer, default=10, 0=nofilter) Maximal number of subpaths to be created per master pathway. - Output ------ * **pathways**: SBML completed pathways ]]></help> - <expand macro="creator"/> + <expand macro="creator" /> <citations> <citation type="doi">10.1038/s41467-022-32661-x</citation> </citations> -</tool> +</tool> \ No newline at end of file