Mercurial > repos > ecology > geo_cov_template
comparison geo_cov_temp.R @ 0:dc2dfad1627b draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit ea09df299078ff13beda210b36b7edaa6a79c099
author | ecology |
---|---|
date | Sat, 02 Dec 2023 01:49:10 +0000 |
parents | |
children | 0fe3b8bd9d8b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dc2dfad1627b |
---|---|
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 |