2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2020-11-30 08:33:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, rPackages
|
|
|
|
, buildPythonPackage
|
|
|
|
, biopython
|
|
|
|
, numpy
|
|
|
|
, scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
|
|
|
, matplotlib
|
|
|
|
, reportlab
|
|
|
|
, pysam
|
|
|
|
, future
|
|
|
|
, pillow
|
|
|
|
, pomegranate
|
|
|
|
, pyfaidx
|
2020-11-30 08:33:03 +00:00
|
|
|
, python
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
2020-11-30 08:33:03 +00:00
|
|
|
, R
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "cnvkit";
|
|
|
|
version = "0.9.10";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etal";
|
|
|
|
repo = "cnvkit";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-mCQXo3abwC06x/g51UBshqUk3dpqEVNUvx+cJ/EdYGQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
# see https://github.com/etal/cnvkit/issues/589
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'joblib < 1.0' 'joblib'
|
|
|
|
# see https://github.com/etal/cnvkit/issues/680
|
|
|
|
substituteInPlace test/test_io.py \
|
|
|
|
--replace 'test_read_vcf' 'dont_test_read_vcf'
|
|
|
|
'';
|
2020-11-30 08:33:03 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
biopython
|
|
|
|
numpy
|
|
|
|
scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
pandas
|
|
|
|
matplotlib
|
|
|
|
reportlab
|
|
|
|
pyfaidx
|
|
|
|
pysam
|
|
|
|
future
|
|
|
|
pillow
|
|
|
|
pomegranate
|
2020-11-30 08:33:03 +00:00
|
|
|
rPackages.DNAcopy
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ R ];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
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
|
2022-06-16 17:23:12 +00:00
|
|
|
popd # test/
|
2020-11-30 08:33:03 +00:00
|
|
|
'';
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cnvlib"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +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";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/etal/cnvkit/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.jbedo ];
|
|
|
|
};
|
|
|
|
}
|