Mercurial > repos > ecology > eml_validate
comparison geo_cov_temp.R @ 0:ad96b20423cf draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 4b040fe7867d965fb88ce70cc08081367b62b063
author | ecology |
---|---|
date | Fri, 27 Sep 2024 13:01:04 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ad96b20423cf |
---|---|
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,sep="\t",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 |