view gama_tool.xml @ 0:f895e266b37a draft

planemo upload for repository https://forgemia.inra.fr/nathalie.rousse/use/-/tree/gama/GAMA/galaxy-tools commit 67d85c013c62c16392b4796af86836b1334f2eef
author siwaa
date Tue, 04 Jun 2024 15:18:01 +0000
parents
children d203e560a4ef
line wrap: on
line source

<tool id="gama_tool" name="gama" version="1.0.0">

  <description>tool for GAMA Platform</description>

  <requirements>

    <!-- singularity -->
    <container type="singularity">oras://registry.forgemia.inra.fr/nathalie.rousse/use/gama:d01c3645810b3e5bf1b21170fd24d21fe1f831ec</container>

    <!-- image locale 
    <container type="singularity">/home/nrousse/workspace_git/SIWAA_regroup/USE_branch_gama/use/GAMA/containers/gama.simg</container -->
  </requirements>

  <command detect_errors="aggressive">
    <![CDATA[
    cp -fr /opt/gama-platform .;
    cp $__tool_directory__/src/MY_predatorPrey.gaml gama-platform/headless/samples/predatorPrey/.;
    cp $__tool_directory__/src/MY_gama-headless.sh gama-platform/headless/.;
    cp $__tool_directory__/src/MY_sequential_example.py .;
    cp $__tool_directory__/src/cmd_gama_headless.sh .;
    cp $__tool_directory__/src/cmd_python_client.sh .;
    /bin/bash cmd_gama_headless.sh > run_server.txt & sleep 20 && /bin/bash cmd_python_client.sh $nb_preys_init $nb_predators_init $nb_more_steps > run_client.txt;
    cp run_server.txt ${run_server_txt};
    cp run_client.txt ${run_client_txt};
    cp gama-platform/headless/samples/predatorPrey/results.txt ${results_txt};
    ]]>
  </command>

  <inputs>

    <param name="nb_preys_init" optional="true" type="integer"
           value="200" min="0" max="1000"
           label="nb_preys_init" help="[0, 1000]" />

    <param name="nb_predators_init" optional="true" type="integer"
           value="20" min="0" max="200"
           label="nb_predators_init" help="[0, 200]" />

    <param name="nb_more_steps" optional="true" type="integer"
           value="10" min="4" max="100"
           label="nb_more_steps" help="[4,100]" />

  </inputs>

  <outputs>
    <data format="txt" name="run_server_txt" label="run_server_txt"/>
    <data format="txt" name="run_client_txt" label="run_client_txt"/>
    <data format="txt" name="results_txt" label="results_txt"/>
  </outputs>

  <tests>
  </tests>

  <help><![CDATA[

Desc:

-----

gama_tool.xml tool running a GAMA Python client interacting with gama-server
(Headless server) concerning a "Predator Prey" agent-based simulator.

Code: MY_sequential_example.py

Inputs:

  - nb_preys_init
  - nb_predators_init
  - nb_more_steps

Outputs:

  - results_txt file (.txt) : produced while running the simulator
    (cf 'reflex save_result' into MY_predatorPrey.gaml).
  - run_server_txt file (.txt) : gama-server screen display capture
  - run_client_txt file (.txt) : gama-client screen display capture

Credits:

--------

-  Author: Nathalie Rousse nathalie.rousse@inrae.fr
-  Copyright: INRAE

  ]]>
  </help>

</tool>