comparison annotations_template.R @ 2:9eaf84bf856f draft default tip

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