Mercurial > repos > ecology > eml2eal
annotate make_eml.R @ 2:3d14d6a4ef7c draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit ea09df299078ff13beda210b36b7edaa6a79c099
author | ecology |
---|---|
date | Sat, 02 Dec 2023 01:49:48 +0000 |
parents | 248b03f124dd |
children | 0fa9d8240dc3 |
rev | line source |
---|---|
1
248b03f124dd
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 |
248b03f124dd
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 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
3 |
0
5c0290c4225a
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff
changeset
|
4 ###make_eml |
5c0290c4225a
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff
changeset
|
5 |
5c0290c4225a
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) |
5c0290c4225a
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){ |
5c0290c4225a
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
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
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] |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
18 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
19 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
20 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
21 ###Format data### |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
22 |
248b03f124dd
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 == ""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
24 table=NULL |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
25 }else{ |
248b03f124dd
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," ") |
248b03f124dd
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){ |
248b03f124dd
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)} |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
29 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
30 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
31 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
32 if (quote != ""){ |
248b03f124dd
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,",") |
248b03f124dd
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]])){ |
248b03f124dd
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")} |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
36 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
37 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
38 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
39 tablequote=NULL |
248b03f124dd
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]]){ |
248b03f124dd
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"){ |
248b03f124dd
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)} |
248b03f124dd
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"){ |
248b03f124dd
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)} |
248b03f124dd
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"){ |
248b03f124dd
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)} |
248b03f124dd
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) |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
48 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
49 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
50 |
248b03f124dd
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 == ""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
52 other=NULL |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
53 }else{ |
248b03f124dd
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," ") |
248b03f124dd
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){ |
248b03f124dd
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)} |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
57 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
58 |
248b03f124dd
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 !=""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
60 if (destable == ""){ |
248b03f124dd
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 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
62 }else{ |
248b03f124dd
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,",")} |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
64 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
65 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
66 |
248b03f124dd
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 !=""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
68 if (desother == ""){ |
248b03f124dd
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 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
70 }else{ |
248b03f124dd
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
5c0290c4225a
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff
changeset
|
72 } |
5c0290c4225a
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff
changeset
|
73 |
1
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
74 |
248b03f124dd
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 !=""){ |
248b03f124dd
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 == ""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
77 urltable = "" |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
78 }else{ |
248b03f124dd
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) |
248b03f124dd
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,",") |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
81 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
82 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
83 |
248b03f124dd
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 !=""){ |
248b03f124dd
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 == ""){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
86 urlother = "" |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
87 }else{ |
248b03f124dd
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) |
248b03f124dd
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,",") |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
90 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
91 } |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
92 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
93 ###Make EML### |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
94 |
248b03f124dd
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)){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
96 |
248b03f124dd
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( |
248b03f124dd
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", |
248b03f124dd
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", |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
100 eml.path=".", |
248b03f124dd
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, |
248b03f124dd
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), |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]], |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]], |
248b03f124dd
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]] |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
112 ) |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
113 |
248b03f124dd
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)){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
115 |
248b03f124dd
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( |
248b03f124dd
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", |
248b03f124dd
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", |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
119 eml.path=".", |
248b03f124dd
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, |
248b03f124dd
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)) |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
122 |
248b03f124dd
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)){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
124 |
248b03f124dd
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( |
248b03f124dd
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", |
248b03f124dd
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", |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
128 eml.path=".", |
248b03f124dd
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, |
248b03f124dd
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), |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]]) |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
136 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
137 |
248b03f124dd
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)){ |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
139 |
248b03f124dd
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( |
248b03f124dd
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", |
248b03f124dd
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", |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
143 eml.path=".", |
248b03f124dd
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, |
248b03f124dd
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), |
248b03f124dd
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]], |
248b03f124dd
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, |
248b03f124dd
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]], |
248b03f124dd
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]])} |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
150 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
151 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
152 |
0
5c0290c4225a
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") |
5c0290c4225a
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d139641e5afb8c75b8aded37bdbd7aecae0fb83
ecology
parents:
diff
changeset
|
154 print(old.names) |
5c0290c4225a
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
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
156 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
157 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
158 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
159 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
160 |
248b03f124dd
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5f7298d572c63d2c43f7dc0c4d9edcaecaa5ccb7
ecology
parents:
0
diff
changeset
|
161 |