Mercurial > repos > ecology > vector_template
comparison geo_cov_temp.R @ 0:f8dad04c9efa draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/EMLassemblyline commit 2d36dc964f548b5acbc43ffd78e51e6fc7dc80bb
| author | ecology |
|---|---|
| date | Tue, 10 Sep 2024 12:47:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f8dad04c9efa |
|---|---|
| 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 |
