2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rPackages,
|
|
|
|
buildPythonPackage,
|
|
|
|
biopython,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
scikit-learn,
|
|
|
|
pandas,
|
|
|
|
matplotlib,
|
|
|
|
reportlab,
|
|
|
|
pysam,
|
|
|
|
future,
|
|
|
|
pillow,
|
|
|
|
pomegranate,
|
|
|
|
pyfaidx,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
R,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "cnvkit";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.9.11";
|
2023-03-04 12:14:45 +00:00
|
|
|
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}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-tlR1LsR+M1nkzk3CgrkkNcSGP3juv25GXddWDDWJ5ao=";
|
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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cnvlib" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://cnvkit.readthedocs.io";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "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 ];
|
|
|
|
};
|
|
|
|
}
|