From a3d6e7b4b4585c5bc5bd8c7e6c8f305daecdd03b Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 18 Dec 2019 09:37:39 +1100 Subject: [PATCH] lumpy: init 0.3.0 --- .../science/biology/lumpy/default.nix | 47 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/science/biology/lumpy/default.nix diff --git a/pkgs/applications/science/biology/lumpy/default.nix b/pkgs/applications/science/biology/lumpy/default.nix new file mode 100644 index 000000000000..04512e8e372e --- /dev/null +++ b/pkgs/applications/science/biology/lumpy/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, htslib, zlib, curl, openssl, samblaster, sambamba +, samtools, hexdump, python2Packages, which }: + +let + python = + python2Packages.python.withPackages (pkgs: with pkgs; [ pysam numpy ]); + +in stdenv.mkDerivation rec { + pname = "lumpy"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "arq5x"; + repo = "lumpy-sv"; + rev = version; + sha256 = "0azhzvmh9az9jcq0xprlzdz6w16azgszv4kshb903bwbnqirmk18"; + }; + + nativeBuildInputs = [ which ]; + buildInputs = + [ htslib zlib curl openssl python samblaster sambamba samtools hexdump ]; + + preConfigure = '' + patchShebangs ./. + + # Use Nix htslib over bundled version + sed -i 's/lumpy_filter: htslib/lumpy_filter:/' Makefile + sed -i 's|../../lib/htslib/libhts.a|-lhts|' src/filter/Makefile + ''; + + # Upstream's makefile doesn't have an install target + installPhase = '' + mkdir -p $out + cp -r bin $out + cp -r scripts $out + sed -i 's|/build/source|'$out'|' $out/bin/lumpyexpress.config + ''; + + meta = with stdenv.lib; { + description = "Probabilistic structural variant caller"; + homepage = "https://github.com/arq5x/lumpy-sv"; + maintainers = with maintainers; [ jbedo ]; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1a0d7d384ea..e0e54e1da956 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24845,6 +24845,8 @@ in last = callPackage ../applications/science/biology/last { }; + lumpy = callPackage ../applications/science/biology/lumpy { }; + macse = callPackage ../applications/science/biology/macse { }; migrate = callPackage ../applications/science/biology/migrate { };