Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone.jl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone.jl
Commits
0874ec32
Commit
0874ec32
authored
2 years ago
by
xo30xoqa
Browse files
Options
Downloads
Patches
Plain Diff
Made `datadir` configurable in `analyse_nature.R`
parent
03e65514
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run.sh
+4
-4
4 additions, 4 deletions
run.sh
src/analysis/analyse_nature.R
+5
-9
5 additions, 9 deletions
src/analysis/analyse_nature.R
with
9 additions
and
13 deletions
run.sh
+
4
−
4
View file @
0874ec32
#!/bin/bash
## A short shell script to test the current development version of Persephone.
if
[[
-d
"te
st
_results"
]]
if
[[
-d
"te
mp
_results"
]]
then
rm
-r
te
st
_results
rm
-r
te
mp
_results
fi
./run.jl
-o
te
st
_results
-s
2
./run.jl
-o
te
mp
_results
-s
2
src/analysis/analyse_nature.R
src/analysis/analyse_nature.R
temp_results
This diff is collapsed.
Click to expand it.
src/analysis/analyse_nature.R
+
5
−
9
View file @
0874ec32
...
...
@@ -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)) }
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment