annotate geo_cov_temp.R @ 2:debfa8a223c0 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 43f3c45c97ba7d09ad1ea19df9e953cfe917dde8
author ecology
date Mon, 22 Jan 2024 14:56:25 +0000
parents 3b0fa963ae3e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
1 #27/11/2023
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
2 #Seguineau Pauline
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
3 #Make geographic coverage template
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
4
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
5 #Load packages
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
6
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
7 library(EMLassemblyline)
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
8
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
9 #Load arguments
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
10
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
11 args = commandArgs(trailingOnly=TRUE)
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
12 if(length(args)>0){
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
13
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
14 data_table <- args[1]
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
15 tablename <- args[2]
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
16 lat_col <- as.numeric(args[3])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
17 long_col <- as.numeric(args[4])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
18 site_col <- as.numeric(args[5])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
19 empty <- args[6]
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
20 }
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
21
2
debfa8a223c0 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 43f3c45c97ba7d09ad1ea19df9e953cfe917dde8
ecology
parents: 1
diff changeset
22 datatable = read.table(data_table,sep="\t",header=T)
0
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
23
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
24 latcol = names(datatable[lat_col])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
25 longcol = names(datatable[long_col])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
26 sitecol = names(datatable[site_col])
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
27
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
28 if (empty == "false"){
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
29 empty = FALSE
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
30 }else if (empty=="true"){
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
31 empty=TRUE}
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
32
1
3b0fa963ae3e planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit f00c48e2a16ba6154e6c1aa50330586eefb13a32
ecology
parents: 0
diff changeset
33
0
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
34 #Make template
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
35
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
36 template_geographic_coverage(path =".", data.path = "data_files", data.table = tablename, lat.col = latcol, lon.col = longcol, site.col = sitecol, empty = empty)
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
37
d4f168043757 planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
ecology
parents:
diff changeset
38