comparison GeoNearestNeighbor.xml @ 0:5cde56683579 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/Ecoregionalization_workflow commit 5d48df67919fbc9d77b98a8243d438c397f61a0e
author ecology
date Thu, 21 Mar 2024 14:05:01 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5cde56683579
1 <tool id="ecoregion_GeoNearestNeighbor" name="GeoNearestNeighbor" version="0.1.0+galaxy0" profile="21.05">
2 <description>Merge two data tables by finding the closest points based on latitude and longitude coordinates (WGS84 projection).</description>
3 <requirements>
4 <requirement type="package" version="4.3.2">r-base</requirement>
5 <requirement type="package" version="1.3.1">r-tidyr</requirement>
6 <requirement type="package" version="1.0_15">r-sf</requirement>
7 <requirement type="package" version="1.1.4">r-dplyr</requirement>
8 </requirements>
9 <command detect_errors="exit_code"><![CDATA[
10 Rscript
11 '$__tool_directory__/GeoNN.R'
12 '$env_file.env'
13 '$env_file.envgeolong'
14 '$env_file.envgeolat'
15 '$occ_file.occ'
16 '$occ_file.occgeolat'
17 '$occ_file.occgeolong'
18 ]]></command>
19 <inputs>
20 <section name="env_file" title="Your environment file (or table 1)" >
21 <param name="env" type="data" format="tabular" label="Input your environment data file (tabular format only)" help="See example below"/>
22 <param name="envgeolat" type="data_column" label="Choose columns where your latitude is in your environment data file." data_ref="env" multiple="false" use_header_names="true"/>
23 <param name="envgeolong" type="data_column" label="Choose columns where your longitude is in your environment data file." data_ref="env" multiple="false" use_header_names="true"/>
24 </section>
25 <section name="occ_file" title="Your occurrence file (or table 2)" >
26 <param name="occ" type="data" format="tabular" label="Input your occurrence data file (tabular format only)" help="See example below"/>
27 <param name="occgeolat" type="data_column" label="Choose columns where your latitude is in your occurrence data file." data_ref="occ" multiple="false" use_header_names="true"/>
28 <param name="occgeolong" type="data_column" label="Choose columns where your longitude is in your occurrence data file." data_ref="occ" multiple="false" use_header_names="true"/>
29 </section>
30 </inputs>
31 <outputs>
32 <data name="occ_env_out" from_work_dir="occurrence_env.tsv" format="tabular" label="Merged table"/>
33 <data name="info_out" from_work_dir="infos_file.tsv" format="tabular" label="Information file"/>
34 </outputs>
35 <tests>
36 <test>
37 <param name="env" value="ceamarc_env.tsv"/>
38 <param name="envgeolat" value="2"/>
39 <param name="envgeolong" value="1"/>
40 <param name="occ" value="fish_wide.tsv"/>
41 <param name="occgeolat" value="1"/>
42 <param name="occgeolong" value="2"/>
43 <output name='occ_env_out'>
44 <assert_contents>
45 <has_size value="2234" delta="50"/>
46 </assert_contents>
47 </output>
48 <output name='info_out'>
49 <assert_contents>
50 <has_n_columns n="3"/>
51 <has_text text="occ_geometry"/>
52 <has_text text="env_geometry"/>
53 <has_text text="Distances (meters)"/>
54 </assert_contents>
55 </output>
56 </test>
57 </tests>
58 <help><![CDATA[
59
60 ==================
61 **What it does ?**
62 ==================
63
64 This Galaxy tool allows you to merge two data tables (tabular format only) according to their latitude and longitude coordinates (in **WGS84** projection), finding the closest points.
65 This tool can be used as part of the Ecoregionalization workflow data preparation that allows you to create ecoregions from occurrence and environmental data.
66
67 ===================
68 **How to use it ?**
69 ===================
70
71 This tool takes in input the environmental data as well as the species occurrence data. See examples of inputs below. These files must be in tabular format. You also need to select the column(s) where your latitude and longitude parameters are located in both files.
72 To be as precise as possible, the latitude and longitude in both files must be of the same precision.
73
74 This tool gives in output two files:
75
76 - Information file conataining the coordinates of occurrence data, the coordinates retains from environemental data and the distances between the two. See example below.
77 - Occurrence and Environement merge file containing occurrence data and environmental data cooresponding. See example below.
78
79 #############################################################
80
81 **Example of occurence data input:**
82 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 +----------+-----------+------------------------+-----------+
84 | lat | long |Acanthorhabdus_fragilis | Acarnidae |
85 +----------+-----------+------------------------+-----------+
86 |-67.22 |139,96 | 0 | 1 |
87 +----------+-----------+------------------------+-----------+
88 |-66,52 | 140 | 0 | 1 |
89 +----------+-----------+------------------------+-----------+
90 | ... | ... | ... | ... |
91 +----------+-----------+------------------------+-----------+
92
93 #############################################################
94
95 **Example of environmental data input:**
96 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97 +------+------+---------+------+--------------+-----+
98 | long | lat | Carbo | Grav | Maxbearing | ... |
99 +------+------+---------+------+--------------+-----+
100 |140.13|-66.7 | 0.88 |28.59 | 3.67 | ... |
101 +------+------+---------+------+--------------+-----+
102 |140 |-66.52| 0.88 |28.61 | 3.64 | ... |
103 +------+------+---------+------+--------------+-----+
104 | ... | ... | ... | ... | ... | ... |
105 +------+------+---------+------+--------------+-----+
106
107 #####################################################
108
109 **Example of information file output:**
110 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 +-------------------+------------------+--------------------+
112 | occ_geometry | env_geometry | Distances (meters) |
113 +-------------------+------------------+--------------------+
114 | c(139.96, -67.22) | c(140.13, -66.7) | 58292.77 |
115 +-------------------+------------------+--------------------+
116 | c(140, -66.52) | c(140, -66.52) | 0 |
117 +-------------------+------------------+--------------------+
118 | ... | ... | ... |
119 +-------------------+------------------+--------------------+
120
121 #############################################################
122
123 **Example of Occurrence and environment merge file output:**
124 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125 +----------+-----------+------------------------+-----------+---------+------+--------------+-----+
126 | lat | long |Acanthorhabdus_fragilis | Acarnidae | Carbo | Grav | Maxbearing | ... |
127 +----------+-----------+------------------------+-----------+---------+------+--------------+-----+
128 |-67,22 | 139.96 | 0 | 1 | 0.88 |28.59 | 3.67 | ... |
129 +----------+-----------+------------------------+-----------+---------+------+--------------+-----+
130 |-66,52 | 140 | 0 | 1 | 0.88 |28.61 | 3.64 | ... |
131 +----------+-----------+------------------------+-----------+---------+------+--------------+-----+
132 | ... | ... | ... | ... | ... | ... | ... | ... |
133 +----------+-----------+------------------------+-----------+---------+------+--------------+-----+
134 ]]></help>
135 </tool>