view geo_cov_temp.R @ 3:36150f04b524 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:53 +0000
parents 06e29cdc08bf
children
line wrap: on
line source

#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,sep="\t",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)