Create a Nix derivation for CuReSim

This commit is contained in:
coolneng 2021-05-04 00:57:35 +02:00
parent 4f0936718b
commit 0e005735bc
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 32 additions and 4 deletions

View File

@ -17,6 +17,6 @@ filename="sequence"
prefix="curesim_"
Rscript src/repertoire.r "$sequences" "$number_of_reads" &&
java -jar tools/CuReSim.jar -f "$data_directory$filename$fastq" -o "$data_directory$prefix$filename$fastq"
CuReSim -f "$data_directory$filename$fastq" -o "$data_directory$prefix$filename$fastq"
Rscript src/alignment.r
rm "$data_directory/log.txt"

View File

@ -2,7 +2,35 @@
with pkgs;
mkShell {
buildInputs =
[ R rPackages.immuneSIM rPackages.Biostrings rPackages.stringr jdk ];
let
CuReSim = stdenv.mkDerivation rec {
name = "CuReSim";
version = "1.3";
src = fetchzip {
url =
"http://www.pegase-biosciences.com/wp-content/uploads/2015/08/${name}${version}.zip";
sha256 = "1hvlpgy4haqgqq52mkxhcl9i1fx67kgwi6f1mijvqzk0xff77hkp";
stripRoot = true;
extraPostFetch = ''
chmod go-w $out
'';
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -pv $out/share/java $out/bin
cp -r ${src} $out/share/java/${name}
makeWrapper ${pkgs.jdk}/bin/java $out/bin/CuReSim --add-flags "-jar $out/share/java/${name}/${name}.jar"
'';
};
in mkShell {
buildInputs = [
R
rPackages.immuneSIM
rPackages.Biostrings
rPackages.stringr
jdk
CuReSim
];
}