Skip to content

Commit

Permalink
Merge pull request #98283 from risicle/ris-truvari-2.0.2
Browse files Browse the repository at this point in the history
truvari: 1.3.4 -> 2.0.2, add new dependencies & fix build
  • Loading branch information
jonringer committed Sep 23, 2020
2 parents 908d8c3 + ecd5886 commit c7fdc43
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 10 deletions.
9 changes: 8 additions & 1 deletion pkgs/applications/science/biology/bwa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ stdenv.mkDerivation rec {

buildInputs = [ zlib ];

# it's unclear which headers are intended to be part of the public interface
# so we may find ourselves having to add more here over time
installPhase = ''
install -vD bwa $out/bin/bwa
install -vD -t $out/bin bwa
install -vD -t $out/lib libbwa.a
install -vD -t $out/include bntseq.h
install -vD -t $out/include bwa.h
install -vD -t $out/include bwamem.h
install -vD -t $out/include bwt.h
'';

meta = with stdenv.lib; {
Expand Down
19 changes: 10 additions & 9 deletions pkgs/applications/science/biology/truvari/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

python3Packages.buildPythonApplication rec {
pname = "truvari";
version = "1.3.4";
version = "2.0.2";

src = fetchFromGitHub {
owner = "spiralgenetics";
repo = "truvari";
rev = "v${version}";
sha256 = "1bph7v48s7pyfagz8a2fzl5fycjliqzn5lcbv3m2bp2ih1f1gd1v";
sha256 = "0lp1wnldjv92k4ncga1h0icb0dpjsrx427vggg40x04a7kp9lwx0";
};

propagatedBuildInputs = with python3Packages; [
Expand All @@ -21,15 +21,16 @@ python3Packages.buildPythonApplication rec {
pysam
pyfaidx
intervaltree
pytabix
acebinf
bwapy
joblib
pandas
];

prePatch = ''
substituteInPlace ./setup.py \
--replace '"progressbar2==3.41.0",' '"progressbar2",' \
--replace '"pysam==0.15.2",' '"pysam",' \
--replace '"pyfaidx==0.5.5.2",' '"pyfaidx",' \
--replace '"intervaltree==3.0.2",' '"intervaltree",'
'';
# no tests
doCheck = false;
pythonImportsCheck = [ "truvari" ];

meta = with lib; {
description = "Structural variant comparison tool for VCFs";
Expand Down
28 changes: 28 additions & 0 deletions pkgs/development/python-modules/acebinf/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pyvcf
}:

buildPythonPackage rec {
pname = "ACEBinf";
version = "1.0.2";

src = fetchPypi {
inherit pname version;
sha256 = "1168pny671l6zfm2vv1pwspnflmzi7f4v8yldjl7zlz0b9cm5zlz";
};

buildInputs = [ pyvcf ];

# no tests
doCheck = false;
pythonImportsCheck = [ "acebinf" ];

meta = with stdenv.lib; {
homepage = "https://github.com/ACEnglish/acebinf";
description = "Collection of simple utilities used when building bioinformatics tools";
license = licenses.unlicense;
maintainers = with maintainers; [ ris ];
};
}
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/bwapy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ stdenv
, buildPythonPackage
, pythonOlder
, fetchPypi
, bwa
, cffi
, zlib
}:

buildPythonPackage rec {
pname = "bwapy";
version = "0.1.4";
disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw";
};
postPatch = ''
# replace bundled bwa
rm -r bwa/*
cp ${bwa}/lib/*.a ${bwa}/include/*.h bwa/
substituteInPlace setup.py \
--replace 'setuptools>=49.2.0' 'setuptools'
'';

buildInputs = [ zlib bwa ];

propagatedBuildInputs = [ cffi ];

# no tests
doCheck = false;
pythonImportsCheck = [ "bwapy" ];

meta = with stdenv.lib; {
homepage = "https://github.com/ACEnglish/acebinf";
description = "Python bindings to bwa mem aligner";
license = licenses.mpl20;
maintainers = with maintainers; [ ris ];
};
}
32 changes: 32 additions & 0 deletions pkgs/development/python-modules/pytabix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ stdenv
, buildPythonPackage
, isPy3k
, fetchPypi
, zlib
}:

buildPythonPackage rec {
pname = "pytabix";
version = "0.1";

src = fetchPypi {
inherit pname version;
sha256 = "1ldp5r4ggskji6qx4bp2qxy2vrvb3fam03ksn0gq2hdxgrlg2x07";
};

buildInputs = [ zlib ];

doCheck = !isPy3k;
preCheck = ''
substituteInPlace test/test.py \
--replace 'test_remote_file' 'dont_test_remote_file'
'';
pythonImportsCheck = [ "tabix" ];

meta = with stdenv.lib; {
homepage = "https://github.com/slowkow/pytabix";
description = "Python interface for tabix";
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}
6 changes: 6 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ in {

accupy = callPackage ../development/python-modules/accupy { };

acebinf = callPackage ../development/python-modules/acebinf { };

acme = callPackage ../development/python-modules/acme { };

acme-tiny = callPackage ../development/python-modules/acme-tiny { };
Expand Down Expand Up @@ -981,6 +983,8 @@ in {

bx-python = callPackage ../development/python-modules/bx-python { inherit (pkgs) zlib; };

bwapy = callPackage ../development/python-modules/bwapy { };

bytecode = callPackage ../development/python-modules/bytecode { };

bz2file = callPackage ../development/python-modules/bz2file { };
Expand Down Expand Up @@ -5435,6 +5439,8 @@ in {

pysvn = callPackage ../development/python-modules/pysvn { };

pytabix = callPackage ../development/python-modules/pytabix { };

pytado = callPackage ../development/python-modules/pytado { };

pytaglib = callPackage ../development/python-modules/pytaglib { };
Expand Down

0 comments on commit c7fdc43

Please sign in to comment.