annotate eal_table_templates.R @ 3:642e31c435c9 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
author ecology
date Mon, 04 Dec 2023 21:49:43 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
1 #28/11/2023 #SEGUINEAU Pauline
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
2
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
3 #Load packages
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
4
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
5 library(EMLassemblyline)
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
6
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
7 #Load arguments
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
8
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
9 if (length(commandArgs(trailingOnly = TRUE)) > 0) {
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
10 data_table <- commandArgs(trailingOnly = TRUE)[1]
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
11 }
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
12
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
13 #Transform arguments
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
14
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
15 table = strsplit(data_table," ")
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
16
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
17 #Make templates to describe data tables : Describes columns of a data table (classes, units, datetime formats, missing value codes) + catégorical variables.
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
18
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
19 template_table_attributes(path = ".",data.path= "data_files", data.table = table[[1]])
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
20 template_categorical_variables(path = ".", data.path = "data_files")
642e31c435c9 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
21