diff --git a/pkgs/development/python-modules/dnachisel/default.nix b/pkgs/development/python-modules/dnachisel/default.nix index 465f1bb5b4d7..50ba05aca6f3 100644 --- a/pkgs/development/python-modules/dnachisel/default.nix +++ b/pkgs/development/python-modules/dnachisel/default.nix @@ -1,21 +1,27 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , biopython , docopt , flametree , numpy , proglog +, pytestCheckHook , python-codon-tables - }: +, primer3 +, genome-collector +, matplotlib +}: buildPythonPackage rec { pname = "dnachisel"; - version = "3.2.5"; + version = "3.2.6"; - src = fetchPypi { - inherit pname version; - sha256 = "35301c5eda0baca5902403504e0b5a22eb65da92c2bbd23199d95c4a6bf0ef37"; + src = fetchFromGitHub { + owner = "Edinburgh-Genome-Foundry"; + repo = "DnaChisel"; + rev = "v${version}"; + sha256 = "0m88biw7sycjwsmncdybj9n3yf4n9cyvifv9zv7irm8ha3scchji"; }; propagatedBuildInputs = [ @@ -27,9 +33,24 @@ buildPythonPackage rec { python-codon-tables ]; - # no tests in tarball - doCheck = false; + checkInputs = [ + primer3 + genome-collector + matplotlib + pytestCheckHook + ]; + # Disable tests which requires network access + disabledTests = [ + "test_circular_sequence_optimize_with_report" + "test_constraints_reports" + "test_optimize_with_report" + "test_optimize_with_report_no_solution" + "test_avoid_blast_matches_with_list" + "test_avoid_phage_blast_matches" + "test_avoid_matches_with_list" + "test_avoid_matches_with_phage" + ]; pythonImportsCheck = [ "dnachisel" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/genome-collector/default.nix b/pkgs/development/python-modules/genome-collector/default.nix new file mode 100644 index 000000000000..70589912520a --- /dev/null +++ b/pkgs/development/python-modules/genome-collector/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, appdirs +, biopython +, fetchPypi +, proglog +}: + +buildPythonPackage rec { + pname = "genome_collector"; + version = "0.1.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0023ihrz0waxbhq28xh1ymvk51ih882y9psg4glm6s9d1zmqvdph"; + }; + + propagatedBuildInputs = [ + appdirs + biopython + proglog + ]; + + # Project hasn't released the tests yet + doCheck = false; + pythonImportsCheck = [ "genome_collector" ]; + + meta = with lib; { + description = "Genomes and build BLAST/Bowtie indexes in Python"; + homepage = "https://github.com/Edinburgh-Genome-Foundry/genome_collector"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/primer3/default.nix b/pkgs/development/python-modules/primer3/default.nix new file mode 100644 index 000000000000..e8aa83ed94d9 --- /dev/null +++ b/pkgs/development/python-modules/primer3/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cython +, click +}: + +buildPythonPackage rec { + pname = "primer3"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "libnano"; + repo = "primer3-py"; + rev = version; + sha256 = "1glybwp9w2m1ydvaphr41gj31d8fvlh40s35galfbjqa563si72g"; + }; + + nativeBuildInputs = [ cython ]; + + # pytestCheckHook leads to a circular import issue + checkInputs = [ click ]; + + pythonImportsCheck = [ "primer3" ]; + + meta = with lib; { + description = "Oligo analysis and primer design"; + homepage = "https://github.com/libnano/primer3-py"; + license = with licenses; [ gpl2Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aba2d3fc773a..1a003d2a11eb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2433,6 +2433,8 @@ in { genanki = callPackage ../development/python-modules/genanki { }; + genome-collector = callPackage ../development/python-modules/genome-collector { }; + genpy = callPackage ../development/python-modules/genpy { }; genshi = callPackage ../development/python-modules/genshi { }; @@ -4928,6 +4930,8 @@ in { else callPackage ../development/python-modules/prettytable/1.nix { }; + primer3 = callPackage ../development/python-modules/primer3 { }; + priority = callPackage ../development/python-modules/priority { }; prison = callPackage ../development/python-modules/prison { };