diff --git a/pkgs/applications/science/biology/truvari/default.nix b/pkgs/applications/science/biology/truvari/default.nix index e626af56278..946f4be6063 100644 --- a/pkgs/applications/science/biology/truvari/default.nix +++ b/pkgs/applications/science/biology/truvari/default.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , python3Packages , runtimeShell , bcftools @@ -16,37 +15,28 @@ let }; in python3Packages.buildPythonApplication rec { pname = "truvari"; - version = "4.0.0"; + version = "4.1.0"; + pyproject = true; src = fetchFromGitHub { owner = "ACEnglish"; repo = "truvari"; rev = "v${version}"; - hash = "sha256-UJNMKEV5m2jFqnWvkVAtymkcE2TjPIXp7JqRZpMSqsE="; + hash = "sha256-HFVAv1TTL/nMjr62tQKhMdwh25P/y4nBGzSbxoJxMmo="; }; - patches = [ - (fetchpatch { - name = "fix-anno-trf-on-darwin.patch"; - url = "https://github.com/ACEnglish/truvari/commit/f9f36305e8eaa88f951562210e3672a4d4f71265.patch"; - hash = "sha256-7O9jTQDCC2b8hUBm0qJQCYMzTC9NFtn/E0dTHSfJALU="; - }) - (fetchpatch { - name = "fix-anno-grm-on-darwin.patch"; - url = "https://github.com/ACEnglish/truvari/commit/31416552008a506204ed4e2add55474f10392357.patch"; - hash = "sha256-42u0ewZU38GCoSfff+XQFv9hEFeO3WlJufTHcl6vkN4="; - }) - ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "rich==" "rich>=" substituteInPlace truvari/utils.py \ --replace "/bin/bash" "${runtimeShell}" patchShebangs repo_utils/test_files ''; + nativeBuildInputs = [ + python3Packages.setuptools + ]; + propagatedBuildInputs = with python3Packages; [ + pywfa rich edlib pysam @@ -83,6 +73,7 @@ in python3Packages.buildPythonApplication rec { meta = with lib; { description = "Structural variant comparison tool for VCFs"; homepage = "https://github.com/ACEnglish/truvari"; + changelog = "https://github.com/ACEnglish/truvari/releases/tag/${src.rev}"; license = licenses.mit; maintainers = with maintainers; [ natsukium scalavision ]; longDescription = '' diff --git a/pkgs/development/python-modules/pywfa/default.nix b/pkgs/development/python-modules/pywfa/default.nix new file mode 100644 index 00000000000..529417db989 --- /dev/null +++ b/pkgs/development/python-modules/pywfa/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, cython +, setuptools +, wheel +, pysam +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "pywfa"; + version = "0.5.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "kcleal"; + repo = "pywfa"; + rev = "refs/tags/v${version}"; + hash = "sha256-oeVXK9uyH4E98tApKrA7dXifQYb41KuDTAZ40XgAaF8="; + }; + + nativeBuildInputs = [ + cython + setuptools + wheel + ]; + + nativeCheckInputs = [ + pysam + unittestCheckHook + ]; + + preCheck = '' + cd pywfa/tests + ''; + + pythonImportsCheck = [ + "pywfa" + "pywfa.align" + ]; + + meta = with lib; { + description = "Python wrapper for wavefront alignment using WFA2-lib"; + homepage = "https://github.com/kcleal/pywfa"; + changelog = "https://github.com/kcleal/pywfa/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2eeed1626a1..40955510ff4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11707,6 +11707,8 @@ self: super: with self; { pywerview = callPackage ../development/python-modules/pywerview { }; + pywfa = callPackage ../development/python-modules/pywfa { }; + pywilight = callPackage ../development/python-modules/pywilight { }; pywinrm = callPackage ../development/python-modules/pywinrm { };