comparison annotations_template.xml @ 0:fab3ca90cb26 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
author ecology
date Tue, 10 Sep 2024 12:53:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:fab3ca90cb26
1 <tool id="annotations_template" name="Make annotations template" version="0.1.0+galaxy0" python_template_version="3.5" profile="21.05">
2 <description>from scratch or from EML metadata file</description>
3 <requirements>
4 <requirement type="package" version="4.4.1">r-base</requirement>
5 <container type="docker">outils-patrinat.mnhn.fr/metashark:latest</container>
6 </requirements>
7 <command detect_errors="exit_code"><![CDATA[
8
9 #if str($input_prod.input_prod_selector) == "fr_EML"
10 mkdir data_files &&
11 ln -s $input_prod.inputEML 'data_files/${input_prod.inputEML.element_identifier}';
12 #set $eml = $input_prod.inputEML.element_identifier;
13 #end if
14
15 #if str($input_prod.input_prod_selector) == "fr_scratch"
16 #set $datatable = ""
17 #set $dataother = ""
18 #set $datatemp = ""
19 mkdir data_files &&
20
21 #if str($input_prod.input_selector) == "data_table"
22 #for $input in $input_prod.input.inputdata
23 ln -s $input 'data_files/${input.element_identifier}';
24 #set $datatable += $input.element_identifier + " ";
25 #end for
26 #for $input3 in $input_prod.input.input_temp
27 ln -s $input3 'data_files/${input3.element_identifier}';
28 #set $datatemp += $input3.element_identifier + " ";
29 #end for
30 #end if
31 #if str($input_prod.input_selector) == "other_entities"
32
33 #for $input2 in $input_prod.input.input_other
34 ln -s $input2 'data_files/${input2.element_identifier}';
35 #set $dataother += $input2.element_identifier + " ";
36 #end for
37
38 #for $input3 in $input_prod.input.input_temp
39 ln -s $input3 'data_files/${input3.element_identifier}';
40 #set $datatemp += $input3.element_identifier + " ";
41 #end for
42 #end if
43 #if str($input_prod.input_selector) == "both"
44
45 #for $input in $input_prod.input.inputdata
46 ln -s $input 'data_files/${input.element_identifier}';
47 #set $datatable += $input.element_identifier + " ";
48 #end for
49
50 #for $input2 in $input_prod.input.input_other
51 ln -s $input2 'data_files/${input2.element_identifier}';
52 #set $dataother += $input2.element_identifier + " ";
53 #end for
54
55 #for $input3 in $input_prod.input.input_temp
56 ln -s $input3 'data_files/${input3.element_identifier}';
57 #set $datatemp += $input3.element_identifier + " ";
58 #end for
59 #end if
60 #end if
61
62 Rscript
63 '$__tool_directory__/annotations_template.R'
64 '$input_prod.input_prod_selector'
65
66 #if str($input_prod.input_prod_selector) == "fr_scratch"
67 '$input_prod.input.input_selector'
68
69 #if str($input_prod.input.input_selector) =="data_table"
70 '$datatable'
71 '$datatemp'
72 #elif str($input_prod.input.input_selector) =="other_entities"
73 '$dataother'
74 '$datatemp'
75 #elif str($input_prod.input.input_selector) =="both"
76 '$datatable'
77 '$dataother'
78 '$datatemp'
79 #end if
80 #elif str($input_prod.input_prod_selector) == "fr_EML"
81 '$eml'
82 #end if
83
84 ]]></command>
85 <inputs>
86 <conditional name="input_prod">
87 <param name="input_prod_selector" type="select" label="How do you want to produce your annotations template ?">
88 <option value="fr_scratch" selected="true">Make annotations template from scratch</option>
89 <option value="fr_EML">Make annotations template from an EML file</option>
90 </param>
91 <when value="fr_scratch">
92 <conditional name="input">
93 <param name="input_selector" type="select" label="What is the type of your data files ?">
94 <option value="data_table">Data table</option>
95 <option value="other_entities">Other entities</option>
96 <option value="both" selected="true">Both data table and other entities</option>
97 </param>
98 <when value="data_table">
99 <param name="inputdata" type="data" format="data" label="Upload all your data tables" multiple= "true"/>
100 <param name="input_temp" type="data" format="data" label="Upload all metadata template files" multiple= "true" help="This tool needs to be used only after all the metadata templates tools because it needs the other metadata templates to work"/>
101 </when>
102 <when value="other_entities">
103 <param name="input_other" type="data" format="data" label="Upload all your other entities files" multiple= "true"/>
104 <param name="input_temp" type="data" format="data" label="Upload all your metadata template files" multiple= "true" help="This tool needs to be used only after all the metadata templates tools because it needs the other metadata templates to work"/>
105 </when>
106 <when value="both">
107 <param name="inputdata" type="data" format="data" label="Upload all your data tables" multiple= "true"/>
108 <param name="input_other" type="data" format="data" label="Upload all your other entities files" multiple= "true"/>
109 <param name="input_temp" type="data" format="data" label="Upload all your metadata template files" multiple= "true" help="This tool needs to be used only after all the metadata templates tools because it needs the other metadata templates to work"/>
110 </when>
111 </conditional>
112 </when>
113 <when value="fr_EML">
114 <param name="inputEML" type="data" format="xml" label="Upload an EML file" />
115 </when>
116 </conditional>
117 </inputs>
118 <outputs>
119 <data name="output" from_work_dir="data_files/annotations.txt" format="txt" label="annotations.txt"/>
120 </outputs>
121 <tests>
122 <test expect_num_outputs="1">
123 <param name="input_prod_selector" value="fr_EML"/>
124 <param name="inputEML" value="Assessing_the_importance_of_field_margins_for_bat_species.xml"/>
125 <output name="output" file="annotemp/annotations_template.txt"/>
126 </test>
127 <test expect_num_outputs="1">
128 <param name="input_prod_selector" value="fr_scratch"/>
129 <param name="input_selector" value="both"/>
130 <param name="inputdata" value = "annotemp/ceamarc_env.tsv"/>
131 <param name="input_other" value="annotemp/pivot_wider_jupytool_notebook.ipynb"/>
132 <param name="input_temp" value="annotemp/abstract.txt,annotemp/personnel.txt,annotemp/keywords.txt,annotemp/geographic_coverage.txt,annotemp/methods.txt,annotemp/custom_units.txt,annotemp/attributes_ceamarc_env.txt"/>
133 <output name="output" file="annotemp/annotations_template_2.txt"/>
134 </test>
135 <test expect_num_outputs="1">
136 <param name="input_prod_selector" value="fr_scratch"/>
137 <param name="input_selector" value="data_table"/>
138 <param name="inputdata" value = "annotemp/ceamarc_env.tsv"/>
139 <param name="input_temp" value="annotemp/abstract.txt,annotemp/personnel.txt,annotemp/keywords.txt,annotemp/geographic_coverage.txt,annotemp/methods.txt,annotemp/custom_units.txt,annotemp/attributes_ceamarc_env.txt"/>
140 <output name="output" file="annotemp/annotations_template_3.txt"/>
141 </test>
142 <test expect_num_outputs="1">
143 <param name="input_prod_selector" value="fr_scratch"/>
144 <param name="input_selector" value="other_entities"/>
145 <param name="input_other" value="annotemp/pivot_wider_jupytool_notebook.ipynb"/>
146 <param name="input_temp" value="annotemp/abstract.txt,annotemp/personnel.txt,annotemp/keywords.txt,annotemp/geographic_coverage.txt,annotemp/methods.txt,annotemp/custom_units.txt,annotemp/attributes_ceamarc_env.txt"/>
147 <output name="output" file="annotemp/annotations_template_4.txt"/>
148 </test>
149 </tests>
150 <help><![CDATA[
151
152 **What it does?**
153 --------------------
154
155 This tool is made to produce an annotation template to adds semantic meaning to dataset features (variables, locations, persons, etc.) through links to ontology terms. Template produced can be used in the make EML tool to produce EML metadata Annotating a dataset enables greater human understanding and machine actionability (linked data) and vastly improves the accuracy of future user searches and the interoperability of data in general.
156
157 **How to use it?**
158 --------------------
159
160 You can run this tool after all your EAL metadata templates are complete or if you're annotating an existing EML file.
161
162 If you use an existing EML file you will need to input it.
163 If you want to generate annotation template from scratch you will need to input your data files and all the other complete template that you produce before with the other EMLassemblyline tools.
164
165 .. class:: infomark
166
167 If you use an existing EML file to generate annotation template you can use **eml2eal** tool to produce annotation template and all the other templates.
168
169 ]]></help>
170 <citations>
171 <citation type="bibtex">@Manual{,
172 title = {EMLassemblyline: A tool kit for building EML metadata workflows},
173 author = {Colin Smith},
174 year = {2022},
175 note = {https://github.com/EDIorg/EMLassemblyline,
176 https://ediorg.github.io/EMLassemblyline/},
177 }</citation>
178 </citations>
179 </tool>