Mercurial > repos > ecology > eal_templates
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geo_cov_temp.R Mon Dec 04 21:48:55 2023 +0000 @@ -0,0 +1,37 @@ +#27/11/2023 +#Seguineau Pauline +#Make geographic coverage template + +#Load packages + +library(EMLassemblyline) + +#Load arguments + +args = commandArgs(trailingOnly=TRUE) +if(length(args)>0){ + + data_table <- args[1] + tablename <- args[2] + lat_col <- as.numeric(args[3]) + long_col <- as.numeric(args[4]) + site_col <- as.numeric(args[5]) + empty <- args[6] +} + +datatable = read.table(data_table,header=T) + +latcol = names(datatable[lat_col]) +longcol = names(datatable[long_col]) +sitecol = names(datatable[site_col]) + +if (empty == "false"){ + empty = FALSE +}else if (empty=="true"){ + empty=TRUE} + +#Make template + +template_geographic_coverage(path =".", data.path = "data_files", data.table = tablename, lat.col = latcol, lon.col = longcol, site.col = sitecol, empty = empty) + +