changeset 1:f11879f7b554 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/Ecoregionalization_workflow commit ced658540f05bb07e1e687af30a3fa4ea8e4803c
author ecology
date Wed, 28 May 2025 10:13:34 +0000
parents adeb719a267f
children 8ac53593cef6
files brt.R claraguess.xml
diffstat 2 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/brt.R	Wed May 14 13:49:38 2025 +0000
+++ b/brt.R	Wed May 28 10:13:34 2025 +0000
@@ -21,8 +21,8 @@
     enviro <- args[1]
     species_files <- args[2]
     abio_para <- args[3]
-    dec_env <- args[8]
-    dec_species <- args[9]
+    dec_env <- ifelse(args[8]=="Dot", ".", ",")
+    dec_species <- ifelse(args[9]=="Dot", ".", ",")
 }
 
 ### load data
--- a/claraguess.xml	Wed May 14 13:49:38 2025 +0000
+++ b/claraguess.xml	Wed May 28 10:13:34 2025 +0000
@@ -1,4 +1,4 @@
-<tool id="ClaraGuess" name="Clara Estimate and Clustering" version="0.1.1" profile="23.2">
+<tool id="ClaraGuess" name="Clara Estimate and Clustering" version="0.1.2" profile="23.2">
     <description>Environmental clustering using CLARA and BRT predictions</description>
 
     <requirements>
@@ -17,10 +17,14 @@
     '$k'
     '$metric'
     '$samples'
-    '$output1'
-    '$output2'
-    '$output3'
-    '$output4'
+    '$data_cluster'
+    '$silhouette_plot'
+#if str($type) == "auto":
+    '$sih_scores'
+#else:
+    'NA'
+#end if
+    '$clustered_taxas_env'
     ]]></command>
 
     <inputs>
@@ -45,14 +49,16 @@
     </inputs>
 
     <outputs>
-        <data name="output1" from_work_dir="data_cluster.tabular" format="tabular" label="Cluster assignments (lat, long, cluster)"/>
-        <data name="output2" from_work_dir="silhouette_plot.png" format="png" label="Silhouette Index Plot"/>
-        <data name="output3" from_work_dir="sih_scores.png" format="png" label="Silhouette Plot"/>
-        <data name="output4" from_work_dir="clustered_taxas_env.tabular" format="tabular" label="Environment + Clustered Data"/>
+        <data name="data_cluster" from_work_dir="data_cluster.tabular" format="tabular" label="Cluster assignments (lat, long, cluster)"/>
+        <data name="silhouette_plot" from_work_dir="silhouette_plot.png" format="png" label="Silhouette Index Plot"/>
+        <data name="sih_scores" from_work_dir="sih_scores.png" format="png" label="Silhouette Plot">
+            <filter>type == "auto"</filter>
+        </data>
+        <data name="clustered_taxas_env" from_work_dir="clustered_taxas_env.tabular" format="tabular" label="Environment + Clustered Data"/>
     </outputs>
 
     <tests>
-        <test>
+        <test expect_num_outputs="3">
             <param name="enviro" value="enviro.tabular"/>
             <param name="preds" value="preds.tabular"/>
             <param name="taxas" value="taxas.tabular"/>
@@ -61,33 +67,27 @@
             <param name="metric" value="manhattan"/>
             <param name="samples" value="10"/>
 
-            <output name="output1">
+            <output name="data_cluster">
                 <assert_contents>
                     <has_line_matching expression="^lat\tlong\tcluster$"/>
                     <has_n_columns n="3"/>
                 </assert_contents>
             </output>
 
-            <output name="output2">
+            <output name="silhouette_plot">
                 <assert_contents>
                     <has_size value="8400" delta="600"/>
                 </assert_contents>
             </output>
 
-            <output name="output3">
-                <assert_contents>
-                    <has_size value="0"/>
-                </assert_contents>
-            </output>
-
-            <output name="output4">
+            <output name="clustered_taxas_env">
                 <assert_contents>
                     <has_line_matching expression="^lat\tlong\tcluster.*$"/>
                 </assert_contents>
             </output>
         </test>
 
-        <test>
+        <test expect_num_outputs="4">
             <param name="enviro" value="enviro.tabular"/>
             <param name="preds" value="preds.tabular"/>
             <param name="taxas" value="taxas.tabular"/>
@@ -96,26 +96,26 @@
             <param name="metric" value="manhattan"/>
             <param name="samples" value="10"/>
 
-            <output name="output1">
+            <output name="data_cluster">
                 <assert_contents>
                     <has_line_matching expression="^lat\tlong\tcluster$"/>
                     <has_n_columns n="3"/>
                 </assert_contents>
             </output>
 
-            <output name="output2">
+            <output name="silhouette_plot">
                 <assert_contents>
                     <has_size value="8400" delta="600"/>
                 </assert_contents>
             </output>
 
-            <output name="output3">
+            <output name="sih_scores">
                 <assert_contents>
                     <has_size value="6918" delta="600"/>
                 </assert_contents>
             </output>
 
-            <output name="output4">
+            <output name="clustered_taxas_env">
                 <assert_contents>
                     <has_line_matching expression="^lat\tlong\tcluster.*$"/>
                 </assert_contents>
@@ -186,4 +186,4 @@
         <citation type="doi">10.32614/CRAN.package.cluster</citation>
         <citation type="doi">10.32614/CRAN.package.tidyverse</citation>
     </citations>
-</tool>
\ No newline at end of file
+</tool>