forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / te / tebreak / package.nix
blob879f9b95d846b405abf246a143bbe9047c8d5a0e
1 { lib, fetchFromGitHub, last, exonerate, minia, python3, bwa
2 , samtools }:
4 python3.pkgs.buildPythonApplication rec {
5   pname = "tebreak";
6   version = "1.1";
8   src = fetchFromGitHub {
9     owner = "adamewing";
10     repo = "tebreak";
11     rev = version;
12     sha256 = "13mgh775d8hkl340923lfwwm4r5ps70girn8d6wgfxzwzxylz8iz";
13   };
15   nativeBuildInputs = [ python3.pkgs.cython ];
16   propagatedBuildInputs = with python3.pkgs; [
17     pysam
18     scipy
19     bx-python
20     scikit-bio
21   ];
23   preConfigure = ''
24     # patch the paths to all required software
25     for f in $(find . -type f) ; do
26       sed -i "s|'bwa'|'${bwa}/bin/bwa'|" $f
27       sed -i "s|'minia'|'${minia}/bin/minia'|" $f
28       sed -i "s|'exonerate'|'${exonerate}/bin/exonerate'|" $f
29       sed -i "s|'samtools'|'${samtools}/bin/samtools'|" $f
30       sed -i "s|'lastal'|'${last}/bin/lastal'|" $f
31       sed -i "s|'lastdb'|'${last}/bin/lastdb'|" $f
32     done
33   '';
35   checkPhase = ''
36     $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
37     pushd test
38     ${python3.interpreter} checktest.py
39   '';
41   meta = with lib; {
42     description = "Find and characterise transposable element insertions";
43     mainProgram = "tebreak";
44     homepage = "https://github.com/adamewing/tebreak";
45     license = licenses.mit;
46     maintainers = with maintainers; [ jbedo ];
47     platforms = platforms.x86_64;
48   };