WIP: postprocessing pipeline

Now each run is executed in a independent folder
This commit is contained in:
2020-10-21 18:18:43 +02:00
parent 1321b6a888
commit 4beb069627
20 changed files with 232 additions and 279 deletions

33
garlic/pp/rplot.nix Normal file
View File

@@ -0,0 +1,33 @@
{
stdenv
, rWrapper
, rPackages
}:
{
# The two results to be compared
dataset
, script
, extraRPackages ? []
}:
with stdenv.lib;
let
customR = rWrapper.override {
packages = with rPackages; [ tidyverse ] ++ extraRPackages;
};
in stdenv.mkDerivation {
name = "plot";
buildInputs = [ customR ];
preferLocalBuild = true;
dontPatchShebangs = true;
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out
cd $out
Rscript --vanilla ${script} ${dataset}
'';
}