Skip to content
Snippets Groups Projects
Commit 0874ec32 authored by xo30xoqa's avatar xo30xoqa
Browse files

Made `datadir` configurable in `analyse_nature.R`

parent 03e65514
Branches
Tags
No related merge requests found
#!/bin/bash
## A short shell script to test the current development version of Persephone.
if [[ -d "test_results" ]]
if [[ -d "temp_results" ]]
then
rm -r test_results
rm -r temp_results
fi
./run.jl -o test_results -s 2
./run.jl -o temp_results -s 2
src/analysis/analyse_nature.R
src/analysis/analyse_nature.R temp_results
......@@ -12,7 +12,7 @@ library(terra) #https://rspatial.github.io/terra/index.html
autorun = TRUE ## automatically run all analyses?
datadir = "test_results" ## "results" by default
datadir = "results" ## "results" by default, can be specified via commandline
popfile = "populations.csv"
indfile = "individuals.csv"
mapfile = "landcover_jena.tif"
......@@ -58,14 +58,10 @@ visualiseMap = function() {
## If autorun is set, run the experiment specified via commandline argument
if (autorun) {
## the last commandline argument is interpreted as the output directory
##TODO make map files configurable
arg = commandArgs()[length(commandArgs())]
if (dir.exists(arg)) datadir = arg
populationTrends()
visualiseMap()
##TODO set variables from commandline arguments
## arg = commandArgs()[length(commandArgs())]
## if (arg %in% c("tolerance", "habitat", "mutation", "linkage","tolerance_long")) {
## experiment = arg
## results = loadData(experiment)
## plotAll(results)
## }
## else { print(paste("Unknown experiment" , arg)) }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment