annotate make_eml.R @ 1:9d56f6480194 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
author ecology
date Fri, 17 Nov 2023 17:07:36 +0000
parents 9cbac7a9b1a3
children 59349973537f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
1 ##07/06/2023 ##Genthon Tanguy
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
2 ##update 15/11/2023 ##Seguineau Pauline
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
3
0
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
4 ###make_eml
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
5
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
6 args = commandArgs(trailingOnly=TRUE)
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
7 if(length(args)>0){
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
8 title <- args[1]
1
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
9 start <- args[2]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
10 end <-args[3]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
11 data_table <- args[4]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
12 data_other <- args[5]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
13 destable <- args[6]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
14 desother <- args[7]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
15 quote <- args[8]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
16 table_url <- args[9]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
17 other_url <- args[10]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
18 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
19
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
20
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
21 ###Format data###
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
22
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
23 if (data_table == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
24 table=NULL
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
25 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
26 table = strsplit(data_table," ")
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
27 for (file in table){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
28 name_table = gsub("\\.[a-zA-Z]*", "", file)}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
29 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
30
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
31
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
32 if (quote != ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
33 quote = strsplit(quote,",")
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
34 if (length(quote[[1]]) != length(table[[1]])){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
35 stop("Your number of quote(s) isn't equal to your number of data table file(s). Please enter the quote parameter as many time as the number of data tables you've input")}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
36 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
37
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
38
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
39 tablequote=NULL
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
40 for (quote_table in quote[[1]]){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
41 if (quote_table=="quote"){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
42 quote_table = sub("quote",'"', quote_table)}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
43 else if (quote_table=="apostrophe"){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
44 quote_table = gsub("apostrophe","'",quote_table)}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
45 else if (quote_table=="none"){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
46 quote_table = gsub("none","",quote_table)}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
47 tablequote = c(tablequote, quote_table)
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
48 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
49
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
50
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
51 if (data_other == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
52 other=NULL
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
53 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
54 other = strsplit(data_other," ")
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
55 for (file in other){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
56 name_other = gsub("\\.[a-zA-Z]*", "", file)}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
57 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
58
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
59 if (data_table !=""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
60 if (destable == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
61 des_table = name_table
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
62 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
63 des_table = strsplit(destable,",")}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
64 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
65
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
66
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
67 if (data_other !=""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
68 if (desother == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
69 des_other = name_other
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
70 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
71 des_other = strsplit(desother,",")}
0
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
72 }
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
73
1
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
74
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
75 if (data_table !=""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
76 if (table_url == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
77 urltable = ""
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
78 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
79 table_url = gsub("\\-" ,"", table_url)
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
80 urltable = strsplit(table_url,",")
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
81 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
82 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
83
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
84 if (data_other !=""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
85 if (other_url == ""){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
86 urlother = ""
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
87 }else{
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
88 other_url = gsub("\\-" ,"", other_url)
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
89 urlother = strsplit(other_url,",")
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
90 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
91 }
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
92
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
93 ###Make EML###
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
94
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
95 if (!is.null(table) && !is.null(other)){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
96
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
97 EMLassemblyline::make_eml(
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
98 path="output_template",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
99 data.path="data_files",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
100 eml.path=".",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
101 dataset.title = title,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
102 temporal.coverage = c(start,end),
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
103 data.table=table[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
104 data.table.name = name_table,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
105 data.table.description = des_table[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
106 data.table.quote.character = tablequote,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
107 data.table.url = urltable[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
108 other.entity=other[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
109 other.entity.name = name_other,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
110 other.entity.description = des_other[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
111 other.entity.url= urlother[[1]]
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
112 )
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
113
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
114 }else if (is.null(table) && is.null(other)){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
115
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
116 EMLassemblyline::make_eml(
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
117 path="output_template",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
118 data.path="data_files",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
119 eml.path=".",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
120 dataset.title = title,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
121 temporal.coverage = c(start,end))
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
122
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
123 }else if (!is.null(table) && is.null(other)){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
124
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
125 EMLassemblyline::make_eml(
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
126 path="output_template",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
127 data.path="data_files",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
128 eml.path=".",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
129 dataset.title = title,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
130 temporal.coverage = c(start,end),
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
131 data.table=table[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
132 data.table.name = name_table,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
133 data.table.description = des_table[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
134 data.table.quote.character = tablequote,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
135 data.table.url = urltable[[1]])
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
136
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
137
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
138 }else if (is.null(table) && !is.null(other)){
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
139
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
140 EMLassemblyline::make_eml(
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
141 path="output_template",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
142 data.path="data_files",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
143 eml.path=".",
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
144 dataset.title = title,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
145 temporal.coverage = c(start,end),
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
146 other.entity=other[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
147 other.entity.name = name_other,
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
148 other.entity.description = des_other[[1]],
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
149 other.entity.url= urlother[[1]])}
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
150
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
151
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
152
0
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
153 old.names <- list.files(path=".", pattern=".xml")
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
154 print(old.names)
9cbac7a9b1a3 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff changeset
155 file.rename(from=old.names, to="eml.xml")
1
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
156
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
157
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
158
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
159
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
160
9d56f6480194 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents: 0
diff changeset
161