Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deeptools,tebreak,python3Packages.cnvkit,python3Packages.HTSeq: Fix test #102140

Merged
merged 6 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pkgs/applications/science/biology/deeptools/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{ lib
, python
}:
{ lib, python, fetchFromGitHub }:
with python.pkgs;
buildPythonApplication rec {
pname = "deepTools";
version = "3.5.0";

src = fetchPypi {
inherit pname version;
sha256 = "1a14a29e60be13eac11bd204dab9aef73cd72fe56a94c587333f21087584c0d8";
src = fetchFromGitHub {
owner = "deeptools";
repo = "deepTools";
rev = version;
sha256 = "1bz8ln32mfc9k8l9wgp034vw80dxh6f92dfqxhcrpggk4akwj6ml";
};

propagatedBuildInputs = [
Expand All @@ -23,7 +23,7 @@ buildPythonApplication rec {
deeptoolsintervals
];

checkInputs = [ pytest ];
checkInputs = [ nose ];

meta = with lib; {
homepage = "https://deeptools.readthedocs.io/en/develop";
Expand Down
8 changes: 7 additions & 1 deletion pkgs/applications/science/biology/tebreak/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, last, exonerate, minia, python3Packages, bwa
, samtools, findutils }:
, samtools, findutils, python }:

python3Packages.buildPythonApplication rec {
pname = "tebreak";
Expand Down Expand Up @@ -32,6 +32,12 @@ python3Packages.buildPythonApplication rec {
done
'';

checkPhase = ''
$out/bin/tebreak -b test/data/example.ins.bam -r test/data/Homo_sapiens_chr4_50000000-60000000_assembly19.fasta -p 4 --pickle test/example.pickle --detail_out test/example.tebreak.detail.out -i lib/teref.human.fa
pushd test
${python.interpreter} checktest.py
'';

meta = with stdenv.lib; {
description = "Find and characterise transposable element insertions";
homepage = "https://github.com/adamewing/tebreak";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/xmlsec/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
doCheck = true;
checkInputs = [ nss_3_53.tools ];
preCheck = ''
substituteInPlace tests/testrun.sh \
--replace 'timestamp=`date +%Y%m%d_%H%M%S`' 'timestamp=19700101_000000' \
--replace 'TMPFOLDER=/tmp' '$(mktemp -d)'
'';

# enable deprecated soap headers required by lasso
# https://dev.entrouvert.org/issues/18771
Expand Down
20 changes: 14 additions & 6 deletions pkgs/development/python-modules/HTSeq/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{ stdenv, buildPythonPackage, fetchPypi, cython, numpy, pysam, matplotlib
}:
{ stdenv, buildPythonPackage, fetchFromGitHub, cython, numpy, pysam, matplotlib, python, isPy27, isPy3k }:
buildPythonPackage rec {
version = "0.12.4";
pname = "HTSeq";

src = fetchPypi {
inherit pname version;
sha256 = "e3980bb4f12899442b4fa6f24f0ba149090f71cedb1eaf7128249afe4eb921ff";
src = fetchFromGitHub {
owner = "htseq";
repo = "htseq";
rev = "release_${version}";
sha256 = "0y7vh249sljqjnv81060w4xkdx6f1y5zdqkh38yk926x6v9riijm";
};

buildInputs = [ cython numpy pysam ];
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ numpy pysam matplotlib ];

checkPhase = stdenv.lib.optionalString isPy27 ''
${python.interpreter} python2/test/test_general.py
'' + stdenv.lib.optionalString isPy3k ''
${python.interpreter} python3/test/test_general.py
'';

meta = with stdenv.lib; {
homepage = "https://htseq.readthedocs.io/";
description = "A framework to work with high-throughput sequencing data";
maintainers = with maintainers; [ unode ];
platforms = platforms.unix;
Expand Down
33 changes: 28 additions & 5 deletions pkgs/development/python-modules/cnvkit/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib
, fetchPypi
, fetchFromGitHub
, fetchpatch
, rPackages
, rWrapper
, buildPythonPackage
Expand All @@ -15,17 +16,29 @@
, pillow
, pomegranate
, pyfaidx
, python
, R
}:

buildPythonPackage rec {
pname = "CNVkit";
version = "0.9.7";

src = fetchPypi {
inherit pname version;
sha256 = "d68adc0121e17c61a3aa28c0a9ba6526510a5a0df0f0a6eb1818bab71b7e927a";
src = fetchFromGitHub {
owner = "etal";
repo = "cnvkit";
rev = "v${version}";
sha256 = "022zplgqil5l76vri647cyjx427vnbg5r2gw6lw712d2janvdjm7";
};

patches = [
# Fix: AttributeError: module 'pandas.io.common' has no attribute 'EmptyDataError'
(fetchpatch {
url = "https://github.com/etal/cnvkit/commit/392adfffedfa0415e635b72c5027835b0a8d7ab5.patch";
sha256 = "0s0gwyy0hybmhc3jij2v9l44b6lkcmclii8bkwsazzj2kc24m2rh";
})
];

propagatedBuildInputs = [
biopython
numpy
Expand All @@ -39,14 +52,24 @@ buildPythonPackage rec {
future
pillow
pomegranate
rPackages.DNAcopy
];

postPatch = ''
substituteInPlace setup.py \
--replace "pandas >= 0.20.1, < 0.25.0" "pandas"
'';

pythonImportsCheck = [ "cnvlib" ];
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
'';

meta = with lib; {
homepage = "https://cnvkit.readthedocs.io";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/pysaml2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ buildPythonPackage rec {
checkPhase = ''
py.test -k "not test_load_extern_incommon \
and not test_load_remote_encoding \
and not test_load_external"
and not test_load_external \
and not test_conf_syslog"
'';

meta = with stdenv.lib; {
Expand Down