nixpkgs/pkgs/development/python-modules/cnvkit/default.nix

81 lines
1.6 KiB
Nix
Raw Normal View History

2019-06-19 03:26:26 +00:00
{ lib
2020-10-30 09:30:46 +00:00
, fetchFromGitHub
, fetchpatch
2019-06-19 03:26:26 +00:00
, rPackages
, rWrapper
, buildPythonPackage
, biopython
, numpy
, scipy
2020-07-07 16:34:48 +00:00
, scikitlearn
2019-06-19 03:26:26 +00:00
, pandas
, matplotlib
, reportlab
, pysam
, future
, pillow
, pomegranate
, pyfaidx
2020-10-30 09:30:46 +00:00
, python
, R
2019-06-19 03:26:26 +00:00
}:
buildPythonPackage rec {
pname = "CNVkit";
2020-06-05 17:44:33 +00:00
version = "0.9.7";
2019-06-19 03:26:26 +00:00
2020-10-30 09:30:46 +00:00
src = fetchFromGitHub {
owner = "etal";
repo = "cnvkit";
rev = "v${version}";
sha256 = "022zplgqil5l76vri647cyjx427vnbg5r2gw6lw712d2janvdjm7";
2019-06-19 03:26:26 +00:00
};
2020-10-30 09:30:46 +00:00
patches = [
# Fix: AttributeError: module 'pandas.io.common' has no attribute 'EmptyDataError'
(fetchpatch {
url = "https://github.com/etal/cnvkit/commit/392adfffedfa0415e635b72c5027835b0a8d7ab5.patch";
sha256 = "0s0gwyy0hybmhc3jij2v9l44b6lkcmclii8bkwsazzj2kc24m2rh";
})
];
2019-06-19 03:26:26 +00:00
propagatedBuildInputs = [
biopython
numpy
scipy
2020-07-07 16:34:48 +00:00
scikitlearn
2019-06-19 03:26:26 +00:00
pandas
matplotlib
reportlab
pyfaidx
pysam
future
pillow
pomegranate
2020-10-30 09:30:46 +00:00
rPackages.DNAcopy
2019-06-19 03:26:26 +00:00
];
2019-09-29 04:27:04 +00:00
postPatch = ''
substituteInPlace setup.py \
--replace "pandas >= 0.20.1, < 0.25.0" "pandas"
'';
2020-10-30 09:30:46 +00:00
checkInputs = [ R ];
checkPhase = ''
pushd test/
${python.interpreter} test_io.py
${python.interpreter} test_genome.py
${python.interpreter} test_cnvlib.py
${python.interpreter} test_commands.py
${python.interpreter} test_r.py
'';
2020-07-07 16:34:48 +00:00
2019-06-19 03:26:26 +00:00
meta = with lib; {
homepage = "https://cnvkit.readthedocs.io";
description = "A Python library and command-line software toolkit to infer and visualize copy number from high-throughput DNA sequencing data";
license = licenses.asl20;
maintainers = [ maintainers.jbedo ];
};
}