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
|
|
|
|
, buildPythonPackage
|
|
|
|
, biopython
|
|
|
|
, numpy
|
|
|
|
, scipy
|
2021-05-14 18:46:36 +00:00
|
|
|
, scikit-learn
|
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";
|
2022-05-29 20:39:06 +00:00
|
|
|
version = "0.9.9";
|
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}";
|
2022-05-29 20:39:06 +00:00
|
|
|
sha256 = "1q4l7jhr1k135an3n9aa9wsid5lk6fwxb0hcldrr6v6y76zi4gj1";
|
2019-06-19 03:26:26 +00:00
|
|
|
};
|
|
|
|
|
2022-05-29 20:39:06 +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-10-30 09:30:46 +00:00
|
|
|
|
2019-06-19 03:26:26 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
biopython
|
|
|
|
numpy
|
|
|
|
scipy
|
2021-05-14 18:46:36 +00:00
|
|
|
scikit-learn
|
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
|
|
|
];
|
|
|
|
|
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
|
2022-05-29 20:39:06 +00:00
|
|
|
popd # test/
|
2020-10-30 09:30:46 +00:00
|
|
|
'';
|
2020-07-07 16:34:48 +00:00
|
|
|
|
2022-05-29 20:39:06 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cnvlib"
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|