Mercurial > repos > ecology > eal_templates
comparison geo_cov_temp.R @ 0:d4f168043757 draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 5c327a780dc58fb954e7b65db6fd413ee3909c84
author | ecology |
---|---|
date | Mon, 04 Dec 2023 21:48:55 +0000 |
parents | |
children | 3b0fa963ae3e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d4f168043757 |
---|---|
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 #Make template | |
34 | |
35 template_geographic_coverage(path =".", data.path = "data_files", data.table = tablename, lat.col = latcol, lon.col = longcol, site.col = sitecol, empty = empty) | |
36 | |
37 |