changeset 1:d7b6ff32d072 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/obisindicators commit d1d3e8640457c30349b842ea05de64b9312890f4
author ecology
date Wed, 25 Jan 2023 16:01:52 +0000
parents 1015a0070bac
children 01e08ae72a98
files macro.xml obisindicators.r obisindicators.xml
diffstat 3 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/macro.xml	Thu Dec 29 13:05:04 2022 +0000
+++ b/macro.xml	Wed Jan 25 16:01:52 2023 +0000
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@VERSION@">0.0.1</token>
+    <token name="@VERSION@">0.0.2</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="4.2.2">r-base</requirement>
--- a/obisindicators.r	Thu Dec 29 13:05:04 2022 +0000
+++ b/obisindicators.r	Wed Jan 25 16:01:52 2023 +0000
@@ -32,9 +32,10 @@
     spe <- as.numeric(args[6])
     rec <- as.numeric(args[7])
     crs <- as.numeric(args[8])
-    source(args[9])
+    reso <- as.numeric(args[9])
     source(args[10])
     source(args[11])
+    source(args[12])
 }
 
 if (hr == "false") {
@@ -63,7 +64,7 @@
 #Create a discrete global grid
 #Create an ISEA discrete global grid of resolution 9 using the dggridR package:
 
-dggs <- dggridR::dgconstruct(projection = "ISEA", topology = "HEXAGON", res = 9)
+dggs <- dggridR::dgconstruct(projection = "ISEA", topology = "HEXAGON", res = reso)
 
 #Then assign cell numbers to the occurrence data
 occ$cell <- dggridR::dgGEO_to_SEQNUM(dggs, occ$decimalLongitude, occ$decimalLatitude)[["seqnum"]]
--- a/obisindicators.xml	Thu Dec 29 13:05:04 2022 +0000
+++ b/obisindicators.xml	Wed Jan 25 16:01:52 2023 +0000
@@ -31,6 +31,7 @@
             '$species'
             '$records'
             '$type'
+            '$resolution'
             '$__tool_directory__/analyze.r'
             '$__tool_directory__/visualize.r'
             '$__tool_directory__/data.r'
@@ -41,8 +42,8 @@
     <inputs>
         <expand macro="SRS_input"/>
         <param name="separator" type="select" display="radio" label="What character is the separator in your data? (Mostlikely a comma for a csv file and t for a tabular)">
+            <option value="t">Tabulator (\t)</option>                 
             <option value=",">Comma (,)</option>  
-            <option value="t">Tabulator (\t)</option>     
         </param> 
         <param name="longitude" label="Select column containing the decimal value of the longitude " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
         <param name="latitude" label="Select column containing the decimal value of the latitude " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
@@ -52,6 +53,7 @@
             <option value="0">Robinson projection</option>
             <option value="4326">Geographic projection</option>
         </param>
+        <param name="resolution" label="Write a number between 1 and 30" type="text" data_ref="input" help="We strongly advise to stay below 15 or else you won't see a thing. The bigger your dataset is the smaller the resolution should be."/>
     </inputs>
     <outputs>
         <data name="output_index" from_work_dir="Index.csv" format="csv" label="Index">
@@ -70,6 +72,7 @@
             <param name="species" value="c3: species"/>
             <param name="records" value="c5: records"/>
             <param name="type" value="0"/>
+            <param name="resolution" value="9"/>
             <output name="output_index" value="Index.csv"/>
             <output_collection name="plots" type="list" count="5">
                 <element name="ES_50" ftype="png">