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
This commit is contained in:
Alexis Praga 2024-02-14 22:16:21 +01:00
parent 946f357e45
commit 5db72db7fa
3 changed files with 50 additions and 19 deletions

View File

@ -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 let
# Bcftools needs perl # Bcftools needs perl
runtime = with pkgs; [ bcftools htslib my-python perl samtools ]; runtime = [
my-python-packages = p: with p; [ bcftools
bx-python htslib
pysam my-python
cython perl
pandas samtools
psutil
nose
scipy
]; ];
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 in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hap.py"; pname = "hap.py";
version = "0.3.15"; version = "0.3.15";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Illumina"; owner = "Illumina";
repo = pname; repo = pname;
@ -29,26 +53,33 @@ stdenv.mkDerivation rec {
# For cmake : boost lib and includedir are in differernt location # For cmake : boost lib and includedir are in differernt location
BOOST_LIBRARYDIR = "${boost.out}/lib"; BOOST_LIBRARYDIR = "${boost.out}/lib";
BOOST_INCLUDEDIR = "${boost.dev}/include"; BOOST_INCLUDEDIR = "${boost.dev}/include";
patches = [ patches = [
./hap-py.patch # Compatibility with nix for boost and library flags : zlib, bzip2, curl, crypto, lzma
./cmake.patch ./boost-library-flags.patch
# Update to python3
./python3.patch
]; ];
buildInputs = with pkgs; [ nativeBuildInputs = [
autoconf autoconf
cmake
makeWrapper
];
buildInputs = [
boost boost
bzip2 bzip2
cmake
curl curl
htslib htslib
my-python my-python
rtg-tools
xz xz
zlib zlib
]; ];
nativeBuildInputs = [ pkgs.makeWrapper ];
propagatedBuildInputs = runtime;
postFixup = '' postFixup = ''
wrapProgram $out/bin/hap.py \ 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; { meta = with lib; {