From 535a7006ea806b6735496afd2f4eb3460da298c5 Mon Sep 17 00:00:00 2001 From: scalavision Date: Thu, 24 Oct 2019 23:06:42 +0200 Subject: [PATCH] truvari: init at 1.3.2 (#70877) pythonPackages.pyvcf: init at 0.6.8 --- .../science/biology/truvari/default.nix | 43 +++++++++++++++++++ .../python-modules/pyvcf/default.nix | 32 ++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 4 files changed, 79 insertions(+) create mode 100644 pkgs/applications/science/biology/truvari/default.nix create mode 100644 pkgs/development/python-modules/pyvcf/default.nix diff --git a/pkgs/applications/science/biology/truvari/default.nix b/pkgs/applications/science/biology/truvari/default.nix new file mode 100644 index 000000000000..bee43da6719d --- /dev/null +++ b/pkgs/applications/science/biology/truvari/default.nix @@ -0,0 +1,43 @@ +{ lib +, fetchFromGitHub +, python3Packages +}: + +python3Packages.buildPythonApplication rec { + pname = "truvari"; + version = "1.3.2"; + + src = fetchFromGitHub { + owner = "spiralgenetics"; + repo = "truvari"; + rev = "v${version}"; + sha256 = "0wmjz8nzibvj0ixky1m0qi7iyd204prk7glbvig1cvaab33k19f1"; + }; + + propagatedBuildInputs = with python3Packages; [ + pyvcf + python-Levenshtein + progressbar2 + pysam + pyfaidx + intervaltree + ]; + + prePatch = '' + substituteInPlace ./setup.py \ + --replace '"progressbar2==3.41.0",' "" \ + --replace '"pysam==0.15.2",' "" + ''; + + meta = with lib; { + description = "Structural variant comparison tool for VCFs"; + license = licenses.mit; + maintainers = with maintainers; [ scalavision ]; + 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. + ''; + }; +} diff --git a/pkgs/development/python-modules/pyvcf/default.nix b/pkgs/development/python-modules/pyvcf/default.nix new file mode 100644 index 000000000000..26d9d650d570 --- /dev/null +++ b/pkgs/development/python-modules/pyvcf/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest +}: + +buildPythonPackage rec { + pname = "PyVCF"; + version = "0.6.8"; + + src = fetchFromGitHub { + owner = "jamescasbon"; + repo = "PyVCF"; + rev = "476169cd457ba0caa6b998b301a4d91e975251d9"; + sha256 = "0qf9lwj7r2hjjp4bd4vc7nayrhblfm4qcqs4dbd43a6p4bj2jv5p"; + }; + + checkInputs = [ pytest ]; + + meta = with lib; { + homepage = "https://pyvcf.readthedocs.io/en/latest/index.html"; + description = "A VCF (Variant Call Format) Parser for Python, supporting version 4.0 and 4.1"; + license = licenses.bsd3; + maintainers = with maintainers; [ scalavision ]; + longDescription = '' + The intent of this module is to mimic the csv module in the Python stdlib, + as opposed to more flexible serialization formats like JSON or YAML. + vcf will attempt to parse the content of each record based on the data + types specified in the meta-information lines + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d7f4684b11f..d91c10db0279 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23282,6 +23282,8 @@ in trimal = callPackage ../applications/science/biology/trimal { }; + truvari = callPackage ../applications/science/biology/truvari { }; + varscan = callPackage ../applications/science/biology/varscan { }; hmmer = callPackage ../applications/science/biology/hmmer { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 77c8c59373a3..7093159727b3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1167,6 +1167,8 @@ in { pyvcd = callPackage ../development/python-modules/pyvcd { }; + pyvcf = callPackage ../development/python-modules/pyvcf { }; + pyvoro = callPackage ../development/python-modules/pyvoro { }; relatorio = callPackage ../development/python-modules/relatorio { };