diff addLayer.xml @ 0:0decc57edb57 draft

planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/ogs/ commit 8d522c2d14b28a4df096a5a13cd800bbf086f09f
author ufz
date Thu, 06 Mar 2025 17:29:05 +0000
parents
children f14ae821c3ac
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/addLayer.xml	Thu Mar 06 17:29:05 2025 +0000
@@ -0,0 +1,73 @@
+<tool id="ogs_addlayer" name="OGS addLayer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>
+        Adds a layer to an existing mesh
+    </description>
+    <macros>
+        <import>macros.xml</import>
+        <token name="@VERSION_SUFFIX@">0</token>
+    </macros>
+    <requirements>
+        <expand macro="ogs_requirement"/>
+    </requirements>
+    <expand macro="creator"/>
+    <command detect_errors="exit_code"><![CDATA[
+        ln -s '$input_mesh' input.vtu &&
+        AddLayer -i input.vtu -o output.vtu -t '$layer_thickness'
+        $add_layer_on_bottom
+        #if str($material_option.material_id) == "copy":
+            --copy-material-ids
+        #elif str($material_option.material_id) == "set":
+            --set-material-id $material_option.set_material_id
+        #end if
+        
+    ]]></command>
+    <inputs> 
+        <param name="input_mesh" type="data" format="vtkxml" label="Input Mesh File" argument="-i"/>
+        <param name="layer_thickness" type="float" label="Layer Thickness" argument="-t"/>
+        <param name="add_layer_on_bottom" type="boolean" value="false" truevalue="--add-layer-on-bottom" falsevalue="" label="Add Layer To Bottom"/>
+         <conditional name="material_option">
+            <param name="material_id" type="select" label="Material ID Option">
+                <option value="none">Leave as it is</option>
+                <option value="copy">Copy existing material IDs</option>
+                <option value="set">Set a specific material ID</option>
+            </param>
+            <when value="none"/>
+            <when value="copy"/>
+            <when value="set">
+                <param name="set_material_id" type="integer" label="Set Material IDs"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="output_mesh" format="vtkxml" from_work_dir="output.vtu" />
+    </outputs>
+    <tests>
+    <test>
+        <param name="input_mesh" value="tm_a_quad.vtu"/>
+        <param name="layer_thickness" value="15.0"/>
+        <param name="add_layer_on_bottom" value="false"/>
+        <param name="material_option|material_id" value="set"/>
+        <param name="material_option|set_material_id" value="1"/>
+        <output name="output_mesh" value="tm_a_quad_with_extra_layer.vtu"/>
+    </test>
+</tests>
+    <help><![CDATA[
+        **Overview:**
+
+            This Galaxy tool adds a new layer to an existing mesh using the OpenGeoSys library. It processes meshes in the VTU (Visualization Toolkit Unstructured Grid) format.
+       
+        **Inputs:**
+
+            1. **Input Mesh File (`input_mesh`)**  The VTU file containing the existing mesh to which a new layer will be added.  
+            2. **Layer Thickness (`layer_thickness`)**  Specifies the thickness of the new layer to be added. The default value is `10.0`.  
+            3. **Add Layer to Bottom (`add_layer_on_bottom`)**  If selected, the layer is added to the bottom of the mesh. Otherwise, it is added to the top.  
+            4. **Material ID Option (`material_option`)**  Determines how material IDs for the new layer are managed:
+                - `Copy`: Copies existing material IDs to the new layer.  
+                - `Set`: Sets a specific material ID for the new layer.  
+
+        **Outputs:**
+
+            **Output Mesh File (`output_mesh`)**  The resulting mesh file in VTU format with the added layer.  
+    ]]></help>
+    <expand macro="ogs_citation"/>
+</tool>