view gama_legacy_gen.xml @ 11:770e0dde4735 draft default tip

planemo upload for repository https://forgemia.inra.fr/nathalie.rousse/use/-/tree/gama/GAMA_HEADLESS_LEGACY/galaxy-tools/gama_legacy_gen commit 8731d8cb947d6b7b65eb0fde51a4b0f44c2f4406-dirty
author siwaa
date Fri, 20 Dec 2024 23:16:10 +0000
parents f57ea38d67c5
children
line wrap: on
line source

<tool id="gama_legacy_gen" name="gama_legacy_gen" version="1.0.0">

  <description>tool generating XML file from GAML file</description>

  <requirements>

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

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

  <command detect_errors="aggressive">
    <![CDATA[
    mkdir -p software; mkdir -p inputs; mkdir -p outputs;
    cp $__tool_directory__/src/MY_gama-headless.sh .;
    cp $__tool_directory__/src/cmd_gama_headless_legacy_gen.sh .;
    cp ${model_gaml} inputs/model.gaml;
    cp -fr /opt/gama-platform software/.;
    cp MY_gama-headless.sh software/gama-platform/headless/. ;
    chmod -R 777 software;
    /bin/bash cmd_gama_headless_legacy_gen.sh ${experiment_name} > outputs/GEN.txt;
    xmlstarlet edit --inplace --update "//Simulation/@sourcePath" --value "model.gaml" outputs/file.xml;
    cp outputs/file.xml ${file_xml};
    ]]>
  </command>

  <inputs>

    <param name="experiment_name" optional="false" type="text"
           value="prey_predator"
           label="experiment_name"
           help="name of an experiment that must exist into gaml file as 'experiment' of type': 'gui'" />

    <param name="model_gaml" optional="false" type="data" format="txt"
           label="GAML model (.gaml format)"/>

  </inputs>

  <outputs>
    <data format="xml" name="file_xml" label="XML file of experiment plan"/>
  </outputs>

  <tests>
  </tests>

  <help><![CDATA[

Desc:

-----

gama_legacy_gen.xml tool, running a GAMA Headless in 'Legacy' mode, generates
the XML file 'file_xml' corresponding with the experiment 'experiment_name'
(of 'type': 'gui') contained into the GAML file 'model_gaml'.

Inputs:

  - experiment_name
  - model_gaml

Outputs:

  - file_xml

Credits:

--------

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

  ]]>
  </help>

</tool>