diff --git a/generation.sh b/generation.sh index ac50caa..63fd8d7 100755 --- a/generation.sh +++ b/generation.sh @@ -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" diff --git a/shell.nix b/shell.nix index a57793e..6057869 100644 --- a/shell.nix +++ b/shell.nix @@ -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 + ]; }