|
| 1 | +<tool id="bgc_canyon_b" name="Canyon-B" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05" license="MIT"> |
| 2 | + <description>estimation of ocean CO2 variables and nutrient concentrations</description> |
| 3 | + <macros> |
| 4 | + <token name="@VERSION@">0.9.3</token> |
| 5 | + <token name="@VERSION_SUFFIX@">0</token> |
| 6 | + </macros> |
| 7 | + <requirements> |
| 8 | + <requirement type="package" version="4.3.2">r-base</requirement> |
| 9 | + <requirement type="package" version="2.13.0">r-r.utils</requirement> |
| 10 | + <requirement type="package" version="@VERSION@">r-canyonb</requirement> |
| 11 | + <requirement type="package" version="0.4.0">r-logger</requirement> |
| 12 | + </requirements> |
| 13 | + <required_files> |
| 14 | + <include type="literal" path="run_tool_canyonb.R"/> |
| 15 | + </required_files> |
| 16 | + <command detect_errors="exit_code"><![CDATA[ |
| 17 | + mkdir input/ && |
| 18 | + cp '$input_data' 'input/$input_data.element_identifier' && |
| 19 | + Rscript '$__tool_directory__/run_tool_canyonb.R' |
| 20 | + 'input/$input_data.element_identifier' |
| 21 | + |
| 22 | + #if $mapping.type != 'no': |
| 23 | + '$mapping.mapping_pres' |
| 24 | + '$mapping.mapping_temp' |
| 25 | + '$mapping.mapping_psal' |
| 26 | + '$mapping.mapping_doxy' |
| 27 | + '$mapping.mapping_epres' |
| 28 | + '$mapping.mapping_etemp' |
| 29 | + '$mapping.mapping_epsal' |
| 30 | + '$mapping.mapping_edoxy' |
| 31 | + #end if |
| 32 | + ]]> |
| 33 | + </command> |
| 34 | + <inputs> |
| 35 | + <param name="input_data" type="data" format="csv,txt" label="Input a csv or txt file"/> |
| 36 | + <conditional name="mapping"> |
| 37 | + <param name="type" type="select" label="Do you have your own mapping to make?" help="The mapping is needed for ODV collection extracted from the ODV software."> |
| 38 | + <option value="no">No, the mapping is already correct in my data</option> |
| 39 | + <option value="yes">Yes, I have to make a mapping</option> |
| 40 | + </param> |
| 41 | + <when value="no"/> |
| 42 | + <when value="yes"> |
| 43 | + <param name="mapping_pres" type="text" label="Column name of the pressure"/> |
| 44 | + <param name="mapping_temp" type="text" label="Column name of the in-situ temperature"/> |
| 45 | + <param name="mapping_psal" type="text" label="Column name of the salinity"/> |
| 46 | + <param name="mapping_doxy" type="text" label="Column name of the dissolved oxygen"/> |
| 47 | + <param name="mapping_epres" type="text" label="Column name of the default value for input errors pressure (optional)" optional="true"/> |
| 48 | + <param name="mapping_etemp" type="text" label="Column name of the default value for input errors temperature (optional)" optional="true"/> |
| 49 | + <param name="mapping_epsal" type="text" label="Column name of the default value for input errors salinity (optional)" optional="true"/> |
| 50 | + <param name="mapping_edoxy" type="text" label="Column name of the default value for input errors dissolved oxygen (optional)" optional="true" help="1 % of dissolved oxygen (This is a rather optimistic default, meant for GO-SHIP quality bottle data. A reasonable default sensor dissolved oxgyen error would be 3 % of doxy (or higher!).)"/> |
| 51 | + </when> |
| 52 | + </conditional> |
| 53 | + </inputs> |
| 54 | + <outputs> |
| 55 | + <data name="output" from_work_dir="input/*_canyonb.*" format="tabular" label="Canyon-B Neural network"/> |
| 56 | + </outputs> |
| 57 | + <tests> |
| 58 | + <test expect_num_outputs="1"> |
| 59 | + <param name="input_data" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/libraries/tool_canyonb_galaxy/-/raw/c26f464d79cea10e65c73c83b018841699c732e5/embedded-resources/example-data/full_odv_collection_galaxy_exemple_simplified.csv"/> |
| 60 | + <conditional name="mapping"> |
| 61 | + <param name="type" value="no"/> |
| 62 | + </conditional> |
| 63 | + <output name="output"> |
| 64 | + <assert_contents> |
| 65 | + <has_n_lines n="274026"/> |
| 66 | + </assert_contents> |
| 67 | + </output> |
| 68 | + </test> |
| 69 | + <test expect_num_outputs="1"> |
| 70 | + <param name="input_data" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/libraries/tool_canyonb_galaxy/-/raw/c26f464d79cea10e65c73c83b018841699c732e5/embedded-resources/example-data/data_from_GEOTRACES_IDP2021_Seawater_Discrete_Sample_Data_v2.txt"/> |
| 71 | + <conditional name="mapping"> |
| 72 | + <param name="type" value="yes"/> |
| 73 | + <param name="mapping_pres" value="CTDPRS_T_VALUE_SENSOR [dbar]"/> |
| 74 | + <param name="mapping_temp" value="CTDTMP_T_VALUE_SENSOR [deg C]"/> |
| 75 | + <param name="mapping_psal" value="CTDSAL_D_CONC_SENSOR [pss-78]"/> |
| 76 | + <param name="mapping_doxy" value="CTDOXY_D_CONC_SENSOR [umol/kg]"/> |
| 77 | + </conditional> |
| 78 | + <output name="output"> |
| 79 | + <assert_contents> |
| 80 | + <has_n_lines n="806"/> |
| 81 | + </assert_contents> |
| 82 | + </output> |
| 83 | + </test> |
| 84 | + </tests> |
| 85 | + <help><![CDATA[ |
| 86 | +======================= |
| 87 | +Canyon-B Neural Network |
| 88 | +======================= |
| 89 | +
|
| 90 | +**What it does** |
| 91 | +
|
| 92 | +Robust Estimation of Open Ocean CO2 Variables and Nutrient Concentrations From T, S, and O2 Data Using Bayesian Neural Networks. |
| 93 | +
|
| 94 | +CANYON-B calculation according to Bittig et al. (2018): |
| 95 | +Bayesian neural network mapping of NO3, PO4, SiOH4, AT, CT, pH or pCO2 for any set of water column P, T, S, O2, location data as an alternative to (spatial) climatological interpolation. |
| 96 | +
|
| 97 | +Based on GLODAPv2/GO-SHIP bottle data this tool runs canyon B on multi profiles ! |
| 98 | +
|
| 99 | +**Input description** |
| 100 | +
|
| 101 | +Mandatory a txt or csv file to be processed |
| 102 | +
|
| 103 | +A .csv built by the user with: |
| 104 | +- separator ";" |
| 105 | +
|
| 106 | +mandatory column name : |
| 107 | + - date/latitude/longitude/temperature/salinity/oxygen |
| 108 | +optional column name for error: |
| 109 | + - epre/etemp/epsal/edoxy |
| 110 | +
|
| 111 | +or |
| 112 | +
|
| 113 | +A .txt built by the tools QCV-ingestor-harmonizer then QCV-odv-tool |
| 114 | +
|
| 115 | +If you have to make your own mapping which means you have an extracted .txt from the (web)ODV software (from ODV): |
| 116 | + - Mandatory name of the column pressure, temperature, salinity and oxygen |
| 117 | + - Optional name of the column error for pres, temp, sal and oxy |
| 118 | +
|
| 119 | +**canyon B reads :** |
| 120 | + - latitude [-90 to 90°N] |
| 121 | + - longitude [-180 to 180°E] |
| 122 | + - pressure in dbar |
| 123 | + - temperature in °C |
| 124 | + - salinity in psu |
| 125 | + - oxygen in µmol/kg |
| 126 | +
|
| 127 | +**Output** |
| 128 | +
|
| 129 | +Input csv or txt enriched with canyonb output including their errors: |
| 130 | + - NO3 (nitrate) |
| 131 | + - PO4 (phosphate) |
| 132 | + - AT (total alkalinity) |
| 133 | + - CT (total carbon) |
| 134 | + - pH (ph) |
| 135 | + - pCO2 (pCO2) |
| 136 | + - SiOH4 (silicate) |
| 137 | +
|
| 138 | +The output is visible with Ocean Data View (ODV). |
| 139 | +
|
| 140 | +For more information read https://github.com/HCBScienceProducts/CANYON-B/blob/master/CANYONB.R |
| 141 | +
|
| 142 | + ]]></help> |
| 143 | + <citations> |
| 144 | + <citation type="doi">10.3389/fmars.2018.00328</citation> |
| 145 | + </citations> |
| 146 | +</tool> |
0 commit comments