Skip to content

Commit

Permalink
hap-py: use rtgtools vcfeval as default core
Browse files Browse the repository at this point in the history
For best results (quality and running time), the
authors advice to use RTGtools vcfeval as the
engine.

Depends on #230394
  • Loading branch information
apraga committed Mar 30, 2024
1 parent c985f0d commit 28be50e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 19 deletions.
File renamed without changes.
69 changes: 50 additions & 19 deletions 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;
Expand All @@ -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; {
Expand Down
File renamed without changes.

0 comments on commit 28be50e

Please sign in to comment.