2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
2023-04-29 16:46:19 +00:00
|
|
|
, runtimeShell
|
|
|
|
, bcftools
|
|
|
|
, htslib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
let
|
|
|
|
ssshtest = fetchFromGitHub {
|
|
|
|
owner = "ryanlayer";
|
|
|
|
repo = "ssshtest";
|
|
|
|
rev = "d21f7f928a167fca6e2eb31616673444d15e6fd0";
|
|
|
|
hash = "sha256-zecZHEnfhDtT44VMbHLHOhRtNsIMWeaBASupVXtmrks=";
|
|
|
|
};
|
|
|
|
in python3Packages.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "truvari";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-04-29 16:46:19 +00:00
|
|
|
owner = "ACEnglish";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "truvari";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-HFVAv1TTL/nMjr62tQKhMdwh25P/y4nBGzSbxoJxMmo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
substituteInPlace truvari/utils.py \
|
|
|
|
--replace "/bin/bash" "${runtimeShell}"
|
|
|
|
patchShebangs repo_utils/test_files
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2023-10-09 19:29:22 +00:00
|
|
|
pywfa
|
2023-04-29 16:46:19 +00:00
|
|
|
rich
|
|
|
|
edlib
|
2020-04-24 23:36:52 +00:00
|
|
|
pysam
|
|
|
|
intervaltree
|
2023-04-29 16:46:19 +00:00
|
|
|
joblib
|
|
|
|
numpy
|
2020-09-25 04:45:31 +00:00
|
|
|
pytabix
|
|
|
|
bwapy
|
|
|
|
pandas
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ bcftools htslib ])
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "truvari" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
bcftools
|
|
|
|
htslib
|
|
|
|
] ++ (with python3Packages; [
|
|
|
|
coverage
|
|
|
|
]);
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
ln -s ${ssshtest}/ssshtest .
|
|
|
|
bash repo_utils/truvari_ssshtests.sh
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Structural variant comparison tool for VCFs";
|
2023-04-29 16:46:19 +00:00
|
|
|
homepage = "https://github.com/ACEnglish/truvari";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/ACEnglish/truvari/releases/tag/${src.rev}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ natsukium scalavision ];
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Truvari is a benchmarking tool for comparison sets of SVs.
|
|
|
|
It can calculate the recall, precision, and f-measure of a
|
|
|
|
vcf from a given structural variant caller. The tool
|
|
|
|
is created by Spiral Genetics.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|