changeset 10:f707c2fb725b draft

"planemo upload for repository https://forgemia.inra.fr/redelac commit af2d1fcb63a2ae897e02f11e82cc76c4f6e8ca5e"
author siwaa
date Mon, 02 Oct 2023 13:49:57 +0000
parents 2a6d7d053ba7
children 423950cd59cb
files redelacSticsInputGenerator.R redelacSticsInputGenerator.bash redelacSticsInputGenerator.xml
diffstat 3 files changed, 31 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/redelacSticsInputGenerator.R	Mon Sep 25 16:25:51 2023 +0000
+++ b/redelacSticsInputGenerator.R	Mon Oct 02 13:49:57 2023 +0000
@@ -190,3 +190,4 @@
   lubridate::hour(durGenTP),
   lubridate::minute(durGenTP),
   lubridate::second(durGenTP))
+print("===================================================================================")
--- a/redelacSticsInputGenerator.bash	Mon Sep 25 16:25:51 2023 +0000
+++ b/redelacSticsInputGenerator.bash	Mon Oct 02 13:49:57 2023 +0000
@@ -6,15 +6,31 @@
 mv TMP/* JavaSTICS-1.5.1-STICS-10.0.0/WS &&
 cp JavaSTICS-1.5.1-STICS-10.0.0/config/param_gen.xml JavaSTICS-1.5.1-STICS-10.0.0/WS &&
 cp JavaSTICS-1.5.1-STICS-10.0.0/config/param_newform.xml JavaSTICS-1.5.1-STICS-10.0.0/WS &&
-unzip -q $6 -d TMPbis &&
+/usr/bin/time -p -o ./bashlog unzip -q $6 -d TMPbis &&
+echo "Step 0, time to unzip the Workspace:" &&
+echo "====================================" && 
+cat ./bashlog &&
+echo "====================================" && 
 mv TMPbis/*/* JavaSTICS-1.5.1-STICS-10.0.0/WS &&
 cp $7 JavaSTICS-1.5.1-STICS-10.0.0/WS/USMs.csv &&
 cp $8 JavaSTICS-1.5.1-STICS-10.0.0/WS/Tec.csv &&
 cp $9 JavaSTICS-1.5.1-STICS-10.0.0/WS/Ini.csv &&
 cp ${10} JavaSTICS-1.5.1-STICS-10.0.0/WS/Station.csv &&
 cd JavaSTICS-1.5.1-STICS-10.0.0 &&
-Rscript --verbose $4/redelacSticsInputGenerator.R $1 $2 $3 &&
+if [[ "$11" != "noAdditionalPlantOrConfig" ]]
+then
+   unzip -o ${10}
+fi
+/usr/bin/time -p -o ./bashlog Rscript --verbose $4/redelacSticsInputGenerator.R $1 $2 $3 &&
+echo "Step 1, time to run the R script:" &&
+echo "=================================" && 
+cat ./bashlog &&
+echo "=================================" && 
 rm WS/1* &&
 mv WS $WSname &&
-zip -q -r $WSname $WSname &&
-cp $WSname.zip ${11}
+/usr/bin/time -p -o ./bashlog zip -q -r $WSname $WSname &&
+echo "Step 2, time to zip the Workspace:" &&
+echo "==================================" && 
+cat ./bashlog &&
+echo "==================================" && 
+cp $WSname.zip ${12}
--- a/redelacSticsInputGenerator.xml	Mon Sep 25 16:25:51 2023 +0000
+++ b/redelacSticsInputGenerator.xml	Mon Oct 02 13:49:57 2023 +0000
@@ -1,16 +1,21 @@
-<tool id="redelacSticsInputGenerator" name="redelacSticsInputGenerator" version="1.0.4">
+<tool id="redelacSticsInputGenerator" name="redelacSticsInputGenerator" version="1.0.5">
   <description>to run generate Stics Inputs for REDELAC</description>
   <requirements>
-    <container type="singularity">docker://registry.forgemia.inra.fr/redelac/redelac-toolbox/sticsrpacks:b782e0b7ce3af7e7a14a87ea750145ed1c2595a0</container>
+    <container type="singularity">docker://registry.forgemia.inra.fr/redelac/redelac-toolbox/sticsrpacks:69b14ab2616cfea4afc36e6974d66e12ac20480b</container>
   </requirements>
   <command detect_errors="aggressive">
     <![CDATA[
+	     #if $additional:
+                additional=${additional} &&
+	     #else
+                additional=noAdditionalPlantOrConfig &&
+             #end if
 	     #if str( $IterUsmX.IterUsmX ) == 'usmx_one_after_other':
                 parallel=${$IterUsmX.parallel} &&
              #else
                 parallel=parallel &&
              #end if
-	        bash $__tool_directory__/redelacSticsInputGenerator.bash ${IterUsmX.IterUsmX} \${parallel} \${GALAXY_SLOTS:-4} $__tool_directory__ ${Workspace} ${Climat} ${USMs} ${Tec} ${Ini} ${Station} ${GeneratedWorkspace}
+	        bash $__tool_directory__/redelacSticsInputGenerator.bash ${IterUsmX.IterUsmX} \${parallel} \${GALAXY_SLOTS:-4} $__tool_directory__ ${Workspace} ${Climat} ${USMs} ${Tec} ${Ini} ${Station} \${additional} ${GeneratedWorkspace}
      ]]>
   </command>
   <inputs>
@@ -20,7 +25,7 @@
     <param name="Tec" type="data" format="csv" label="Select the Tec sheet (csv)"/>
     <param name="Ini" type="data" format="csv" label="Select the Ini sheet (csv)"/>
     <param name="Station" type="data" format="csv" label="Select the Station sheet (csv)"/>
-    <param name="Tag" type="text" value="" label="Outputs tag"/>
+    <param name="additional" type="data" optional="true" format="zip" label="[optional] Select a zipped archive with folder plant (and or) config (zip file)"/>    
     <conditional name="IterUsmX">
       <param name="IterUsmX" type="boolean" checked="true" truevalue="usmx_one_after_other" falsevalue="usmx_at_once"/>
       <when value="usmx_one_after_other">
@@ -32,7 +37,7 @@
   </inputs>
   <outputs>
     <data format="zip" name="GeneratedWorkspace"
-          label="GeneratedWorkspace${Tag}">
+          label="GeneratedWorkspace$">
     </data>
   </outputs>
   <tests>