about summary refs log tree commit diff
path: root/pkgs/by-name/ha
diff options
context:
space:
mode:
authorAlexis Praga <alexis.praga@proton.me>2024-02-14 22:16:21 +0100
committerAlexis Praga <alexis.praga@proton.me>2024-04-07 21:05:23 +0200
commit5db72db7fae5923fec96a45b1d37b3039b42f54d (patch)
treef02814f52c5f7ec63e1c3c161c2fcc89ed970ddc /pkgs/by-name/ha
parent946f357e45b8237b18ada02ac11a088f257b6421 (diff)
hap-py: use rtgtools vcfeval as default core
For best results (quality and running time), the
authors advice to use RTGtools vcfeval as the
engine.

Depends on #230394
Diffstat (limited to 'pkgs/by-name/ha')
-rw-r--r--pkgs/by-name/ha/hap-py/boost-library-flags.patch (renamed from pkgs/by-name/ha/hap-py/cmake.patch)0
-rw-r--r--pkgs/by-name/ha/hap-py/package.nix69
-rw-r--r--pkgs/by-name/ha/hap-py/python3.patch (renamed from pkgs/by-name/ha/hap-py/hap-py.patch)0
3 files changed, 50 insertions, 19 deletions
diff --git a/pkgs/by-name/ha/hap-py/cmake.patch b/pkgs/by-name/ha/hap-py/boost-library-flags.patch
index e31000cebf130..e31000cebf130 100644
--- a/pkgs/by-name/ha/hap-py/cmake.patch
+++ b/pkgs/by-name/ha/hap-py/boost-library-flags.patch
diff --git a/pkgs/by-name/ha/hap-py/package.nix b/pkgs/by-name/ha/hap-py/package.nix
index 6a420264d8028..7082dc6e8ae5c 100644
--- a/pkgs/by-name/ha/hap-py/package.nix
+++ b/pkgs/by-name/ha/hap-py/package.nix
@@ -1,22 +1,46 @@
-{ pkgs, stdenv, fetchFromGitHub, boost, zlib, lib, makeWrapper }:
+{
+  autoconf,
+  bcftools,
+  boost,
+  bzip2,
+  cmake,
+  curl,
+  fetchFromGitHub,
+  htslib,
+  lib,
+  makeWrapper,
+  perl,
+  python3,
+  rtg-tools,
+  samtools,
+  stdenv,
+  xz,
+  zlib,
+}:
 
 let
   # Bcftools needs perl
-  runtime = with pkgs; [ bcftools htslib my-python perl samtools ];
-  my-python-packages = p: with p; [
-    bx-python
-    pysam
-    cython
-    pandas
-    psutil
-    nose
-    scipy
+  runtime =  [
+    bcftools
+    htslib
+    my-python
+    perl
+    samtools
   ];
-  my-python = pkgs.python3.withPackages my-python-packages;
+  my-python-packages =
+    p: with p; [
+      bx-python
+      pysam
+      pandas
+      psutil
+      scipy
+    ];
+  my-python = python3.withPackages my-python-packages;
 in
 stdenv.mkDerivation rec {
   pname = "hap.py";
-  version  = "0.3.15";
+  version = "0.3.15";
+
   src = fetchFromGitHub {
     owner = "Illumina";
     repo = pname;
@@ -29,26 +53,33 @@ stdenv.mkDerivation rec {
   # For cmake : boost lib and includedir are in differernt location
   BOOST_LIBRARYDIR = "${boost.out}/lib";
   BOOST_INCLUDEDIR = "${boost.dev}/include";
+
   patches = [
-    ./hap-py.patch
-    ./cmake.patch
+    # Compatibility with nix for boost and library flags : zlib, bzip2, curl, crypto, lzma
+    ./boost-library-flags.patch
+    # Update to python3
+    ./python3.patch
   ];
-  buildInputs = with pkgs; [
+  nativeBuildInputs = [
     autoconf
+    cmake
+    makeWrapper
+  ];
+  buildInputs = [
     boost
     bzip2
-    cmake
     curl
     htslib
     my-python
+    rtg-tools
     xz
     zlib
   ];
-  nativeBuildInputs = [ pkgs.makeWrapper ];
-  propagatedBuildInputs = runtime;
+
   postFixup = ''
     wrapProgram $out/bin/hap.py \
-      --set PATH ${lib.makeBinPath runtime}
+       --set PATH ${lib.makeBinPath runtime} \
+       --add-flags "--engine-vcfeval-path=${rtg-tools}/bin/rtg"
   '';
 
   meta = with lib; {
diff --git a/pkgs/by-name/ha/hap-py/hap-py.patch b/pkgs/by-name/ha/hap-py/python3.patch
index 0fee6d084cd41..0fee6d084cd41 100644
--- a/pkgs/by-name/ha/hap-py/hap-py.patch
+++ b/pkgs/by-name/ha/hap-py/python3.patch