Mercurial > repos > ecology > wormsmeasurements
comparison wormsmeasurements.xml @ 0:4da00cf02719 draft default tip
planemo upload for repository https://github.com/jeanlecras/tools-ecology/tree/master/tools/WormsMeasurements commit ced658540f05bb07e1e687af30a3fa4ea8e4803c
| author | ecology |
|---|---|
| date | Wed, 28 May 2025 10:12:16 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4da00cf02719 |
|---|---|
| 1 <tool id="WormsMeasurements" name="Enrich dataset with WoRMS" version="0.1.2" profile="23.2"> | |
| 2 <description>Enrich dataset with measurement type data from WoRMS</description> | |
| 3 | |
| 4 <requirements> | |
| 5 <requirement type="package" version="4.3.3">r-base</requirement> | |
| 6 <requirement type="package" version="0.4.3">r-worrms</requirement> | |
| 7 <requirement type="package" version="1.1.4">r-dplyr</requirement> | |
| 8 <requirement type="package" version="2.0.0">r-tidyverse</requirement> | |
| 9 <requirement type="package" version="1.7.5">r-fastDummies</requirement> | |
| 10 </requirements> | |
| 11 | |
| 12 <command detect_errors="exit_code"><![CDATA[ | |
| 13 Rscript '$__tool_directory__/wormsmeasurements.R' | |
| 14 '$data' | |
| 15 '$measurement_types' | |
| 16 '$scientic_name' | |
| 17 '$include_inherited' | |
| 18 '$pivot_wider' | |
| 19 '$exclude_NA' | |
| 20 '$output' | |
| 21 ]]></command> | |
| 22 | |
| 23 <inputs> | |
| 24 <param name="data" type="data" format="tabular" label="occurrence data"/> | |
| 25 <param name="measurement_types" type="text" format="txt" label="list of measurement types"> | |
| 26 </param> | |
| 27 <param name="scientic_name" type="text" format="txt" label="scientific names column name" value="scientificName" optional="false"> | |
| 28 <validator type="regex" message="this field can't be empty">.+</validator> | |
| 29 </param> | |
| 30 <param name="include_inherited" type="boolean" label="include attributes inherited from parent taxon" checked="false"/> | |
| 31 <param name="pivot_wider" type="boolean" label="one hot encoding on the measurement types" checked="false"/> | |
| 32 <param name="exclude_NA" type="boolean" label="exclude lines with missing values (NA)" checked="false"/> | |
| 33 </inputs> | |
| 34 | |
| 35 <outputs> | |
| 36 <data name="output" from_work_dir="enriched_data.tabular" format="tabular" label="dataset enriched with measurments"/> | |
| 37 </outputs> | |
| 38 | |
| 39 <tests> | |
| 40 <test> | |
| 41 <param name="data" value="sample.tabular"/> | |
| 42 <param name="measurement_types" value="Development,Fecundity"/> | |
| 43 <param name="scientic_name" value="scientificName"/> | |
| 44 <param name="include_inherited" value="true"/> | |
| 45 <param name="pivot_wider" value="false"/> | |
| 46 <param name="exclude_NA" value="false"/> | |
| 47 <output name="output" file="enriched_data_inherited.tabular"/> | |
| 48 </test> | |
| 49 <test> | |
| 50 <param name="data" value="sample.tabular"/> | |
| 51 <param name="measurement_types" value="Development,Fecundity"/> | |
| 52 <param name="scientic_name" value="scientificName"/> | |
| 53 <param name="include_inherited" value="false"/> | |
| 54 <param name="pivot_wider" value="false"/> | |
| 55 <param name="exclude_NA" value="false"/> | |
| 56 <output name="output" file="enriched_data.tabular"/> | |
| 57 </test> | |
| 58 <test> | |
| 59 <param name="data" value="sample.tabular"/> | |
| 60 <param name="measurement_types" value="Development,Fecundity"/> | |
| 61 <param name="include_inherited" value="true"/> | |
| 62 <param name="scientic_name" value="scientificName"/> | |
| 63 <param name="pivot_wider" value="true"/> | |
| 64 <param name="exclude_NA" value="false"/> | |
| 65 <output name="output" file="enriched_data_inherited_ohe.tabular"/> | |
| 66 </test> | |
| 67 </tests> | |
| 68 | |
| 69 <help><![CDATA[ | |
| 70 ================== | |
| 71 **What it does ?** | |
| 72 ================== | |
| 73 | |
| 74 This tool requests WoRMS (World Register of Marine Species) to get data about a specific by accessing the entry returned by an its scientific name, it looks for the measurementType(s) requested by the user and select the associated measurement value to add it to a dataset. | |
| 75 | |
| 76 =================== | |
| 77 **How to use it ?** | |
| 78 =================== | |
| 79 | |
| 80 ## Parameters: | |
| 81 | |
| 82 - **data**: a dataset containing a variable of scientific names. | |
| 83 - **list of measurement types**: a list of measurements types present in WoRMS (ex: Development, Fecundity, Size ...) separated by ','. | |
| 84 - **scientific names column name**: the name of column in the dataset containing scientific names. | |
| 85 - **include attributes inherited from parent taxon**: usefull when the data you are looking for are incomplete. | |
| 86 - **one hot encoding on the measurement types**: each possible values of a measurementType becomes a column encoded in 0/1 | |
| 87 - **exclude_NA**: exclude lines with missing measurement value | |
| 88 | |
| 89 ## Outputs: | |
| 90 | |
| 91 The inputed dataset with columns of measurement types or measurements | |
| 92 | |
| 93 **Example of input data :** | |
| 94 "decimalLatitude" "decimalLongitude" "scientificName" | |
| 95 -49.355 70.215 "Abatus cordatus" "planktotrophic" NA | |
| 96 -66.963303 163.223297 "Ctenocidaris spinosa" | |
| 97 -42.45 -74.75833333 "Loxechinus albus" | |
| 98 -37.606167 176.705167 "Ogmocidaris benhami" | |
| 99 -36.201698 175.834198 "Peronella hinemoae" | |
| 100 -37.494667 176.672501 "Phormosoma bursarium" | |
| 101 -43.469 173.572 "Pseudechinus huttoni" | |
| 102 -47.7 179.45 "Pseudechinus novaezealandiae" | |
| 103 -74.72 164.2183333 "Sterechinus neumayeri" | |
| 104 -70.51166667 -8.801 "Sterechinus sp" | |
| 105 | |
| 106 **Example of output data :** | |
| 107 "decimalLatitude" "decimalLongitude" "scientificName" "Development" " Fecundity" | |
| 108 -49.355 70.215 "Abatus cordatus" "planktotrophic" NA | |
| 109 -66.963303 163.223297 "Ctenocidaris spinosa" "direct development" NA | |
| 110 -42.45 -74.75833333 "Loxechinus albus" "planktotrophic" NA | |
| 111 -37.606167 176.705167 "Ogmocidaris benhami" "planktotrophic" NA | |
| 112 -36.201698 175.834198 "Peronella hinemoae" "planktotrophic" NA | |
| 113 -37.494667 176.672501 "Phormosoma bursarium" "planktotrophic" NA | |
| 114 -43.469 173.572 "Pseudechinus huttoni" "planktotrophic" NA | |
| 115 -47.7 179.45 "Pseudechinus novaezealandiae" "planktotrophic" NA | |
| 116 -74.72 164.2183333 "Sterechinus neumayeri" "planktotrophic" NA | |
| 117 -70.51166667 -8.801 "Sterechinus sp" NA NA | |
| 118 | |
| 119 ]]></help> | |
| 120 | |
| 121 <citations> | |
| 122 <citation type="doi">10.32614/CRAN.package.dplyr</citation> | |
| 123 <citation type="doi">10.32614/CRAN.package.tidyverse</citation> | |
| 124 <citation type="doi">10.32614/CRAN.package.worrms</citation> | |
| 125 <citation type="doi">10.32614/CRAN.package.fastDummies</citation> | |
| 126 </citations> | |
| 127 </tool> |
