Mercurial > repos > ecology > raster_template
annotate annotations_template.R @ 3:36150f04b524 draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 4b040fe7867d965fb88ce70cc08081367b62b063
author | ecology |
---|---|
date | Fri, 27 Sep 2024 13:01:53 +0000 |
parents | 9eaf84bf856f |
children |
rev | line source |
---|---|
2
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
1 #17/07/2024 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
2 #Seguineau Pauline |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
3 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
4 #Make annotation template |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
5 #Load packages |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
6 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
7 library(EMLassemblyline) |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
8 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
9 #Load arguments |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
10 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
11 args = commandArgs(trailingOnly=TRUE) |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
12 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
13 if(length(args)>0){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
14 prod <- args[1] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
15 if (prod == "fr_scratch"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
16 select <- args[2] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
17 data_table <- args[3] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
18 if(select == "data_table"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
19 data_table <- args[3] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
20 }else if(select == "other_entities"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
21 other_entities <- args[3] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
22 }else if(select == "both"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
23 data_table <- args[3] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
24 other_entities <- args[4]} |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
25 }else{ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
26 eml <- args[2] |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
27 } |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
28 } |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
29 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
30 #Transform arguments |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
31 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
32 if(prod =="fr_scratch" && select == "both"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
33 table = strsplit(data_table," ") |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
34 other = strsplit(other_entities," ") |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
35 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
36 #Make templates to add annotations from scratch |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
37 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
38 template_annotations( |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
39 path ="data_files/", |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
40 data.table = table[[1]], |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
41 other.entity = other[[1]]) |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
42 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
43 }else if (prod == "fr_scratch" && select == "data_table"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
44 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
45 table = strsplit(data_table," ") |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
46 template_annotations( |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
47 path ="data_files/", |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
48 data.table = table[[1]]) |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
49 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
50 }else if (prod == "fr_scratch" && select == "other_entities"){ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
51 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
52 other = strsplit(other_entities," ") |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
53 template_annotations( |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
54 path ="data_files/", |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
55 other.entity = other[[1]]) |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
56 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
57 #Make templates to add annotations from EML file |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
58 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
59 }else{ |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
60 template_annotations( |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
61 path= "data_files/", |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
62 eml = eml)} |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
63 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
64 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
65 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
66 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
67 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
68 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
69 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
70 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
71 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
72 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
73 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
74 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
75 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
76 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
77 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
78 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
79 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
80 |
9eaf84bf856f
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
ecology
parents:
diff
changeset
|
81 |