summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-12-18 17:36:31 +1100
committerJustin Bedo <cu@cua0.org>2019-12-29 17:16:10 +1100
commit11460d4cac3a7cd744522511f2f6cf68cbfff8ff (patch)
tree876495173d5ebf30a152e1098123f7d28063209c /pkgs/applications
parent21919122744688bb919ad1fa6b84cf8ee100b1e7 (diff)
downloadnixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar.gz
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar.bz2
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar.lz
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar.xz
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.tar.zst
nixpkgs-11460d4cac3a7cd744522511f2f6cf68cbfff8ff.zip
tebreak: init at 1.0
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/biology/tebreak/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/applications/science/biology/tebreak/default.nix b/pkgs/applications/science/biology/tebreak/default.nix
new file mode 100644
index 00000000000..9ff81944f6a
--- /dev/null
+++ b/pkgs/applications/science/biology/tebreak/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, last, exonerate, minia, python3Packages, bwa
+, samtools, findutils }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "tebreak";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "adamewing";
+    repo = "tebreak";
+    rev = version;
+    sha256 = "194av17wz66n4zxyi56mbkik31j2wmkly5i9qmxgaxymhavzi3kq";
+  };
+
+  nativeBuildInputs = [ findutils python3Packages.cython ];
+  propagatedBuildInputs = with python3Packages; [
+    pysam
+    scipy
+    bx-python
+    scikit-bio
+  ];
+
+  preConfigure = ''
+    # patch the paths to all required software
+    for f in $(find . -type f) ; do
+      sed -i "s|'bwa'|'${bwa}/bin/bwa'|" $f
+      sed -i "s|'minia'|'${minia}/bin/minia'|" $f
+      sed -i "s|'exonerate'|'${exonerate}/bin/exonerate'|" $f
+      sed -i "s|'samtools'|'${samtools}/bin/samtools'|" $f
+      sed -i "s|'lastal'|'${last}/bin/lastal'|" $f
+      sed -i "s|'lastdb'|'${last}/bin/lastdb'|" $f
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Find and characterise transposable element insertions";
+    homepage = "https://github.com/adamewing/tebreak";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.x86_64;
+  };
+}