comparison geo_cov_temp.R @ 0:330f15f2ad3f draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit f00c48e2a16ba6154e6c1aa50330586eefb13a32
author ecology
date Sat, 23 Dec 2023 20:40:29 +0000
parents
children 559744b4c50c
comparison
equal deleted inserted replaced
-1:000000000000 0:330f15f2ad3f
1 #27/11/2023
2 #Seguineau Pauline
3 #Make geographic coverage template
4
5 #Load packages
6
7 library(EMLassemblyline)
8
9 #Load arguments
10
11 args = commandArgs(trailingOnly=TRUE)
12 if(length(args)>0){
13
14 data_table <- args[1]
15 tablename <- args[2]
16 lat_col <- as.numeric(args[3])
17 long_col <- as.numeric(args[4])
18 site_col <- as.numeric(args[5])
19 empty <- args[6]
20 }
21
22 datatable = read.table(data_table,header=T)
23
24 latcol = names(datatable[lat_col])
25 longcol = names(datatable[long_col])
26 sitecol = names(datatable[site_col])
27
28 if (empty == "false"){
29 empty = FALSE
30 }else if (empty=="true"){
31 empty=TRUE}
32
33
34 #Make template
35
36 template_geographic_coverage(path =".", data.path = "data_files", data.table = tablename, lat.col = latcol, lon.col = longcol, site.col = sitecol, empty = empty)
37
38