about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/biology
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/biology')
-rw-r--r--nixpkgs/pkgs/applications/science/biology/EZminc/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/science/biology/N3/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/biology/ants/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/science/biology/aragorn/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bayescan/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bcftools/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bedtools/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bftools/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/biology/blast/default.nix108
-rw-r--r--nixpkgs/pkgs/applications/science/biology/blast/no_slash_bin.patch184
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bppsuite/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bwa/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/cd-hit/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/clustal-omega/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/biology/cmtk/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/deeptools/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/science/biology/delly/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/science/biology/diamond/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch20
-rw-r--r--nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/science/biology/emboss/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/biology/est-sfs/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/biology/exonerate/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/freebayes/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/biology/hisat2/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/science/biology/hmmer/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/igv/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/biology/inormalize/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/biology/inormalize/lgmask-interp.patch10
-rw-r--r--nixpkgs/pkgs/applications/science/biology/inormalize/nu_correct_norm-interp.patch10
-rw-r--r--nixpkgs/pkgs/applications/science/biology/itsx/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/iv/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/biology/kallisto/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/biology/kssd/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/last/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/biology/macse/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/biology/manta/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/biology/megahit/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/biology/migrate/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch12
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minia/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minia/no-bundle.patch222
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minimap2/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mrbayes/builder.sh9
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mrbayes/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix92
-rw-r--r--nixpkgs/pkgs/applications/science/biology/muscle/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/ncbi-tools/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/neuron/default.nix87
-rw-r--r--nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/niftyseg/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/science/biology/octopus/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/biology/paml/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/science/biology/platypus/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/biology/plink/default.nix25
-rwxr-xr-xnixpkgs/pkgs/applications/science/biology/poretools/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/science/biology/prodigal/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/biology/quast/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/science/biology/raxml/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/science/biology/samtools/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/samtools/samtools-0.1.19-no-curses.patch22
-rw-r--r--nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/biology/seaview/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/biology/snpeff/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/biology/somatic-sniper/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/biology/somatic-sniper/somatic-sniper.patch26
-rw-r--r--nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/science/biology/spades/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/biology/stacks/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/biology/star/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/biology/strelka/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/science/biology/sumatools/default.nix68
-rw-r--r--nixpkgs/pkgs/applications/science/biology/svaba/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/science/biology/tebreak/default.nix42
-rwxr-xr-xnixpkgs/pkgs/applications/science/biology/trimal/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/science/biology/truvari/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/science/biology/varscan/default.nix36
-rwxr-xr-xnixpkgs/pkgs/applications/science/biology/vcftools/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/science/biology/xenomapper/default.nix23
92 files changed, 3465 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix
new file mode 100644
index 000000000000..7502a4ffd2ab
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, libminc, bicpl, itk4, fftwFloat, gsl }:
+
+stdenv.mkDerivation rec {
+  pname = "EZminc";
+  name  = "${pname}-unstable-2019-03-12";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "5e3333ee356f914d34d66d33ea8df809c7f7fa51";
+    sha256 = "0wy8cppf5xpgfqvgb3mqs1cjh81n6qzkk6zxv29wvng8nar9wsy4";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ itk4 libminc bicpl fftwFloat gsl ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/"
+                 "-DEZMINC_BUILD_TOOLS=TRUE"
+                 "-DEZMINC_BUILD_MRFSEG=TRUE"
+                 "-DEZMINC_BUILD_DD=TRUE" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/${pname}";
+    description = "Collection of Perl and shell scripts for processing MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/N3/default.nix b/nixpkgs/pkgs/applications/science/biology/N3/default.nix
new file mode 100644
index 000000000000..d2dbcf185330
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/N3/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper,
+  perlPackages,
+  libminc, EBTKS }:
+
+stdenv.mkDerivation rec {
+  pname = "N3";
+  name  = "${pname}-2017-09-18";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "2fdd939f0f2b24a4039bc6a8ade4a190a1d8e75d";
+    sha256 = "13z21c4r09hna3q1csvcn4i7ws5ixbdaja6ch421xv6nydjh2w5g";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ libminc EBTKS ];
+  propagatedBuildInputs = with perlPackages; [ perl MNI-Perllib GetoptTabular ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ];
+
+  postFixup = ''
+    for p in $out/bin/*; do
+      wrapProgram $p --prefix PERL5LIB : $PERL5LIB
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/${pname}";
+    description = "MRI non-uniformity correction for MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/ants/default.nix b/nixpkgs/pkgs/applications/science/biology/ants/default.nix
new file mode 100644
index 000000000000..cb88e92fe1cb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/ants/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk4, vtk_7 }:
+
+stdenv.mkDerivation rec {
+  pname    = "ANTs";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner  = "ANTsX";
+    repo   = "ANTs";
+    rev    = "37ad4e20be3a5ecd26c2e4e41b49e778a0246c3d";
+    sha256 = "1hrdwv3m9xh3yf7l0rm2ggxc2xzckfb8srs88g485ibfszx7i03q";
+  };
+
+  patches = [
+    # Fix build with gcc8
+    (fetchpatch {
+      url = "https://github.com/ANTsX/ANTs/commit/89af9b2694715bf8204993e032fa132f80cf37bd.patch";
+      sha256 = "1glkrwa1jmxxbmzihycxr576azjqby31jwpj165qc54c91pn0ams";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ itk4 vtk_7 ];
+
+  cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    for file in $out/bin/*; do
+      wrapProgram $file --set ANTSPATH "$out/bin"
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/ANTsX/ANTs";
+    description = "Advanced normalization toolkit for medical image registration and other processing";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/aragorn/default.nix b/nixpkgs/pkgs/applications/science/biology/aragorn/default.nix
new file mode 100644
index 000000000000..956e4d884531
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/aragorn/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.38";
+  pname = "aragorn";
+
+  src = fetchurl {
+    url = "http://mbio-serv2.mbioekol.lu.se/ARAGORN/Downloads/${pname}${version}.tgz";
+    sha256 = "09i1rg716smlbnixfm7q1ml2mfpaa2fpn3hwjg625ysmfwwy712b";
+  };
+
+  buildPhase = ''
+    gcc -O3 -ffast-math -finline-functions -o aragorn aragorn${version}.c
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin && cp aragorn $out/bin
+    mkdir -p $out/man/1 && cp aragorn.1 $out/man/1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Detects tRNA, mtRNA, and tmRNA genes in nucleotide sequences";
+    homepage = "http://mbio-serv2.mbioekol.lu.se/ARAGORN/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix b/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix
new file mode 100644
index 000000000000..4e216fbdbe63
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, unzip, llvmPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "bayescan";
+  version = "2.1";
+
+  src = fetchurl {
+    url = "http://cmpg.unibe.ch/software/BayeScan/files/BayeScan${version}.zip";
+    sha256 = "0ismima8j8z0zj9yc267rpf7z90w57b2pbqzjnayhc3ab8mcbfy6";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
+
+  # Disable FORTIFY_SOURCE or the binary fails with "buffer overflow"
+  hardeningDisable = [ "fortify" ];
+
+  sourceRoot = "BayeScan${version}/source";
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "-static" "" \
+                               --replace "g++" "c++"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/doc/bayescan
+    cp bayescan_${version} $out/bin
+    cp -r ../*pdf ../input_examples ../"R functions" $out/share/doc/bayescan
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Detecting natural selection from population-based genetic data";
+    homepage = "http://cmpg.unibe.ch/software/BayeScan";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.bzizou ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
new file mode 100644
index 000000000000..b847fd8b5fe4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, htslib, zlib, bzip2, lzma, curl, perl, python, bash }:
+
+stdenv.mkDerivation rec {
+  pname = "bcftools";
+  version = "1.10.2";
+
+  src = fetchurl {
+    url = "https://github.com/samtools/bcftools/releases/download/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "0b2f6lqhxdlrvfjqxv7a4nzqj68c1j4avn16iqxwwm80kn302wzm";
+  };
+
+  buildInputs = [ htslib zlib bzip2 lzma curl perl python ];
+
+  makeFlags = [
+    "HSTDIR=${htslib}"
+    "prefix=$(out)"
+    "CC=cc"
+  ];
+
+  preCheck = ''
+    patchShebangs misc/
+    patchShebangs test/
+    sed -ie 's|/bin/bash|${bash}/bin/bash|' test/test.pl
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Tools for manipulating BCF2/VCF/gVCF format, SNP and short indel sequence variants";
+    license = licenses.mit;
+    homepage = "http://www.htslib.org/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.mimame ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix
new file mode 100644
index 000000000000..332e06ea0cf5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchFromGitHub, zlib, python, bzip2, lzma}:
+
+stdenv.mkDerivation rec {
+  pname = "bedtools";
+  version = "2.29.2";
+
+  src = fetchFromGitHub {
+    owner = "arq5x";
+    repo = "bedtools2";
+    rev = "v${version}";
+    sha256 = "015qq3pwrwgnyxyi959niijjlswl231b3wxlsm3l8msv6fdhmkz8";
+  };
+
+  buildInputs = [ zlib python bzip2 lzma ];
+  cxx = if stdenv.cc.isClang then "clang++" else "g++";
+  cc = if stdenv.cc.isClang then "clang" else "gcc";
+  buildPhase = "make prefix=$out SHELL=${stdenv.shell} CXX=${cxx} CC=${cc} -j $NIX_BUILD_CORES";
+  installPhase = "make prefix=$out SHELL=${stdenv.shell} CXX=${cxx} CC=${cc} install";
+
+  meta = with stdenv.lib; {
+    description = "A powerful toolset for genome arithmetic.";
+    license = licenses.gpl2;
+    homepage = "https://bedtools.readthedocs.io/en/latest/";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bftools/default.nix b/nixpkgs/pkgs/applications/science/biology/bftools/default.nix
new file mode 100644
index 000000000000..2ecefee340fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bftools/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, makeWrapper, fetchzip, jre }:
+
+stdenv.mkDerivation rec {
+  pname = "bftools";
+  version = "6.3.0";
+
+  src = fetchzip {
+    url = "http://downloads.openmicroscopy.org/bio-formats/${version}/artifacts/bftools.zip";
+    sha256 = "02nvvmpfglpah1ihd08aw65g1794w588c988cdar1hfl4s80qwhb";
+  };
+
+  installPhase = ''
+    find . -maxdepth 1 -perm -111 -type f -not -name "*.sh" \
+      -exec install -vD {} "$out"/bin/{} \;
+
+    mkdir $out/libexec
+    mkdir -p $out/share/java
+
+    cp ./*.sh $out/libexec
+    cp ./*.jar $out/share/java
+
+    for file in $out/bin/*; do
+      substituteInPlace $file --replace "\$BF_DIR" $out/libexec
+    done
+    substituteInPlace $out/libexec/bf.sh --replace "\$BF_JAR_DIR" $out/share/java
+  '';
+
+  postFixup = ''
+    wrapProgram $out/libexec/bf.sh --prefix PATH : "${lib.makeBinPath [ jre ]}"
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  meta = with stdenv.lib; {
+    description = "A bundle of scripts for using Bio-Formats on the command line with bioformats_package.jar already included";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    homepage = "https://www.openmicroscopy.org/bio-formats/";
+    maintainers = [ maintainers.tbenst ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/blast/default.nix b/nixpkgs/pkgs/applications/science/biology/blast/default.nix
new file mode 100644
index 000000000000..95a1b905e9e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/blast/default.nix
@@ -0,0 +1,108 @@
+{ lib, stdenv, fetchurl, zlib, bzip2, perl, cpio, gawk, coreutils, ApplicationServices }:
+
+stdenv.mkDerivation rec {
+  pname = "blast";
+  version = "2.10.0";
+
+  src = fetchurl {
+    url = "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-src.tar.gz";
+    sha256 = "09nry5knj5hhxpn0a5ww1gb1704grd4r1y7adbjl6kqwq37dkk9s";
+  };
+
+  sourceRoot = "ncbi-blast-${version}+-src/c++";
+  
+  configureFlags = [ 
+    # With flat Makefile we can use all_projects in order not to build extra.
+    # These extra cause clang to hang on Darwin.
+    "--with-flat-makefile"
+    "--without-makefile-auto-update" 
+    "--with-dll"  # build dynamic libraries (static are default)
+    ];
+  
+  makeFlags = [ "all_projects=app/" ];
+
+  preConfigure = ''
+    export NCBICXX_RECONF_POLICY=warn
+    export PWD=$(pwd)
+    export HOME=$PWD
+
+    # The configure scripts wants to set AR="ar cr" unless it is already set in
+    # the environment. Because stdenv sets AR="ar", the result is a bad call to
+    # the assembler later in the process. Thus, we need to unset AR
+    unset AR
+
+    for awks in scripts/common/impl/is_log_interesting.awk \
+        scripts/common/impl/report_duplicates.awk; do
+
+        substituteInPlace $awks \
+              --replace /usr/bin/awk ${gawk}/bin/awk
+    done
+
+    for mk in src/build-system/Makefile.meta.in \
+        src/build-system/helpers/run_with_lock.c ; do
+
+        substituteInPlace $mk \
+        --replace /bin/rm ${coreutils}/bin/rm
+    done
+
+    for mk in src/build-system/Makefile.meta.gmake=no \
+        src/build-system/Makefile.meta_l \
+        src/build-system/Makefile.meta_r \
+        src/build-system/Makefile.requirements \
+        src/build-system/Makefile.rules_with_autodep.in; do
+
+        substituteInPlace $mk \
+            --replace /bin/echo ${coreutils}/bin/echo
+    done
+    for mk in src/build-system/Makefile.meta_p \
+        src/build-system/Makefile.rules_with_autodep.in \
+        src/build-system/Makefile.protobuf.in ; do
+
+        substituteInPlace $mk \
+            --replace /bin/mv ${coreutils}/bin/mv
+    done
+
+
+    substituteInPlace src/build-system/configure \
+        --replace /bin/pwd ${coreutils}/bin/pwd \
+        --replace /bin/ln ${coreutils}/bin/ln
+
+    substituteInPlace src/build-system/configure.ac \
+        --replace /bin/pwd ${coreutils}/bin/pwd \
+        --replace /bin/ln ${coreutils}/bin/ln
+
+    substituteInPlace src/build-system/Makefile.meta_l \
+        --replace /bin/date ${coreutils}/bin/date
+  '';
+
+  nativeBuildInputs = [ perl ];
+
+  # perl is necessary in buildInputs so that installed perl scripts get patched
+  # correctly
+  buildInputs = [ coreutils perl gawk zlib bzip2 cpio ]
+    ++ lib.optionals stdenv.isDarwin [ ApplicationServices ];
+  hardeningDisable = [ "format" ];
+
+  postInstall = ''
+    substituteInPlace $out/bin/get_species_taxids.sh \
+        --replace /bin/rm ${coreutils}/bin/rm
+  '';
+  patches = [ ./no_slash_bin.patch ];
+
+  enableParallelBuilding = true;
+
+  # Many tests require either network access or locally available databases
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = ''Basic Local Alignment Search Tool (BLAST) finds regions of
+    similarity between biological sequences'';
+    homepage = "https://blast.ncbi.nlm.nih.gov/Blast.cgi";
+    license = licenses.publicDomain;
+
+    # Version 2.10.0 fails on Darwin
+    # See https://github.com/NixOS/nixpkgs/pull/61430
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ luispedro ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/blast/no_slash_bin.patch b/nixpkgs/pkgs/applications/science/biology/blast/no_slash_bin.patch
new file mode 100644
index 000000000000..9b78ac579264
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/blast/no_slash_bin.patch
@@ -0,0 +1,184 @@
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/collect_outside_libs.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/collect_outside_libs.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/collect_outside_libs.sh	2014-08-01 22:01:17.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/collect_outside_libs.sh	2019-05-15 12:40:44.145239480 +0800
+@@ -1,8 +1,5 @@
+ #!/bin/sh
+ set -e
+-PATH=/bin:/usr/bin
+-export PATH
+-unset CDPATH
+ 
+ base=$1
+ search=`echo ${2-$LD_LIBRARY_PATH} | tr : ' '`
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/create_flat_tuneups.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/create_flat_tuneups.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/create_flat_tuneups.sh	2011-08-17 02:55:10.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/create_flat_tuneups.sh	2019-05-15 12:40:48.449276574 +0800
+@@ -1,9 +1,6 @@
+ #!/bin/sh
+ id='$Id: create_flat_tuneups.sh 331412 2011-08-16 18:55:10Z ucko $'
+ 
+-PATH=/bin:/usr/bin
+-export PATH
+-
+ exec > auto_flat_tuneups.mk
+ 
+ cat <<EOF
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/get_lock.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/get_lock.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/get_lock.sh	2011-08-20 04:12:28.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/get_lock.sh	2019-05-15 12:40:52.901315000 +0800
+@@ -1,7 +1,5 @@
+ #!/bin/sh
+ 
+-PATH=/bin:/usr/bin
+-export PATH
+ 
+ dir=$1.lock
+ 
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/if_diff.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/if_diff.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/if_diff.sh	2014-07-30 22:06:45.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/if_diff.sh	2019-05-15 12:42:57.298410841 +0800
+@@ -4,9 +4,6 @@
+ # Author:  Denis Vakatov (vakatov@ncbi.nlm.nih.gov)
+ #################################
+ 
+-orig_PATH=$PATH
+-PATH=/bin:/usr/bin
+-
+ script_name=`basename $0`
+ script_args="$*"
+ 
+@@ -16,7 +13,7 @@
+ base_action=`basename "$action"`
+ case "$base_action" in
+   cp | cp\ * | ln | ln\ * )
+-      action=/bin/$base_action
++      action=$base_action
+       rm="rm -f"
+       ;;
+   * )
+@@ -58,10 +55,8 @@
+   shift
+   cmd="$* $dest_file"
+   test "$quiet" = yes || echo "$cmd"
+-  PATH=$orig_PATH
+   "$@" "$dest"
+   status=$?
+-  PATH=/bin:/usr/bin
+   return $status
+ }
+ 
+@@ -74,7 +69,7 @@
+   case "$base_action" in
+     ln | ln\ -f )
+       test "$quiet" = yes || echo "failed; trying \"cp -p ...\" instead"
+-      cmd="/bin/cp -p $src_file $dest_file"
++      cmd="cp -p $src_file $dest_file"
+       ExecHelper "$dest_file" /bin/cp -p "$src_file"  ||
+       Usage "\"$cmd\" failed"
+       ;;
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/make_lock_map.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/make_lock_map.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/make_lock_map.sh	2011-11-17 04:43:52.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/make_lock_map.sh	2019-05-15 12:40:56.769348434 +0800
+@@ -1,8 +1,6 @@
+ #!/bin/sh
+ # $Id: make_lock_map.sh 344587 2011-11-16 20:43:52Z ucko $
+ 
+-PATH=/bin:/usr/bin
+-export PATH
+ 
+ act=false
+ cache_dir='.#SRC-cache'
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/run_with_lock.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/run_with_lock.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/run_with_lock.sh	2015-10-29 22:36:05.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/run_with_lock.sh	2019-05-15 12:41:53.401842849 +0800
+@@ -1,10 +1,6 @@
+ #!/bin/sh
+ # $Id: run_with_lock.sh 483249 2015-10-29 14:36:05Z ucko $
+ 
+-orig_PATH=$PATH
+-PATH=/bin:/usr/bin
+-export PATH
+-
+ base=
+ logfile=
+ map=
+@@ -23,7 +19,7 @@
+ : ${base:=`basename "$1"`}
+ 
+ clean_up () {
+-    /bin/rm -rf "$base.lock"
++    rm -rf "$base.lock"
+ }
+ 
+ case $0 in
+@@ -45,7 +41,7 @@
+     trap "clean_up; exit $error_status" 1 2 15
+     if [ -n "$logfile" ]; then
+         status_file=$base.lock/status
+-        (PATH=$orig_PATH; export PATH; "$@"; echo $? > "$status_file") 2>&1 \
++        ("$@"; echo $? > "$status_file") 2>&1 \
+             | tee "$logfile.new"
+         # Emulate egrep -q to avoid having to move from under scripts.
+         if [ ! -f "$logfile" ]  \
+@@ -58,8 +54,6 @@
+             status=1
+         fi
+     else
+-        PATH=$orig_PATH
+-        export PATH
+         "$@"
+         status=$?
+     fi
+diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/strip_for_install.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/strip_for_install.sh
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/strip_for_install.sh	2013-09-24 03:06:51.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/strip_for_install.sh	2019-05-15 12:40:13.272975092 +0800
+@@ -1,8 +1,5 @@
+ #!/bin/sh
+ 
+-PATH=/bin:/usr/bin:/usr/ccs/bin
+-export PATH
+-
+ case "$1" in
+     --dirs )
+         shift
+--- ncbi-blast-2.9.0+-src/scripts/common/impl/update_configurable.sh	2017-07-13 22:53:24.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/update_configurable.sh	2019-05-15 15:03:35.861276083 +0800
+@@ -1,6 +1,4 @@
+ #!/bin/sh
+-PATH=/bin:/usr/bin
+-export PATH
+ 
+ script_name=`basename $0`
+ script_dir=`dirname $0`
+--- ncbi-blast-2.9.0+-src/src/build-system/Makefile.mk.in	2019-01-04 01:38:37.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/src/build-system/Makefile.mk.in	2019-05-15 15:14:41.749416495 +0800
+@@ -50,12 +50,12 @@
+ 
+ ### Auxiliary commands, filters
+ 
+-RM       = /bin/rm -f
+-RMDIR    = /bin/rm -rf
+-COPY     = /bin/cp -p
++RM       = rm -f
++RMDIR    = rm -rf
++COPY     = cp -p
+ BINCOPY  = @BINCOPY@
+ TOUCH    = @TOUCH@
+-MKDIR    = /bin/mkdir
++MKDIR    = mkdir
+ BINTOUCH = $(TOUCH)
+ LN_S     = @LN_S@
+ GREP     = @GREP@
+--- ncbi-blast-2.9.0+-src/src/build-system/configure	2019-03-05 00:49:08.000000000 +0800
++++ ncbi-blast-2.9.0+-src.patched/src/build-system/configure	2019-05-15 16:55:40.711795042 +0800
+@@ -10417,10 +10417,6 @@
+ echo "${ECHO_T}no, using $LN_S" >&6; }
+ fi
+ 
+-case "$LN_S" in
+-    /*) ;;
+-    * ) LN_S=/bin/$LN_S ;;
+-esac
+ 
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
diff --git a/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix
new file mode 100644
index 000000000000..dc818e2fb868
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, zlib, tbb, python, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "bowtie2";
+  version = "2.3.5.1";
+
+  src = fetchFromGitHub {
+    owner = "BenLangmead";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1l1f0yhjqqvy4lpxfml1xwv7ayimwbpzazvp0281gb4jb5f5mr1a";
+  };
+
+  buildInputs = [ zlib tbb python perl ];
+
+  installFlags = [ "prefix=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "An ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences";
+    license = licenses.gpl3;
+    homepage = "http://bowtie-bio.sf.net/bowtie2";
+    maintainers = with maintainers; [ rybern ];
+    platforms = platforms.all;
+    broken = stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bppsuite/default.nix b/nixpkgs/pkgs/applications/science/biology/bppsuite/default.nix
new file mode 100644
index 000000000000..564a38708bcd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bppsuite/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchFromGitHub, cmake, bpp-core, bpp-seq, bpp-phyl, bpp-popgen }:
+
+stdenv.mkDerivation rec {
+  pname = "bppsuite";
+
+  inherit (bpp-core) version;
+
+  src = fetchFromGitHub {
+    owner = "BioPP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1wdwcgczqbc3m116vakvi0129wm3acln3cfc7ivqnalwvi6lrpds";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ bpp-core bpp-seq bpp-phyl bpp-popgen ];
+
+  meta = bpp-core.meta // {
+    changelog = "https://github.com/BioPP/bppsuite/blob/master/ChangeLog";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/bwa/default.nix b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix
new file mode 100644
index 000000000000..e478c104edef
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "bwa";
+  version = "0.7.17";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/bio-bwa/${pname}-${version}.tar.bz2";
+    sha256 = "1zfhv2zg9v1icdlq4p9ssc8k01mca5d1bd87w71py2swfi74s6yy";
+  };
+
+  buildInputs = [ zlib ];
+
+  installPhase = ''
+    install -vD bwa $out/bin/bwa
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A software package for mapping low-divergent sequences against a large reference genome, such as the human genome";
+    license     = licenses.gpl3;
+    homepage    = "http://bio-bwa.sourceforge.net/";
+    maintainers = with maintainers; [ luispedro ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/cd-hit/default.nix b/nixpkgs/pkgs/applications/science/biology/cd-hit/default.nix
new file mode 100644
index 000000000000..0db788b0f743
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/cd-hit/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, makeWrapper, zlib, perl, perlPackages }:
+
+stdenv.mkDerivation rec {
+  version = "4.8.1";
+  pname = "cd-hit";
+
+  src = fetchFromGitHub {
+    owner = "weizhongli";
+    repo = "cdhit";
+    rev = "V${version}";
+    sha256 = "032nva6iiwmw59gjipm1mv0xlcckhxsf45mc2qbnv19lbis0q22i";
+  };
+
+  propagatedBuildInputs = [ perl perlPackages.TextNSP perlPackages.PerlMagick perlPackages.Storable ];
+
+  nativeBuildInputs = [ zlib makeWrapper ];
+
+  makeFlags = [ "PREFIX=$(out)/bin" ];
+
+  preInstall = "mkdir -p $out/bin";
+
+  postFixup = ''
+    wrapProgram $out/bin/FET.pl --prefix PERL5LIB : $PERL5LIB
+    wrapProgram $out/bin/plot_2d.pl --prefix PERL5LIB : $PERL5LIB
+    wrapProgram $out/bin/clstr_list_sort.pl --prefix PERL5LIB : $PERL5LIB
+  '';
+  meta = with stdenv.lib; {
+    description = "Clustering and comparing protein or nucleotide sequences";
+    homepage = "http://weizhongli-lab.org/cd-hit/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/clustal-omega/default.nix b/nixpkgs/pkgs/applications/science/biology/clustal-omega/default.nix
new file mode 100644
index 000000000000..71cf87985376
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/clustal-omega/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, argtable }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.4";
+  pname = "clustal-omega";
+
+  src = fetchurl {
+    url = "http://www.clustal.org/omega/${pname}-${version}.tar.gz";
+    sha256 = "1vm30mzncwdv881vrcwg11vzvrsmwy4wg80j5i0lcfk6dlld50w6";
+  };
+
+  buildInputs = [ argtable ];
+
+  preConfigure = ''
+    for f in configure \
+             src/clustal-omega-config.h \
+             src/clustal-omega-config.h \
+             src/config.h.in \
+             src/mymain.c
+    do
+      sed -i -re 's/argtable2/argtable3/g' $f
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "General purpose multiple sequence alignment program for protein and DNA/RNA";
+    homepage = "http://www.clustal.org/omega/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix b/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix
new file mode 100644
index 000000000000..41805c15aed5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, cmake}:
+
+stdenv.mkDerivation {
+  name = "cmtk-3.3.1";
+
+  src = fetchurl {
+    name = "cmtk-source.tar.gz";
+    url = "https://www.nitrc.org/frs/download.php/8198/CMTK-3.3.1-Source.tar.gz//?i_agree=1&download_now=1";
+    sha256 = "1nmsga9m7vcc4y4a6zl53ra3mwlgjwdgsq1j291awkn7zr1az6qs";
+  };
+
+  buildInputs = [cmake];
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
+
+  meta = with stdenv.lib; {
+    description     = "Computational Morphometry Toolkit ";
+    longDescription = ''A software toolkit for computational morphometry of
+      biomedical images, CMTK comprises a set of command line tools and a
+      back-end general-purpose library for processing and I/O'';
+    maintainers = with maintainers; [ tbenst ];
+    platforms = platforms.all;
+    license     = licenses.gpl3;
+    homepage    = "https://www.nitrc.org/projects/cmtk/";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix b/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix
new file mode 100644
index 000000000000..971e2f23055b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/conglomerate/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, cmake, coreutils, perlPackages, bicpl, libminc, zlib, minc_tools,
+  makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "conglomerate";
+  name  = "${pname}-2017-09-10";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "7343238bc6215942c7ecc885a224f24433a291b0";
+    sha256 = "1mlqgmy3jc13bv7d01rjwldxq0p4ayqic85xcl222hhifi3w2prr";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ libminc zlib bicpl ];
+  propagatedBuildInputs = [ coreutils minc_tools ] ++ (with perlPackages; [ perl GetoptTabular MNI-Perllib ]);
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DBICPL_DIR=${bicpl}/lib/" ];
+
+  postFixup = ''
+    for p in $out/bin/*; do
+      wrapProgram $p --prefix PERL5LIB : $PERL5LIB --set PATH "${stdenv.lib.makeBinPath [ coreutils minc_tools ]}";
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/conglomerate";
+    description = "More command-line utilities for working with MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix
new file mode 100644
index 000000000000..59b173ac98cd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, libyamlcpp
+, git
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.0.20200331";
+  pname = "dcm2niix";
+
+  src = fetchFromGitHub {
+    owner = "rordenlab";
+    repo = "dcm2niix";
+    rev = "v${version}";
+    sha256 = "1cncfwhyhmg18n970lkn6yvp0i74ajznsl8dqz00asqfzmg681n1";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake git ];
+  buildInputs = [ libyamlcpp ];
+
+  meta = with stdenv.lib; {
+    description = "dcm2niix DICOM to NIfTI converter";
+    longDescription = ''
+      dcm2niix is a designed to convert neuroimaging data from the
+      DICOM format to the NIfTI format.
+    '';
+    homepage = "https://www.nitrc.org/projects/dcm2nii";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ashgillman ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix
new file mode 100644
index 000000000000..8787c96e5b03
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, python
+}:
+with python.pkgs;
+buildPythonApplication rec {
+  pname = "deepTools";
+  version = "3.4.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "05zw9gk17hz08hns5lnhn7l13idg9jdz4gdba6m6gbr84yz149gs";
+  };
+
+  propagatedBuildInputs = [
+    numpy
+    numpydoc
+    scipy
+    py2bit
+    pybigwig
+    pysam
+    matplotlib
+    plotly
+    deeptoolsintervals
+  ];
+
+  checkInputs = [ pytest ];
+
+  meta = with lib; {
+    homepage = "https://deeptools.readthedocs.io/en/develop";
+    description = "Tools for exploring deep DNA sequencing data";
+    longDescription = ''
+      deepTools contains useful modules to process the mapped reads data for multiple
+      quality checks, creating normalized coverage files in standard bedGraph and bigWig
+      file formats, that allow comparison between different files (for example, treatment and control).
+      Finally, using such normalized and standardized files, deepTools can create many
+      publication-ready visualizations to identify enrichments and for functional
+      annotations of the genome.
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ scalavision ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/delly/default.nix b/nixpkgs/pkgs/applications/science/biology/delly/default.nix
new file mode 100644
index 000000000000..a6c45f8aa44e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/delly/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchpatch, fetchFromGitHub, htslib, zlib, bzip2, lzma, ncurses, boost }:
+
+let
+  htslibPatch = fetchpatch {
+    url = "https://github.com/dellytools/delly/commit/0e5c710b0c5ea790bb39699d4cbd49cf4fb86f14.diff";
+    sha256 = "09bz1qqvzhdzm99hf9zgrv80kq9jlr1m2mdvx96p2hk5lpnbdl7y";
+    excludes = [ "src/htslib" ];
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "delly";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+      owner = "dellytools";
+      repo = pname;
+      rev = "v${version}";
+      sha256 = "14bkmixz7737xj192ww96s3a20zc7xs7r04db8avw3ggi3i1s1cs";
+  };
+
+  patches = [ htslibPatch ];
+
+  buildInputs = [ zlib htslib bzip2 lzma ncurses boost ];
+
+  EBROOTHTSLIB = htslib;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm555 src/delly $out/bin/delly
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Structural variant caller for mapped DNA sequenced data";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ scalavision ];
+    platforms = platforms.linux;
+    longDescription = ''
+      Delly is an integrated structural variant (SV) prediction method
+      that can discover, genotype and visualize deletions, tandem duplications,
+      inversions and translocations at single-nucleotide resolution in
+      short-read massively parallel sequencing data. It uses paired-ends,
+      split-reads and read-depth to sensitively and accurately delineate
+      genomic rearrangements throughout the genome.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/diamond/default.nix b/nixpkgs/pkgs/applications/science/biology/diamond/default.nix
new file mode 100644
index 000000000000..dd1e13ec7162
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/diamond/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, cmake, zlib }:
+
+stdenv.mkDerivation {
+  name = "diamond-0.8.36";
+
+  src = fetchurl {
+    url = "https://github.com/bbuchfink/diamond/archive/v0.8.36.tar.gz";
+    sha256 = "092smzzjcg51n3x4h84k52ijpz9m40ri838j9k2i463ribc3c8rh";
+  };
+
+  patches = [
+    ./diamond-0.8.36-no-warning.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Accelerated BLAST compatible local sequence aligner";
+    longDescription = ''
+      A sequence aligner for protein and translated DNA
+      searches and functions as a drop-in replacement for the NCBI BLAST
+      software tools. It is suitable for protein-protein search as well as
+      DNA-protein search on short reads and longer sequences including contigs
+      and assemblies, providing a speedup of BLAST ranging up to x20,000.
+
+      DIAMOND is developed by Benjamin Buchfink. Feel free to contact him for support (Email Twitter).
+
+      If you use DIAMOND in published research, please cite
+      B. Buchfink, Xie C., D. Huson,
+      "Fast and sensitive protein alignment using DIAMOND",
+      Nature Methods 12, 59-60 (2015).
+        '';
+    homepage = "https://github.com/bbuchfink/diamond";
+    license = {
+      fullName = "University of Tuebingen, Benjamin Buchfink";
+      url = "https://raw.githubusercontent.com/bbuchfink/diamond/master/src/COPYING";
+    };
+    maintainers = [ maintainers.metabar ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch b/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
new file mode 100644
index 000000000000..a16d475c5564
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
@@ -0,0 +1,20 @@
+diff -u -r diamond-0.8.36/src/dp/scalar_traceback.h diamond-0.8.36-patched/src/dp/scalar_traceback.h
+--- diamond-0.8.36/src/dp/scalar_traceback.h	2017-02-06 16:32:05.000000000 +0100
++++ diamond-0.8.36-patched/src/dp/scalar_traceback.h	2017-02-23 15:13:24.000000000 +0100
+@@ -19,6 +19,7 @@
+ #ifndef SCALAR_TRACEBACK_H_
+ #define SCALAR_TRACEBACK_H_
+ 
++#include <cmath>
+ #include <exception>
+ #include "../basic/score_matrix.h"
+ 
+@@ -31,7 +32,7 @@
+ template<>
+ inline bool almost_equal<float>(float x, float y)
+ {
+-	return abs(x - y) < 0.001f;
++	return std::abs(x - y) < 0.001f;
+ }
+ 
+ template<typename _score>
diff --git a/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix b/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix
new file mode 100644
index 000000000000..2e744c7b2b9e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, gcc, zlib, python27 }:
+
+stdenv.mkDerivation rec {
+  name = "ecopcr-0.8.0";
+
+  src = fetchurl {
+    url = "https://git.metabarcoding.org/obitools/ecopcr/uploads/6f37991b325c8c171df7e79e6ae8d080/${name}.tar.gz";
+    sha256 = "10c58hj25z78jh0g3zcbx4890yd2qrvaaanyx8mn9p49mmyf5pk6";
+  };
+
+  sourceRoot = "ecoPCR/src";
+
+  buildInputs = [ gcc python27 zlib ];
+
+  installPhase = ''
+	mkdir -p $out/bin
+	cp -v ecoPCR $out/bin
+	cp -v ecogrep $out/bin
+	cp -v ecofind $out/bin
+	cp -v ../tools/ecoPCRFormat.py $out/bin/ecoPCRFormat
+	chmod a+x $out/bin/ecoPCRFormat
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Electronic PCR software tool";
+    longDescription = ''
+      ecoPCR is an electronic PCR software developed by the LECA. It
+      helps you estimate Barcode primers quality. In conjunction with
+      OBITools, you can postprocess ecoPCR output to compute barcode
+      coverage and barcode specificity. New barcode primers can be
+      developed using the ecoPrimers software.
+    '';
+    homepage = "https://git.metabarcoding.org/obitools/ecopcr/wikis/home";
+    license = licenses.cecill20;
+    maintainers = [ maintainers.metabar ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix b/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix
new file mode 100644
index 000000000000..3ef52e543933
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, python27Packages, wget, diamond, hmmer }:
+
+python27Packages.buildPythonApplication rec {
+  pname = "eggnog-mapper";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "eggnogdb";
+    repo = "eggnog-mapper";
+    rev = version;
+    sha256 = "1aaaflppy84bhkh2hb5gnzm4xgrz0rz0cgfpadr9w8cva8p0sqdv";
+  };
+
+  patches = (fetchpatch {
+    url = "https://github.com/eggnogdb/eggnog-mapper/commit/6972f601ade85b65090efca747d2302acb58507f.patch";
+    sha256 = "0abnmn0bh11jihf5d3cggiild1ykawzv5f5fhb4cyyi8fvy4hcxf";
+  });
+
+  buildInputs = [ makeWrapper ];
+  propagatedBuildInputs = [ python27Packages.biopython wget diamond hmmer ];
+
+  # make emapper find diamond & hmmer
+  makeWrapperArgs = [
+    ''--prefix PATH ':' "${diamond}/bin"''
+    ''--prefix PATH ':' "${hmmer}/bin"''
+    ];
+
+  # Tests rely on some of the databases being available, which is not bundled
+  # with this package as (1) in total, they represent >100GB of data, and (2)
+  # the user can download only those that interest them.
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Fast genome-wide functional annotation through orthology assignment";
+    license = licenses.gpl2;
+    homepage = "https://github.com/eggnogdb/eggnog-mapper/wiki";
+    maintainers = with maintainers; [ luispedro ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/emboss/default.nix b/nixpkgs/pkgs/applications/science/biology/emboss/default.nix
new file mode 100644
index 000000000000..e2374bcd1e2f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/emboss/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, readline, perl, libharu, libX11, libpng, libXt, zlib}:
+
+stdenv.mkDerivation {
+  name = "emboss-6.6.0";
+  src = fetchurl {
+    url = "ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz";
+    sha256 = "7184a763d39ad96bb598bfd531628a34aa53e474db9e7cac4416c2a40ab10c6e";
+  };
+
+  buildInputs = [ readline perl libharu libpng libX11 libXt zlib ];
+
+  configureFlags = [ "--with-hpdf=${libharu}" "--with-pngdriver=${zlib}" ];
+
+  postConfigure = ''
+    sed -i 's@$(bindir)/embossupdate@true@' Makefile
+  '';
+
+  meta = {
+    description     = "The European Molecular Biology Open Software Suite";
+    longDescription = ''EMBOSS is a free Open Source software analysis package
+    specially developed for the needs of the molecular biology (e.g. EMBnet)
+    user community, including libraries. The software automatically copes with
+    data in a variety of formats and even allows transparent retrieval of
+    sequence data from the web.''; 
+    license     = "GPL2";
+    homepage    = "http://emboss.sourceforge.net/";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/est-sfs/default.nix b/nixpkgs/pkgs/applications/science/biology/est-sfs/default.nix
new file mode 100644
index 000000000000..1b15c06c670a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/est-sfs/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, gsl }:
+
+stdenv.mkDerivation rec {
+  pname = "est-sfs";
+  version = "2.03";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/est-usfs/${pname}-release-${version}.tar.gz";
+    sha256 = "1hvamrgagz0xi89w8qafyd9mjrdpyika8zm22drddnjkp4sdj65n";
+  };
+
+  buildInputs = [ gsl ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/doc/${pname}
+    cp est-sfs $out/bin
+    cp est-sfs-documentation.pdf $out/share/doc/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://sourceforge.net/projects/est-usfs";
+    description = "Estimate the unfolded site frequency spectrum and ancestral states";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/exonerate/default.nix b/nixpkgs/pkgs/applications/science/biology/exonerate/default.nix
new file mode 100644
index 000000000000..b2c49ab00767
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/exonerate/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, glib, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  version = "2.4.0";
+  pname = "exonerate";
+
+  src = fetchurl {
+    url = "http://ftp.ebi.ac.uk/pub/software/vertebrategenomics/exonerate/${pname}-${version}.tar.gz";
+    sha256 = "0hj0m9xygiqsdxvbg79wq579kbrx1mdrabi2bzqz2zn9qwfjcjgq";
+  };
+
+  doCheck = true;
+
+  buildInputs = [ glib ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "Generic tool for sequence alignment";
+    homepage = "https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix ;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix b/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix
new file mode 100644
index 000000000000..bd80df56cb90
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, zlib, bzip2, lzma }:
+
+stdenv.mkDerivation rec {
+  pname = "freebayes";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    name = "freebayes-${version}-src";
+    owner  = "ekg";
+    repo   = "freebayes";
+    rev    = "v${version}";
+    sha256 = "035nriknjqq8gvil81vvsmvqwi35v80q8h1cw24vd1gdyn1x7bys";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [ zlib bzip2 lzma ];
+
+  installPhase = ''
+    install -vD bin/freebayes bin/bamleftalign scripts/* -t $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Bayesian haplotype-based polymorphism discovery and genotyping";
+    license     = licenses.mit;
+    homepage    = "https://github.com/ekg/freebayes";
+    maintainers = with maintainers; [ jdagilliland ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/hisat2/default.nix b/nixpkgs/pkgs/applications/science/biology/hisat2/default.nix
new file mode 100644
index 000000000000..fb7f2cba3de3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/hisat2/default.nix
@@ -0,0 +1,50 @@
+{stdenv, fetchurl, unzip, which, python, perl}:
+
+stdenv.mkDerivation rec {
+  pname = "hisat2";
+  version = "2.1.0";
+
+  src = fetchurl {
+    url = "ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-${version}-source.zip";
+    sha256 = "10g73sdf6vqqfhhd92hliw7bbpkb8v4pp5012r5l21zws7p7d8l9";
+  };
+
+  nativeBuildInputs = [ unzip which ];
+  buildInputs = [ python perl ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp hisat2 \
+       hisat2-inspect-l \
+       hisat2-build-s \
+       hisat2-align-l \
+       hisat2-inspect \
+       hisat2-align-s \
+       hisat2-inspect-s \
+       hisat2-build-l \
+       hisat2-build \
+       extract_exons.py \
+       extract_splice_sites.py \
+       hisat2_extract_exons.py \
+       hisat2_extract_snps_haplotypes_UCSC.py \
+       hisat2_extract_snps_haplotypes_VCF.py \
+       hisat2_extract_splice_sites.py \
+       hisat2_simulate_reads.py \
+       hisatgenotype_build_genome.py \
+       hisatgenotype_extract_reads.py \
+       hisatgenotype_extract_vars.py \
+       hisatgenotype_hla_cyp.py \
+       hisatgenotype_locus.py \
+       hisatgenotype.py \
+       $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Graph based aligner";
+    license = licenses.gpl3;
+    homepage = "https://ccb.jhu.edu/software/hisat2/index.shtml";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix b/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix
new file mode 100644
index 000000000000..3786b62f7477
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/hmmer/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "3.3";
+  pname = "hmmer";
+
+  src = fetchurl {
+    url = "http://eddylab.org/software/hmmer/${pname}-${version}.tar.gz";
+    sha256 = "0v3kcgkr6jihq0xmpgn2xd5q7wiwvj6yswa905k2c0v7mx0bz1h1";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Biosequence analysis using profile hidden Markov models";
+    longDescription = ''
+      HMMER is used for searching sequence databases for sequence homologs, and for making sequence alignments. It implements methods using probabilistic models called profile hidden Markov models (profile HMMs).
+      HMMER is often used together with a profile database, such as Pfam or many of the databases that participate in Interpro. But HMMER can also work with query sequences, not just profiles, just like BLAST. For example, you can search a protein query sequence against a database with phmmer, or do an iterative search with jackhmmer.
+      HMMER is designed to detect remote homologs as sensitively as possible, relying on the strength of its underlying probability models. In the past, this strength came at significant computational expense, but as of the new HMMER3 project, HMMER is now essentially as fast as BLAST.
+      HMMER can be downloaded and installed as a command line tool on your own hardware, and now it is also more widely accessible to the scientific community via new search servers at the European Bioinformatics Institute.
+    '';
+    homepage = "http://hmmer.org/";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.iimog ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/igv/default.nix b/nixpkgs/pkgs/applications/science/biology/igv/default.nix
new file mode 100644
index 000000000000..aa6c95071b7b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/igv/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, unzip, jre }:
+
+stdenv.mkDerivation rec {
+  pname = "igv";
+  version = "2.4.19";
+
+  src = fetchurl {
+    url = "https://data.broadinstitute.org/igv/projects/downloads/2.4/IGV_${version}.zip";
+    sha256 = "048dgrhxcb854d24kyjkqz12bw04bsv49i5jawb75yzkswwfkb0z";
+  };
+
+  buildInputs = [ unzip jre ];
+
+  installPhase = ''
+    mkdir -pv $out/{share,bin}
+    cp -Rv * $out/share/
+
+    sed -i "s#prefix=.*#prefix=$out/share#g" $out/share/igv.sh
+    sed -i 's#java#${jre}/bin/java#g' $out/share/igv.sh
+
+    ln -s $out/share/igv.sh $out/bin/igv
+
+    chmod +x $out/bin/igv
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.broadinstitute.org/igv/";
+    description = "A visualization tool for interactive exploration of genomic datasets";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.mimame ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix
new file mode 100644
index 000000000000..9e63b92b24ed
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper,
+  perlPackages,
+  libminc, EBTKS }:
+
+stdenv.mkDerivation rec {
+  pname = "inormalize";
+  name  = "${pname}-2014-10-21";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "79cea9cdfe7b99abfd40afda89ab2253b596ad2f";
+    sha256 = "1ahqv5q0ljvji99a5q8azjkdf6bgp6nr8lwivkqwqs3jm0k5clq7";
+  };
+
+  patches = [ ./lgmask-interp.patch ./nu_correct_norm-interp.patch ];
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ libminc EBTKS ];
+  propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ];
+
+  postFixup = ''
+    for p in $out/bin/*; do
+      wrapProgram $p --prefix PERL5LIB : $PERL5LIB
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/${pname}";
+    description = "Program to normalize intensity of MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/inormalize/lgmask-interp.patch b/nixpkgs/pkgs/applications/science/biology/inormalize/lgmask-interp.patch
new file mode 100644
index 000000000000..953bce9a1848
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/inormalize/lgmask-interp.patch
@@ -0,0 +1,10 @@
+diff --git a/lgmask.in b/lgmask.in
+index 17dbe4d..2195d91 100644
+--- a/lgmask.in
++++ b/lgmask.in
+@@ -1,4 +1,4 @@
+-#! @PERL@
++#! /usr/bin/env perl
+ 
+ #---------------------------------------------------------------------------
+ #@COPYRIGHT :
diff --git a/nixpkgs/pkgs/applications/science/biology/inormalize/nu_correct_norm-interp.patch b/nixpkgs/pkgs/applications/science/biology/inormalize/nu_correct_norm-interp.patch
new file mode 100644
index 000000000000..75dc46a799ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/inormalize/nu_correct_norm-interp.patch
@@ -0,0 +1,10 @@
+diff --git a/nu_correct_norm.in b/nu_correct_norm.in
+index 1dc84ac..1bc6235 100644
+--- a/nu_correct_norm.in
++++ b/nu_correct_norm.in
+@@ -1,4 +1,4 @@
+-#! @PERL@
++#! /usr/bin/perl
+  
+ #---------------------------------------------------------------------------
+ #@COPYRIGHT :
diff --git a/nixpkgs/pkgs/applications/science/biology/itsx/default.nix b/nixpkgs/pkgs/applications/science/biology/itsx/default.nix
new file mode 100644
index 000000000000..ac534a4ec3cd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/itsx/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, hmmer, perl }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.1";
+  pname = "itsx";
+
+  src = fetchurl {
+    url = "http://microbiology.se/sw/ITSx_${version}.tar.gz";
+    sha256 = "0lrmy2n3ax7f208k0k8l3yz0j5cpz05hv4hx1nnxzn0c51z1pc31";
+  };
+
+  buildInputs = [ hmmer perl ];
+
+  buildPhase = ''
+    sed -e "s,profileDB = .*,profileDB = \"$out/share/ITSx_db/HMMs\";," -i ITSx
+    sed "3 a \$ENV{\'PATH\'}='${hmmer}/bin:'.\"\$ENV{\'PATH\'}\";" -i ITSx
+    mkdir bin
+    mv ITSx bin
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/doc && cp -a bin $out/
+    cp *pdf $out/share/doc
+    cp -r ITSx_db $out/share
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Improved software detection and extraction of ITS1 and ITS2 from ribosomal ITS sequences of fungi and other eukaryotes for use in environmental sequencing";
+    homepage = "https://microbiology.se/software/itsx/";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.bzizou ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/iv/default.nix b/nixpkgs/pkgs/applications/science/biology/iv/default.nix
new file mode 100644
index 000000000000..82fe36940081
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/iv/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, neuron-version
+, libX11, libXext, patchelf
+}:
+
+stdenv.mkDerivation rec
+  { name = "iv-19";
+    src = fetchurl
+      { url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${neuron-version}/${name}.tar.gz";
+        sha256 = "07a3g8zzay4h0bls7fh89dd0phn7s34c2g15pij6dsnwpmjg06yx";
+      };
+    nativeBuildInputs = [ patchelf ];
+    buildInputs = [ libXext ];
+    propagatedBuildInputs = [ libX11 ];
+    hardeningDisable = [ "format" ];
+    postInstall = ''
+      for dir in $out/*; do # */
+        if [ -d $dir/lib ]; then
+	  mv $dir/* $out # */
+          rmdir $dir
+          break
+        fi
+      done
+    '' + stdenv.lib.optionalString stdenv.isLinux ''
+      patchelf --add-needed ${libX11}/lib/libX11.so $out/lib/libIVhines.so
+    '';
+    meta = with stdenv.lib;
+      { description = "InterViews graphical library for Neuron";
+        license     = licenses.bsd3;
+        homepage    = "http://www.neuron.yale.edu/neuron";
+        platforms   = platforms.all;
+      };
+  }
diff --git a/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix b/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix
new file mode 100644
index 000000000000..5a1bb187886b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/kallisto/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, autoconf, cmake, hdf5, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "kallisto";
+  version = "0.46.2";
+
+  src = fetchFromGitHub {
+    repo = "kallisto";
+    owner = "pachterlab";
+    rev = "v${version}";
+    sha256 = "0m0r2820ca3rch99md1zzbgkilmlfkhdkpys2lfnb87qxmf1jnmb";
+  };
+
+  nativeBuildInputs = [ autoconf cmake ];
+
+  buildInputs = [ hdf5 zlib ];
+
+  cmakeFlags = [ "-DUSE_HDF5=ON" ];
+
+  # Parallel build fails in some cases: https://github.com/pachterlab/kallisto/issues/160
+  enableParallelBuilding = false;
+
+  meta = with stdenv.lib; {
+    description = "Kallisto is a program for quantifying abundances of transcripts from RNA-Seq data";
+    homepage = "https://pachterlab.github.io/kallisto";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ arcadio ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/kssd/default.nix b/nixpkgs/pkgs/applications/science/biology/kssd/default.nix
new file mode 100644
index 000000000000..ef8a0ce136f8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/kssd/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, zlib, automake, autoconf, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "kssd";
+  version = "1.0";
+
+  src = fetchurl {
+    url = "https://github.com/yhg926/public_${pname}/archive/v${version}.tar.gz";
+    sha256 = "a5dcaf520049a962bef625cb59a567ea2b4252d4dc9be28dd06123d340e03919";
+  };
+
+  buildInputs = [ zlib automake autoconf libtool ];
+
+  installPhase = ''
+      install -vD kssd $out/bin/kssd
+  '';
+
+  meta = with stdenv.lib; {
+    description = "K-mer substring space decomposition";
+    license     = licenses.asl20;
+    homepage    = "https://github.com/yhg926/public_kssd";
+    maintainers = with maintainers; [ unode ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/last/default.nix b/nixpkgs/pkgs/applications/science/biology/last/default.nix
new file mode 100644
index 000000000000..fc302522215f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/last/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, unzip, zlib, python3, parallel }:
+
+stdenv.mkDerivation rec {
+  pname = "last";
+  version = "1061";
+
+  src = fetchurl {
+    url = "http://last.cbrc.jp/last-${version}.zip";
+    sha256 = "1jbvcxfy5xrf90qbhif0bd6aywm9rjqrm0sx24yr312f7r7c1dnx";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ zlib python3 ];
+
+  makeFlags = [ "prefix=${placeholder "out"}" ];
+
+  postFixup = ''
+    for f in $out/bin/parallel-* ; do
+      sed -i 's|parallel |${parallel}/bin/parallel |' $f
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Genomic sequence aligner";
+    homepage = "http://last.cbrc.jp/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.x86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/macse/default.nix b/nixpkgs/pkgs/applications/science/biology/macse/default.nix
new file mode 100644
index 000000000000..59938addbe82
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/macse/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "macse";
+  version = "2.03";
+
+  src = fetchurl {
+    url = "https://bioweb.supagro.inra.fr/${pname}/releases/${pname}_v${version}.jar";
+    sha256 = "0jnjyz4f255glg37rawzdv4m6nfs7wfwc5dny7afvx4dz2sv4ssh";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+  unpackPhase = ":";
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/java
+    cp -s $src $out/share/java/macse.jar
+    makeWrapper ${jre}/bin/java $out/bin/macse --add-flags "-jar $out/share/java/macse.jar"
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Multiple alignment of coding sequences";
+    homepage = "https://bioweb.supagro.inra.fr/macse/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/manta/default.nix b/nixpkgs/pkgs/applications/science/biology/manta/default.nix
new file mode 100644
index 000000000000..f0f0575e055a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/manta/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, cmake, zlib, python2 }:
+
+stdenv.mkDerivation rec {
+  pname = "manta";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "Illumina";
+    repo = "manta";
+    rev = "v${version}";
+    sha256 = "1711xkcw8rpw9xv3bbm7v1aryjz4r341rkq5255192dg38sgq7w2";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib python2 ];
+  postFixup = ''
+    sed -i 's|/usr/bin/env python2|${python2.interpreter}|' $out/lib/python/makeRunScript.py
+    sed -i 's|/usr/bin/env python|${python2.interpreter}|' $out/lib/python/pyflow/pyflow.py
+    sed -i 's|/bin/bash|${stdenv.shell}|' $out/lib/python/pyflow/pyflowTaskWrapper.py
+  '';
+  doInstallCheck = true;
+  installCheckPhase = ''
+    rm $out/lib/python/**/*.pyc
+    PYTHONPATH=$out/lib/python:$PYTHONPATH python -c 'import makeRunScript'
+    PYTHONPATH=$out/lib/python/pyflow:$PYTHONPATH python -c 'import pyflowTaskWrapper; import pyflow'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Structural variant caller";
+    license = licenses.gpl3;
+    homepage = "https://github.com/Illumina/manta";
+    maintainers = with maintainers; [ jbedo ];
+    platforms =  platforms.x86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/megahit/default.nix b/nixpkgs/pkgs/applications/science/biology/megahit/default.nix
new file mode 100644
index 000000000000..35ef280ed676
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/megahit/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, zlib }:
+
+stdenv.mkDerivation rec {
+  pname    = "megahit";
+  version = "1.2.9";
+
+  src = fetchFromGitHub {
+    owner = "voutcn";
+    repo = "megahit";
+    rev = "v${version}";
+    sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "An ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph";
+    license     = licenses.gpl3;
+    homepage    = "https://github.com/voutcn/megahit";
+    maintainers = with maintainers; [ luispedro ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix b/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix
new file mode 100644
index 000000000000..201e38cfc538
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, cmake, gcc, gcc-unwrapped }:
+
+stdenv.mkDerivation rec {
+  version = "3.2.1"; 
+  pname = "messer-slim";
+
+  src = fetchurl {
+    url = "https://github.com/MesserLab/SLiM/archive/v${version}.tar.gz";
+    sha256 = "1j3ssjvxpsc21mmzj59kwimglz8pdazi5w6wplmx11x744k77wa1";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ cmake gcc gcc-unwrapped ];
+
+  cmakeFlags = [ "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar" 
+                 "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib" ];
+
+  meta = {
+     description = "An evolutionary simulation framework";
+     homepage = "https://messerlab.org/slim/";
+     license = with stdenv.lib.licenses; [ gpl3 ];
+     maintainers = with stdenv.lib.maintainers; [ bzizou ];
+     platforms = stdenv.lib.platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/science/biology/migrate/default.nix b/nixpkgs/pkgs/applications/science/biology/migrate/default.nix
new file mode 100644
index 000000000000..0e2aa1c1a791
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/migrate/default.nix
@@ -0,0 +1,24 @@
+{ gccStdenv, fetchurl, zlib, openmpi }:
+
+gccStdenv.mkDerivation rec {
+  version = "3.7.2";
+  pname = "migrate";
+
+  src = fetchurl {
+    url = "https://peterbeerli.com/migrate-html5/download_version3/${pname}-${version}.src.tar.gz";
+    sha256 = "1p2364ffjc56i82snzvjpy6pkf6wvqwvlvlqxliscx2c303fxs8v";
+  };
+
+  buildInputs = [ zlib openmpi ];
+  setSourceRoot = ''sourceRoot=$(echo */src)'';
+  buildFlags = [ "thread" "mpis" ];
+  preInstall = "mkdir -p $out/man/man1";
+
+  meta = with gccStdenv.lib; {
+    description = "Estimates population size, migration, population splitting parameters using genetic/genomic data";
+    homepage = "https://peterbeerli.com/migrate-html5/index.html";
+    license = licenses.mit;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix
new file mode 100644
index 000000000000..db803ea4922f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minc-tools/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper, flex, bison, perl, TextFormat,
+  libminc, libjpeg, nifticlib, zlib }:
+
+stdenv.mkDerivation rec {
+  pname   = "minc-tools";
+  version = "unstable-2019-12-04";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "d4dddfdb4e4fa0cea389b8fdce51cfc076565d94";
+    sha256 = "1wwdss59qq4hz1jp35qylfswzzv0d37if23al0srnxkkgc5f8zng";
+  };
+
+  patches = [ ./fix-netcdf-header.patch ];
+
+  nativeBuildInputs = [ cmake flex bison makeWrapper ];
+  buildInputs = [ libminc libjpeg zlib ];
+  propagatedBuildInputs = [ perl TextFormat ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/"
+                 "-DZNZ_INCLUDE_DIR=${nifticlib}/include/"
+                 "-DZNZ_LIBRARY=${nifticlib}/lib/libznz.a"
+                 "-DNIFTI_INCLUDE_DIR=${nifticlib}/include/nifti/"
+                 "-DNIFTI_LIBRARY=${nifticlib}/lib/libniftiio.a" ];
+
+  postFixup = ''
+    for prog in minccomplete minchistory mincpik; do
+      wrapProgram $out/bin/$prog --prefix PERL5LIB : $PERL5LIB
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/minc-tools";
+    description = "Command-line utilities for working with MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch b/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch
new file mode 100644
index 000000000000..89c7564f8b62
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minc-tools/fix-netcdf-header.patch
@@ -0,0 +1,12 @@
+diff --git a/progs/mincdump/mincdump.h b/progs/mincdump/mincdump.h
+index 14c95cd..117ab26 100644
+--- a/progs/mincdump/mincdump.h
++++ b/progs/mincdump/mincdump.h
+@@ -3,6 +3,7 @@
+  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+  *   $Header: /private-cvsroot/minc/progs/mincdump/mincdump.h,v 1.1 2004-04-27 15:35:15 bert Exp $
+  *********************************************************************/
++#include <netcdf_meta.h>
+ 
+ 
+ /* error checking macro */
diff --git a/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix b/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix
new file mode 100644
index 000000000000..497c39a52a4c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper,
+  perlPackages,
+  libminc, octave, coreutils, minc_tools }:
+
+stdenv.mkDerivation rec {
+  pname = "minc-widgets";
+  name  = "${pname}-2016-04-20";
+
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "f08b643894c81a1a2e0fbfe595a17a42ba8906db";
+    sha256 = "1b9g6lf37wpp211ikaji4rf74rl9xcmrlyqcw1zq3z12ji9y33bm";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ libminc ];
+  propagatedBuildInputs = (with perlPackages; [ perl GetoptTabular MNI-Perllib ]) ++ [ octave coreutils minc_tools ];
+
+  postFixup = ''
+    for p in $out/bin/*; do
+      wrapProgram $p --prefix PERL5LIB : $PERL5LIB --set PATH "${stdenv.lib.makeBinPath [ coreutils minc_tools ]}";
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/${pname}";
+    description = "Collection of Perl and shell scripts for processing MINC files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/minia/default.nix b/nixpkgs/pkgs/applications/science/biology/minia/default.nix
new file mode 100644
index 000000000000..2a80de733b08
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minia/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, cmake, hdf5, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "minia";
+  version = "3.2.1";
+
+  src = fetchFromGitHub {
+    owner = "GATB";
+    repo = "minia";
+    rev = "v${version}";
+    sha256 = "0bmfrywixaaql898l0ixsfkhxjf2hb08ssnqzlzacfizxdp46siq";
+    fetchSubmodules = true;
+  };
+
+  patches = [ ./no-bundle.patch ];
+
+  NIX_CFLAGS_COMPILE = [ "-Wformat" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ hdf5 boost ];
+
+  prePatch = ''
+    rm -rf thirdparty/gatb-core/gatb-core/thirdparty/{hdf5,boost}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Short read genome assembler";
+    homepage = "https://github.com/GATB/minia";
+    license = licenses.agpl3;
+    maintainers = with maintainers; [ jbedo ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/minia/no-bundle.patch b/nixpkgs/pkgs/applications/science/biology/minia/no-bundle.patch
new file mode 100644
index 000000000000..21d12c7f6f2d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minia/no-bundle.patch
@@ -0,0 +1,222 @@
+diff --git a/thirdparty/gatb-core/gatb-core/CMakeLists.txt b/thirdparty/gatb-core/gatb-core/CMakeLists.txt
+index f48a70b..0e11ece 100644
+--- a/thirdparty/gatb-core/gatb-core/CMakeLists.txt
++++ b/thirdparty/gatb-core/gatb-core/CMakeLists.txt
+@@ -257,7 +257,6 @@ ADD_SUBDIRECTORY(thirdparty)
+ #  DEPENDENCIES 
+ ################################################################################
+ # we must be sure that hdf5 is built and installed before building gatb-core
+-ADD_DEPENDENCIES (gatbcore-static hdf5 hdf5_postbuild)
+ 
+ ################################################################################
+ #  DOCUMENTATION GENERATION 
+@@ -288,7 +287,6 @@ IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
+     INSTALL (FILES ${PROJECT_SOURCE_DIR}/doc/misc/README.txt  DESTINATION . OPTIONAL)
+     INSTALL (FILES ${PROJECT_SOURCE_DIR}/LICENCE              DESTINATION . OPTIONAL)
+     INSTALL (FILES ${PROJECT_SOURCE_DIR}/THIRDPARTIES.md      DESTINATION . OPTIONAL)
+-    INSTALL (DIRECTORY ${PROJECT_SOURCE_DIR}/thirdparty/boost DESTINATION ./include)
+ ENDIF()
+ 
+ ################################################################################
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/LargeInt.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/LargeInt.hpp
+index dfeee1c..d5553a2 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/LargeInt.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/LargeInt.hpp
+@@ -35,7 +35,7 @@
+ #include <stdint.h>
+ #include <algorithm>
+ #include <iostream>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ #include <gatb/system/api/Exception.hpp>
+ #include <gatb/system/api/config.hpp>
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt128.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt128.hpp
+index 60be5d5..25ae75e 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt128.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt128.hpp
+@@ -33,7 +33,7 @@
+ /********************************************************************************/
+ 
+ #include <iostream>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ #include <gatb/system/api/types.hpp>
+ #include <gatb/tools/misc/api/Abundance.hpp>
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt16.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt16.hpp
+index 6a71bb0..b9205df 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt16.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt16.hpp
+@@ -31,7 +31,7 @@
+ #include <iostream>
+ #include <gatb/system/api/types.hpp>
+ #include <gatb/tools/misc/api/Abundance.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb  {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt32.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt32.hpp
+index c22b892..62e6586 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt32.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt32.hpp
+@@ -31,7 +31,7 @@
+ #include <iostream>
+ #include <gatb/system/api/types.hpp>
+ #include <gatb/tools/misc/api/Abundance.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb  {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt64.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt64.hpp
+index c06aaab..e0befba 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt64.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt64.hpp
+@@ -31,7 +31,7 @@
+ #include <iostream>
+ #include <gatb/system/api/types.hpp>
+ #include <gatb/tools/misc/api/Abundance.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ extern const unsigned char revcomp_4NT[];
+ extern const unsigned char comp_NT    [];
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt8.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt8.hpp
+index 9659874..0c79ff6 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt8.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/math/NativeInt8.hpp
+@@ -31,7 +31,7 @@
+ #include <iostream>
+ #include <gatb/system/api/types.hpp>
+ #include <gatb/tools/misc/api/Abundance.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb  {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/Abundance.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/Abundance.hpp
+index 3cb84f8..cd5d382 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/Abundance.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/Abundance.hpp
+@@ -31,7 +31,7 @@
+ /********************************************************************************/
+ 
+ #include <sys/types.h>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb      {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/IHistogram.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/IHistogram.hpp
+index b8f6c79..a040832 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/IHistogram.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/misc/api/IHistogram.hpp
+@@ -28,7 +28,7 @@
+ 
+ #include <gatb/system/api/ISmartPointer.hpp>
+ #include <gatb/tools/storage/impl/Storage.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb      {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5.hpp
+index 2645abd..fad48c0 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5.hpp
+@@ -40,7 +40,7 @@
+ #include <string>
+ #include <vector>
+ #include <stdarg.h>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb      {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5Patch.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5Patch.hpp
+index a92b729..66d552f 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5Patch.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/CollectionHDF5Patch.hpp
+@@ -40,7 +40,7 @@
+ #include <string>
+ #include <vector>
+ #include <stdarg.h>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ 
+ /********************************************************************************/
+ namespace gatb      {
+diff --git a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/StorageHDF5.hpp b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/StorageHDF5.hpp
+index 29e0949..0565cc4 100644
+--- a/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/StorageHDF5.hpp
++++ b/thirdparty/gatb-core/gatb-core/src/gatb/tools/storage/impl/StorageHDF5.hpp
+@@ -33,7 +33,7 @@
+ #include <gatb/tools/storage/impl/CollectionHDF5.hpp>
+ #include <gatb/tools/storage/impl/CollectionHDF5Patch.hpp>
+ #include <gatb/system/impl/System.hpp>
+-#include <hdf5/hdf5.h>
++#include <hdf5.h>
+ #include <sstream>
+ 
+ /********************************************************************************/
+diff --git a/thirdparty/gatb-core/gatb-core/thirdparty/CMakeLists.txt b/thirdparty/gatb-core/gatb-core/thirdparty/CMakeLists.txt
+index 6e0b5c4..34aef28 100644
+--- a/thirdparty/gatb-core/gatb-core/thirdparty/CMakeLists.txt
++++ b/thirdparty/gatb-core/gatb-core/thirdparty/CMakeLists.txt
+@@ -1,54 +1,3 @@
+-################################################################################
+-#  HDF5 GENERATION 
+-################################################################################
+-
+-#SET (HDF5_ENABLE_THREADSAFE       ON)
+-#SET (H5_HAVE_THREADSAFE 1)
+-
+-##########  MOMENTARY DEACTIVATED => CRASH ON MACOS TO BE INVESTIGATED  ##########
+-SET (HDF5_BUILD_TOOLS             ON CACHE BOOL "Build HDF5 Tools")
+-#SET (CMAKE_EXE_LINKER_FLAGS       "-lpthread -lz")
+-
+-SET (HDF5_EXTERNALLY_CONFIGURED     ON)
+-
+-#SET (HDF5_INSTALL_BIN_DIR           ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
+-#SET (HDF5_INSTALL_LIB_DIR           ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
+-SET (HDF5_INSTALL_BIN_DIR           bin)
+-SET (HDF5_INSTALL_LIB_DIR           lib)
+-
+-SET (HDF5_INSTALL_INCLUDE_DIR       ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE}/hdf5)
+-SET (HDF5_INSTALL_DATA_DIR          ${PROJECT_BINARY_DIR}/share/${CMAKE_BUILD_TYPE})
+-SET (HDF5_INSTALL_CMAKE_DIR         ${PROJECT_BINARY_DIR}/share/${CMAKE_BUILD_TYPE})
+-
+-IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
+-    SET (HDF5_EXPORTED_TARGETS          "gatb-hdf5")
+-ENDIF()
+-
+-IF (NOT DEFINED GATB_CORE_EXCLUDE_HDF5_ZLIB)
+-	OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
+-ENDIF()
+-
+-# We don't want warnings from HDF5 compilation
+-set (COMPILE_DEFINITIONS  "${COMPILE_DEFINITIONS}  -w")
+-add_definitions (${COMPILE_DEFINITIONS})
+-
+-# add HDF5 generation
+-ADD_SUBDIRECTORY (hdf5)
+-
+-# We add a custom target for copying header files.
+-add_custom_target (hdf5_postbuild ALL)
+-
+-# We build the output directory
+-add_custom_command (TARGET hdf5_postbuild POST_BUILD  COMMAND ${CMAKE_COMMAND} -E make_directory ${HDF5_INSTALL_INCLUDE_DIR})
+-
+-# We define all the header files to be copied
+-file (GLOB headerfiles ${PROJECT_SOURCE_DIR}/thirdparty/hdf5/src/*.h ${PROJECT_BINARY_DIR}/thirdparty/hdf5/H5pubconf.h)
+-
+-# We copy each header file
+-foreach (header ${headerfiles})
+-  add_custom_command (TARGET hdf5_postbuild POST_BUILD  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header} ${HDF5_INSTALL_INCLUDE_DIR}  )
+-endforeach()
+-
+ # include other smaller libraries (json, Boophf)
+ 
+ add_custom_target (thirdparty_copy ALL)
diff --git a/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix b/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix
new file mode 100644
index 000000000000..e33a17537910
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "minimap2";
+  version = "2.17";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "lh3";
+    rev = "v${version}";
+    sha256 = "0qdwlkib3aa6112372hdgvnvk86hsjjkhjar0p53pq4ajrr2cdlb";
+  };
+
+  buildInputs = [ zlib ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp minimap2 $out/bin
+    mkdir -p $out/share/man/man1
+    cp minimap2.1 $out/share/man/man1
+  '';
+  
+  meta = with stdenv.lib; {
+    description = "A versatile pairwise aligner for genomic and spliced nucleotide sequences";
+    homepage = "https://lh3.github.io/minimap2";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.arcadio ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix b/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix
new file mode 100644
index 000000000000..254d874f9d91
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mni_autoreg/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper, perlPackages, libminc }:
+
+stdenv.mkDerivation rec {
+  pname = "mni_autoreg";
+  name  = "${pname}-2017-09-22";
+
+  src = fetchFromGitHub {
+    owner = "BIC-MNI";
+    repo = pname;
+    rev = "ab99e29987dc029737785baebf24896ec37a2d76";
+    sha256 = "0axl069nv57vmb2wvqq7s9v3bfxwspzmk37bxm4973ai1irgppjq";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ libminc ];
+  propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" ];
+  # testing broken: './minc_wrapper: Permission denied' from Testing/ellipse0.mnc
+
+  postFixup = ''
+    for prog in autocrop mritoself mritotal xfmtool; do
+      echo $out/bin/$prog
+      wrapProgram $out/bin/$prog --prefix PERL5LIB : $PERL5LIB;
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/BIC-MNI/mni_autoreg";
+    description = "Tools for automated registration using the MINC image format";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix b/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix
new file mode 100644
index 000000000000..21af5b82207b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mosdepth/default.nix
@@ -0,0 +1,45 @@
+{stdenv, fetchFromGitHub, nim, htslib, pcre}:
+
+let
+  hts-nim = fetchFromGitHub {
+    owner = "brentp";
+    repo = "hts-nim";
+    rev = "v0.3.4";
+    sha256 = "0670phk1bq3l9j2zaa8i5wcpc5dyfrc0l2a6c21g0l2mmdczffa7";
+  };
+
+  docopt = fetchFromGitHub {
+    owner = "docopt";
+    repo = "docopt.nim";
+    rev = "v0.6.7";
+    sha256 = "1ga7ckg21fzwwvh26jp2phn2h3pvkn8g8sm13dxif33rp471bv37";
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "mosdepth";
+  version = "0.2.9";
+
+  src = fetchFromGitHub {
+    owner = "brentp";
+    repo = "mosdepth";
+    rev = "v${version}";
+    sha256 = "01gm9gj2x2zs4yx6wk761fi1papi7qr3gp4ln1kkn8n2f9y9h849";
+  };
+
+  buildInputs = [ nim ];
+
+  buildPhase = ''
+    HOME=$TMPDIR
+    nim -p:${hts-nim}/src -p:${docopt}/src c --nilseqs:on -d:release mosdepth.nim
+  '';
+  installPhase = "install -Dt $out/bin mosdepth";
+  fixupPhase = "patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ stdenv.cc.cc htslib pcre ]} $out/bin/mosdepth";
+
+  meta = with stdenv.lib; {
+    description = "fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing.";
+    license = licenses.mit;
+    homepage = "https://github.com/brentp/mosdepth";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/mrbayes/builder.sh b/nixpkgs/pkgs/applications/science/biology/mrbayes/builder.sh
new file mode 100644
index 000000000000..5b3a54946fc9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mrbayes/builder.sh
@@ -0,0 +1,9 @@
+# builder for mrbayes - note: only builds on Unix
+
+source $stdenv/setup
+
+tar xvfz $src
+cd mrbayes-*
+make
+mkdir -p $out/bin
+cp -v mb $out/bin
diff --git a/nixpkgs/pkgs/applications/science/biology/mrbayes/default.nix b/nixpkgs/pkgs/applications/science/biology/mrbayes/default.nix
new file mode 100644
index 000000000000..8ee7bccf075f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mrbayes/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, readline}:
+
+stdenv.mkDerivation rec {
+  # FIXME: replace Makefile so we can build MPI & MAC support
+
+  name = "mrbayes-3.1.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/mrbayes/${name}.tar.gz";
+    sha256 = "1x7j8ca5wjrqrxmcpvd375ydm3s2pbkzykv8xfhg1jc037g560n6";
+  };
+  builder = ./builder.sh;
+  buildInputs = [readline];
+
+  meta = {
+    description     = "Bayesian Inference of Phylogeny";
+    longDescription = ''
+      Bayesian inference of phylogeny is based upon a
+      quantity called the posterior probability distribution of trees, which is
+      the probability of a tree conditioned on the observations. The conditioning
+      is accomplished using Bayes's theorem. The posterior probability
+      distribution of trees is impossible to calculate analytically; instead,
+      MrBayes uses a simulation technique called Markov chain Monte Carlo (or
+      MCMC) to approximate the posterior probabilities of trees.
+    '';
+    license     = "GPL2";
+    homepage    = "http://mrbayes.csit.fsu.edu/";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix
new file mode 100644
index 000000000000..528277e05e38
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix
@@ -0,0 +1,92 @@
+{ stdenv, lib, fetchFromGitHub, python, makeWrapper
+, eigen, fftw, libtiff, libpng, zlib, ants, bc
+, qt5, libGL, libGLU, libX11, libXext
+, withGui ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "mrtrix";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner  = "MRtrix3";
+    repo   = "mrtrix3";
+    rev    = version;
+    sha256 = "1vvmmbw3m0bdfwp4szr62ygzsvkj0ss91cx5zlkspsr1rff05f9b";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ eigen makeWrapper ] ++ lib.optional withGui qt5.wrapQtAppsHook;
+
+  buildInputs = [
+    ants
+    python
+    fftw
+    libtiff
+    libpng
+    zlib
+  ] ++ lib.optionals withGui [
+    libGL
+    libGLU
+    libX11
+    libXext
+    qt5.qtbase
+    qt5.qtsvg
+  ];
+
+  installCheckInputs = [ bc ];
+
+  postPatch = ''
+    patchShebangs ./build ./configure ./run_tests ./bin/*
+
+    # patching interpreters before fixup is needed for tests:
+    patchShebangs ./bin/*
+    patchShebangs testing/binaries/data/vectorstats/*py
+
+    substituteInPlace ./run_tests  \
+      --replace 'git submodule update --init $datadir >> $LOGFILE 2>&1' ""
+  '';
+
+  configurePhase = ''
+    export EIGEN_CFLAGS="-isystem ${eigen}/include/eigen3"
+    unset LD  # similar to https://github.com/MRtrix3/mrtrix3/issues/1519
+    ./configure ${lib.optionalString (!withGui) "-nogui"};
+  '';
+
+  buildPhase = ''
+    ./build
+    (cd testing && ../build)
+  '';
+
+  installCheckPhase = ''
+    ./run_tests units
+    ./run_tests binaries
+
+    # can also `./run_tests scripts`, but this fails due to lack of FSL package
+    # (and there's no convenient way to disable individual tests)
+  '';
+  doInstallCheck = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out
+    cp -ar lib $out/lib
+    cp -ar bin $out/bin
+    runHook postInstall
+  '';
+
+  postInstall = ''
+    for prog in $out/bin/*; do
+      if [[ -x "$prog" ]]; then
+        wrapProgram $prog --prefix PATH : ${lib.makeBinPath [ ants ]}
+      fi
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/MRtrix3/mrtrix3";
+    description = "Suite of tools for diffusion imaging";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.linux;
+    license   = licenses.mpl20;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/muscle/default.nix b/nixpkgs/pkgs/applications/science/biology/muscle/default.nix
new file mode 100644
index 000000000000..7ed18349259e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/muscle/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  _name   = "muscle";
+  name    = "${_name}-${version}";
+  version = "3.8.31";
+
+  src = fetchurl {
+    url = "https://www.drive5.com/muscle/downloads${version}/${_name}${version}_src.tar.gz";
+    sha256 = "1b89z0x7h098g99g00nqadgjnb2r5wpi9s11b7ddffqkh9m9dia3";
+  };
+
+  patches = [
+    ./muscle-3.8.31-no-static.patch
+  ];
+
+  preBuild = ''
+    cd ./src/
+    patchShebangs mk
+  '';
+
+  installPhase = ''
+    install -vD muscle $out/bin/muscle
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A multiple sequence alignment method with reduced time and space complexity";
+    license     = licenses.publicDomain;
+    homepage    = "https://www.drive5.com/muscle/";
+    maintainers = [ maintainers.unode ];
+    # NOTE: Supposed to be compatible with darwin/intel & PPC but currently fails.
+    # Anyone with access to these platforms is welcome to give it a try
+    platforms   = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch b/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch
new file mode 100644
index 000000000000..7f4b2129518d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch
@@ -0,0 +1,21 @@
+--- a/src/mk	2010-05-02 01:15:42.000000000 +0200
++++ b/src/mk	2018-01-27 17:07:23.539092748 +0100
+@@ -5,14 +5,14 @@
+ rm -f *.o muscle.make.stdout.txt muscle.make.stderr.txt
+ for CPPName in $CPPNames
+ do
+-  echo $CPPName >> /dev/tty
++  echo $CPPName
+   g++ $ENV_GCC_OPTS -c -O3 -msse2 -mfpmath=sse -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 $CPPName.cpp -o $CPPName.o  >> muscle.make.stdout.txt 2>> muscle.make.stderr.txt
+ done
+ 
+ LINK_OPTS=
+-if [ `uname -s` == Linux ] ; then
+-    LINK_OPTS=-static
+-fi
++#if [ `uname -s` == Linux ] ; then
++#    LINK_OPTS=-static
++#fi
+ g++ $LINK_OPTS $ENV_LINK_OPTS -g -o muscle $ObjNames  >> muscle.make.stdout.txt 2>> muscle.make.stderr.txt
+ tail muscle.make.stderr.txt
+ 
diff --git a/nixpkgs/pkgs/applications/science/biology/ncbi-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/ncbi-tools/default.nix
new file mode 100644
index 000000000000..cc8ebf7f37d9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/ncbi-tools/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, cpio}:
+
+# The NCBI package only builds on 32bits - on 64bits it breaks because
+# of position dependent code. Debian packagers have written replacement
+# make files(!). Either we use these, or negotiate a version which can
+# be pushed upstream to NCBI.
+#
+# Another note: you may want the older and deprecated C-libs at ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/Mar_17_2008/NCBI_C_Toolkit/ncbi_c--Mar_17_2008.tar.gz
+
+stdenv.mkDerivation rec {
+  name = "ncbi_tools";
+  ncbi_version = "Dec_31_2008";
+  src = fetchurl {
+    url = "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/2008/${ncbi_version}/ncbi_cxx--${ncbi_version}.tar.gz";
+    sha256 = "1b2v0dcdqn3bysgdkj57sxmd6s0hc9wpnxssviz399g6plhxggbr";
+  };
+
+  configureFlags = [ 
+    "--without-debug"
+    "--with-bin-release"
+    "--with-dll"
+    "--without-static"
+  ];
+  buildInputs = [ cpio ];
+
+  meta = {
+    description = ''NCBI Bioinformatics toolbox (incl. BLAST)'';
+    longDescription = ''The NCBI Bioinformatics toolsbox, including command-line utilties, libraries and include files. No X11 support'';
+    homepage = "http://www.ncbi.nlm.nih.gov/IEB/ToolBox/"; 
+    license = "GPL";
+    priority = 5;   # zlib.so gives a conflict with zlib
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/neuron/default.nix b/nixpkgs/pkgs/applications/science/biology/neuron/default.nix
new file mode 100644
index 000000000000..8cad5f466c5f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/neuron/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, fetchurl
+, pkgconfig
+, automake
+, autoconf
+, libtool
+, ncurses
+, readline
+, which
+, python ? null
+, mpi ? null
+, iv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "neuron";
+  version = "7.5";
+
+  nativeBuildInputs = [ which pkgconfig automake autoconf libtool ];
+  buildInputs = [ ncurses readline python mpi iv ];
+
+  src = fetchurl {
+    url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz";
+    sha256 = "0f26v3qvzblcdjg7isq0m9j2q8q7x3vhmkfllv8lsr3gyj44lljf";
+  };
+
+  patches = (stdenv.lib.optional (stdenv.isDarwin) [ ./neuron-carbon-disable.patch ]);
+
+  # With LLVM 3.8 and above, clang (really libc++) gets upset if you attempt to redefine these...
+  postPatch = stdenv.lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace src/gnu/neuron_gnu_builtin.h \
+      --replace 'double abs(double arg);' "" \
+      --replace 'float abs(float arg);' "" \
+      --replace 'short abs(short arg);' "" \
+      --replace 'long abs(long arg);' ""
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # we are darwin, but we don't have all the quirks the source wants to compensate for
+    substituteInPlace src/nrnpython/setup.py.in --replace 'readline="edit"' 'readline="readline"'
+    for f in src/nrnpython/*.[ch] ; do
+      substituteInPlace $f --replace "<Python/Python.h>" "<Python.h>"
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  ## neuron install by default everything under prefix/${host_arch}/*
+  ## override this to support nix standard file hierarchy
+  ## without issues: install everything under prefix/
+  preConfigure = ''
+    ./build.sh
+    export prefix="''${prefix} --exec-prefix=''${out}"
+  '';
+
+  configureFlags = with stdenv.lib;
+                    [ "--with-readline=${readline}" "--with-iv=${iv}" ]
+                    ++  optionals (python != null)  [ "--with-nrnpython=${python.interpreter}" ]
+                    ++ (if mpi != null then ["--with-mpi" "--with-paranrn"]
+                        else ["--without-mpi"]);
+
+
+  postInstall = stdenv.lib.optionals (python != null) [ ''
+    ## standardise python neuron install dir if any
+    if [[ -d $out/lib/python ]]; then
+        mkdir -p ''${out}/${python.sitePackages}
+        mv ''${out}/lib/python/*  ''${out}/${python.sitePackages}/
+    fi
+  ''];
+
+  propagatedBuildInputs = [ readline ncurses which libtool ];
+
+  meta = with stdenv.lib; {
+    description = "Simulation environment for empirically-based simulations of neurons and networks of neurons";
+
+    longDescription = "NEURON is a simulation environment for developing and exercising models of
+                neurons and networks of neurons. It is particularly well-suited to problems where
+                cable properties of cells play an important role, possibly including extracellular
+                potential close to the membrane), and where cell membrane properties are complex,
+                involving many ion-specific channels, ion accumulation, and second messengers";
+
+    license     = licenses.bsd3;
+    homepage    = "http://www.neuron.yale.edu/neuron";
+    maintainers = [ maintainers.adev ];
+    # source claims it's only tested for x86 and powerpc
+    platforms   = platforms.x86_64 ++ platforms.i686;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch b/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch
new file mode 100644
index 000000000000..923bffb1c338
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch
@@ -0,0 +1,21 @@
+--- nrn-7.4/src/mac/Makefile.am	2015-11-12 21:42:45.000000000 +0100
++++ nrn-7.4.new/src/mac/Makefile.am	2016-08-24 17:43:39.000000000 +0200
+@@ -15,18 +15,8 @@
+ host_cpu = @host_cpu@
+ 
+ if MAC_DARWIN
+-carbon = @enable_carbon@
+ bin_SCRIPTS = $(launch_scripts)
+ install: install-am
+-if UniversalMacBinary
+-	$(CC) -arch ppc -o aoutppc -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
+-	$(CC) -arch i386 -o aouti386 -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
+-	lipo aouti386 aoutppc -create -output a.out
+-else
+-	gcc -g -arch i386 -Dncpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
+-
+-endif
+-	carbon=$(carbon) sh $(srcdir)/launch_inst.sh "$(host_cpu)" "$(DESTDIR)$(prefix)" "$(srcdir)"
+ 	for i in $(S) ; do \
+ 		sed "s/^CPU.*/CPU=\"$(host_cpu)\"/" < $(DESTDIR)$(bindir)/$$i > temp; \
+ 		mv temp $(DESTDIR)$(bindir)/$$i; \
diff --git a/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix b/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix
new file mode 100644
index 000000000000..fd7dc4f1fbb4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, cmake, zlib }:
+
+stdenv.mkDerivation rec {
+  pname   = "niftyreg";
+  version = "1.3.9";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/nifty_reg-${version}/nifty_reg-${version}.tar.gz";
+    sha256 = "07v9v9s41lvw72wpb1jgh2nzanyc994779bd35p76vg8mzifmprl";
+  };
+
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftyReg";
+    description = "Medical image registration software";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = [ "x86_64-linux" ];
+    license   = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/niftyseg/default.nix b/nixpkgs/pkgs/applications/science/biology/niftyseg/default.nix
new file mode 100644
index 000000000000..38194697223d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/niftyseg/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, cmake, eigen, zlib }:
+
+stdenv.mkDerivation rec {
+  pname   = "niftyseg";
+  version = "1.0";
+  src = fetchurl {
+    url    = "https://github.com/KCL-BMEIS/NiftySeg/archive/v${version}.tar.gz";
+    sha256 = "11q6yldsxp3k6gfp94c0xhcan2y3finzv8lzizmrc79yps3wjkn0";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen zlib ];
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "http://cmictig.cs.ucl.ac.uk/research/software/software-nifty/niftyseg";
+    description = "Software for medical image segmentation, bias field correction, and cortical thickness calculation";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.bsd3;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/octopus/default.nix b/nixpkgs/pkgs/applications/science/biology/octopus/default.nix
new file mode 100644
index 000000000000..9d81e08d7293
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/octopus/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchFromGitHub, cmake, boost, gmp, htslib, zlib, lzma, pkg-config}:
+
+stdenv.mkDerivation rec {
+  pname = "octopus";
+  version = "0.6.3-beta";
+
+  src = fetchFromGitHub {
+    owner = "luntergroup";
+    repo = "octopus";
+    rev = "v${version}";
+    sha256 = "042fycg8ppld7iajpzq2d8h8wr0nw43zbl57y125sfihryvr373n";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ boost gmp htslib zlib lzma ];
+
+  postInstall = ''
+    mkdir $out/bin
+    mv $out/octopus $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Bayesian haplotype-based mutation calling";
+    license = licenses.mit;
+    homepage = "https://github.com/luntergroup/octopus";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.x86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/paml/default.nix b/nixpkgs/pkgs/applications/science/biology/paml/default.nix
new file mode 100644
index 000000000000..7a2dc2782ab0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/paml/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  version = "4.9j";
+  pname = "paml";
+  src = fetchurl {
+    url = "http://abacus.gene.ucl.ac.uk/software/paml${version}.tgz";
+    sha256 = "0qflf3i27x6jwks3c6q560m1q8r043ja96syah145113iz5wdalp";
+  };
+
+  preBuild = ''
+    cd ./src/
+  '';
+  installPhase = ''
+    mkdir -pv $out/bin
+    cp -v codeml $out/bin
+    cp -v baseml $out/bin
+    cp -v basemlg $out/bin
+    cp -v chi2 $out/bin
+    cp -v codeml $out/bin
+    cp -v evolver $out/bin
+    cp -v mcmctree $out/bin
+    cp -v pamp $out/bin
+    cp -v yn00 $out/bin
+  '';
+
+  meta = {
+    description     = "Phylogenetic Analysis by Maximum Likelihood (PAML)";
+    longDescription = ''PAML is a package of programs for phylogenetic analyses of DNA or protein sequences using maximum likelihood. It is maintained and distributed for academic use free of charge by Ziheng Yang. ANSI C source codes are distributed for UNIX/Linux/Mac OSX, and executables are provided for MS Windows. PAML is not good for tree making. It may be used to estimate parameters and test hypotheses to study the evolutionary process, when you have reconstructed trees using other programs such as PAUP*, PHYLIP, MOLPHY, PhyML, RaxML, etc.'';
+    license     = "non-commercial";
+    homepage    = "http://abacus.gene.ucl.ac.uk/software/paml.html";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix
new file mode 100644
index 000000000000..4b455eaca6fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, jre, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "picard-tools";
+  version = "2.22.8";
+
+  src = fetchurl {
+    url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar";
+    sha256 = "0g387jlf7r1p2kx8gya3vxksbjy3y2ywxa7yjqmxg3y8725fyixl";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ jre ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/libexec/picard
+    cp $src $out/libexec/picard/picard.jar
+    mkdir -p $out/bin
+    makeWrapper ${jre}/bin/java $out/bin/picard --add-flags "-jar $out/libexec/picard/picard.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tools for high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF";
+    license = licenses.mit;
+    homepage = "https://broadinstitute.github.io/picard/";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/platypus/default.nix b/nixpkgs/pkgs/applications/science/biology/platypus/default.nix
new file mode 100644
index 000000000000..30e45d5af0ec
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/platypus/default.nix
@@ -0,0 +1,38 @@
+{stdenv, fetchFromGitHub, python27, htslib, zlib, makeWrapper}:
+
+let python = python27.withPackages (ps: with ps; [ cython ]);
+
+in stdenv.mkDerivation {
+  pname = "platypus-unstable";
+  version = "2018-07-22";
+
+  src = fetchFromGitHub {
+    owner = "andyrimmer";
+    repo = "Platypus";
+    rev = "3e72641c69800da0cd4906b090298e654d316ee1";
+    sha256 = "0nah6r54b8xm778gqyb8b7rsd76z8ji4g73sm6rvpw5s96iib1vw";
+  };
+
+  buildInputs = [ htslib python zlib makeWrapper ];
+
+  buildPhase = ''
+    patchShebangs .
+    make
+  '';
+
+  installPhase = ''
+    mkdir -p $out/libexec/platypus
+    cp -r ./* $out/libexec/platypus
+
+    mkdir -p $out/bin
+    makeWrapper ${python}/bin/python $out/bin/platypus --add-flags "$out/libexec/platypus/bin/Platypus.py"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The Platypus variant caller";
+    license = licenses.gpl3;
+    homepage = "https://github.com/andyrimmer/Platypus";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.x86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix b/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix
new file mode 100644
index 000000000000..0a31ff6ba4fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, zlib, blas, lapack, darwin}:
+
+stdenv.mkDerivation rec {
+  pname = "plink-ng";
+  version = "1.90b3";
+
+  src = fetchFromGitHub {
+    owner = "chrchang";
+    repo = "plink-ng";
+    rev = "v${version}";
+    sha256 = "1zhffjbwpd50dxywccbnv1rxy9njwz73l4awc5j7i28rgj3davcq";
+  };
+
+  buildInputs = [ zlib ] ++ (if stdenv.isDarwin then [ darwin.apple_sdk.frameworks.Accelerate ] else [ blas lapack ]) ;
+
+  preBuild = ''
+    sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
+    ${if stdenv.cc.isClang then "sed -i 's|g++|clang++|g' Makefile.std" else ""}
+
+    makeFlagsArray+=(
+      ZLIB=-lz
+      BLASFLAGS="-lblas -lcblas -llapack"
+    );
+  '';
+
+  makefile = "Makefile.std";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp plink $out/bin
+  '';
+
+  meta = {
+    description = "A comprehensive update to the PLINK association analysis toolset";
+    homepage = "https://www.cog-genomics.org/plink2";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/plink/default.nix b/nixpkgs/pkgs/applications/science/biology/plink/default.nix
new file mode 100644
index 000000000000..009e12aa02f0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/plink/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, zlib, unzip }:
+
+stdenv.mkDerivation {
+  name = "plink-1.07";
+
+  src = fetchurl {
+    url = "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-1.07-src.zip";
+    sha256 = "4af56348443d0c6a1db64950a071b1fcb49cc74154875a7b43cccb4b6a7f482b";
+  };
+
+  buildInputs = [ zlib unzip ] ;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp plink $out/bin
+  '';
+  
+  meta = {
+    description = "Whole genome association toolkit";
+    homepage = "http://pngu.mgh.harvard.edu/~purcell/plink/";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.all;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/poretools/default.nix b/nixpkgs/pkgs/applications/science/biology/poretools/default.nix
new file mode 100755
index 000000000000..a9f3fdb24672
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/poretools/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, pythonPackages, fetchFromGitHub }:
+
+pythonPackages.buildPythonPackage rec {
+  pname = "poretools";
+  version = "unstable-2016-07-10";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "arq5x";
+    rev = "e426b1f09e86ac259a00c261c79df91510777407";
+    sha256 = "0bglj833wxpp3cq430p1d3xp085ls221js2y90w7ir2x5ay8l7am";
+  };
+
+  propagatedBuildInputs = [pythonPackages.h5py pythonPackages.matplotlib pythonPackages.seaborn pythonPackages.pandas];
+
+  meta = {
+    description = "a toolkit for working with nanopore sequencing data from Oxford Nanopore";
+    license = stdenv.lib.licenses.mit;
+    homepage = "https://poretools.readthedocs.io/en/latest/";
+    maintainers = [stdenv.lib.maintainers.rybern];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/prodigal/default.nix b/nixpkgs/pkgs/applications/science/biology/prodigal/default.nix
new file mode 100644
index 000000000000..ba51c93c38c2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/prodigal/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "prodigal";
+  version = "2.6.3";
+
+  src = fetchFromGitHub {
+    repo = "Prodigal";
+    owner = "hyattpd";
+    rev = "v${version}";
+    sha256 = "1fs1hqk83qjbjhrvhw6ni75zakx5ki1ayy3v6wwkn3xvahc9hi5s";
+  };
+
+  makeFlags = [
+    "CC=cc"
+    "INSTALLDIR=$(out)/bin"
+  ];
+  
+  meta = with stdenv.lib; {
+    description = "Fast, reliable protein-coding gene prediction for prokaryotic genomes";
+    homepage = "https://github.com/hyattpd/Prodigal";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ luispedro ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/quast/default.nix b/nixpkgs/pkgs/applications/science/biology/quast/default.nix
new file mode 100644
index 000000000000..e3c3ea23c2c0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/quast/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, python3Packages, zlib, bash, coreutils }:
+
+let
+  pythonPackages = python3Packages;
+  inherit (pythonPackages) python;
+in
+
+pythonPackages.buildPythonApplication rec {
+  pname = "quast";
+  version = "5.0.2";
+
+  src = fetchurl {
+    url = "https://github.com/ablab/quast/releases/download/${pname}_${version}/${pname}-${version}.tar.gz";
+    sha256 = "13ml8qywbb4cc7wf2x7z5mz1rjqg51ab8wkizwcg4f6c40zgif6d";
+  };
+
+  pythonPath = with pythonPackages; [ simplejson joblib setuptools matplotlib ];
+
+  nativeBuildInputs = [ coreutils ];
+
+  buildInputs = [ zlib ] ++ pythonPath;
+
+  dontConfigure = true;
+
+  dontBuild = true;
+
+  installPhase = ''
+    substituteInPlace quast_libs/bedtools/Makefile \
+      --replace "/bin/bash" "${bash}/bin/bash"
+    mkdir -p "$out/${python.sitePackages}"
+    export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
+    ${python.interpreter} setup.py install \
+      --install-lib=$out/${python.sitePackages} \
+      --prefix="$out"
+  '';
+
+   postFixup = ''
+   for file in $(find $out -type f -type f -perm /0111); do
+       old_rpath=$(patchelf --print-rpath $file) && \
+       patchelf --set-rpath $old_rpath:${stdenv.cc.cc.lib}/lib $file || true
+   done
+   # Link to the master program
+   ln -s $out/bin/quast.py $out/bin/quast
+  '';
+
+  dontPatchELF = true;
+
+  # Tests need to download data files, so manual run after packaging is needed
+  doCheck = false;
+
+  meta = with stdenv.lib ; {
+    description = "Evaluates genome assemblies by computing various metrics";
+    homepage = "https://github.com/ablab/quast";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/raxml/default.nix b/nixpkgs/pkgs/applications/science/biology/raxml/default.nix
new file mode 100644
index 000000000000..5c7353af9315
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/raxml/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, fetchFromGitHub
+, pkgs
+, mpi ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "RAxML";
+  version = "8.2.12";
+
+  src = fetchFromGitHub {
+    owner = "stamatak";
+    repo = "standard-${pname}";
+    rev = "v${version}";
+    sha256 = "1jqjzhch0rips0vp04prvb8vmc20c5pdmsqn8knadcf91yy859fh";
+  };
+
+  buildInputs = if mpi then [ pkgs.openmpi ] else [];
+
+  # TODO darwin, AVX and AVX2 makefile targets
+  buildPhase = if mpi then ''
+      make -f Makefile.MPI.gcc
+    '' else ''
+      make -f Makefile.SSE3.PTHREADS.gcc
+    '';
+
+  installPhase = if mpi then ''
+    mkdir -p $out/bin && cp raxmlHPC-MPI $out/bin
+  '' else ''
+    mkdir -p $out/bin && cp raxmlHPC-PTHREADS-SSE3 $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for Phylogenetic Analysis and Post-Analysis of Large Phylogenies";
+    license = licenses.gpl3;
+    homepage = "https://sco.h-its.org/exelixis/web/software/raxml/";
+    maintainers = [ maintainers.unode ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/default.nix b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix
new file mode 100644
index 000000000000..e750eea89ac9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, zlib, htslib, perl, ncurses ? null }:
+
+stdenv.mkDerivation rec {
+  pname = "samtools";
+  version = "1.10";
+
+  src = fetchurl {
+    url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "119ms0dpydw8dkh3zc4yyw9zhdzgv12px4l2kayigv31bpqcb7kv";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  buildInputs = [ zlib ncurses htslib ];
+
+  configureFlags = [ "--with-htslib=${htslib}" ]
+    ++ stdenv.lib.optional (ncurses == null) "--without-curses";
+
+  preCheck = ''
+    patchShebangs test/
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Tools for manipulating SAM/BAM/CRAM format";
+    license = licenses.mit;
+    homepage = "http://www.htslib.org/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.mimame ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/samtools-0.1.19-no-curses.patch b/nixpkgs/pkgs/applications/science/biology/samtools/samtools-0.1.19-no-curses.patch
new file mode 100644
index 000000000000..a7782a1a0264
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/samtools/samtools-0.1.19-no-curses.patch
@@ -0,0 +1,22 @@
+diff --git a/Makefile b/Makefile
+index 2f51bfc..395d6f1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ CC=			gcc
+ CFLAGS=		-g -Wall -O2
+ #LDFLAGS=		-Wl,-rpath,\$$ORIGIN/../lib
+-DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
++DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE # -D_CURSES_LIB=1
+ KNETFILE_O=	knetfile.o
+ LOBJS=		bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o	\
+ 			bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o \
+@@ -15,7 +15,7 @@ PROG=		samtools
+ INCLUDES=	-I.
+ SUBDIRS=	. bcftools misc
+ LIBPATH=
+-LIBCURSES=	-lcurses # -lXCurses
++LIBCURSES=	# -lcurses # -lXCurses
+ 
+ .SUFFIXES:.c .o
+ .PHONY: all lib
diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix b/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix
new file mode 100644
index 000000000000..d62c2a1fe7b1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "samtools";
+  version = "0.1.19";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/samtools/${pname}-${version}.tar.bz2";
+    sha256 = "d080c9d356e5f0ad334007e4461cbcee3c4ca97b8a7a5a48c44883cf9dee63d4";
+  };
+
+  patches = [
+    ./samtools-0.1.19-no-curses.patch
+  ];
+
+  buildInputs = [ zlib ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/man
+
+    cp samtools $out/bin
+    cp samtools.1 $out/share/man
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tools for manipulating SAM/BAM/CRAM format";
+    license = licenses.mit;
+    homepage = "http://samtools.sourceforge.net/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.unode ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/seaview/default.nix b/nixpkgs/pkgs/applications/science/biology/seaview/default.nix
new file mode 100644
index 000000000000..4192de714d0b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/seaview/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, coreutils, fltk, libjpeg }:
+
+stdenv.mkDerivation rec {
+  version = "5.0.2";
+  pname = "seaview";
+
+  src = fetchurl {
+    url = "ftp://pbil.univ-lyon1.fr/pub/mol_phylogeny/seaview/archive/seaview_${version}.tar.gz";
+    sha256 = "0bad0nd18a36g6ysx28j68rbnwqn33ra8inx2lv2igqqcs6i5kif";
+  };
+
+  buildInputs = [ fltk libjpeg ];
+
+  patchPhase = "sed -i 's#PATH=/bin:/usr/bin rm#'${coreutils}/bin/rm'#' seaview.cxx";
+  installPhase = "mkdir -p $out/bin; cp seaview $out/bin";
+
+  meta = with stdenv.lib; {
+    description = "GUI for molecular phylogeny";
+    longDescription = ''
+      SeaView is a multiplatform, graphical user interface for multiple sequence alignment and molecular phylogeny.
+        - SeaView reads and writes various file formats (NEXUS, MSF, CLUSTAL, FASTA, PHYLIP, MASE, Newick) of DNA and protein sequences and of phylogenetic trees.
+        - SeaView drives programs muscle or Clustal Omega for multiple sequence alignment, and also allows to use any external alignment algorithm able to read and write FASTA-formatted files.
+        - Seaview drives the Gblocks program to select blocks of evolutionarily conserved sites.
+        - SeaView computes phylogenetic trees by
+          + parsimony, using PHYLIP's dnapars/protpars algorithm,
+          + distance, with NJ or BioNJ algorithms on a variety of evolutionary distances,
+          + maximum likelihood, driving program PhyML 3.1.
+        - Seaview can use the Transfer Bootstrap Expectation method to compute the bootstrap support of PhyML and distance trees.
+        - SeaView prints and draws phylogenetic trees on screen, SVG, PDF or PostScript files.
+        - SeaView allows to download sequences from EMBL/GenBank/UniProt using the Internet.
+
+      Seaview is published in:
+
+          Gouy M., Guindon S. & Gascuel O. (2010) SeaView version 4 : a multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular Biology and Evolution 27(2):221-224.
+    '';
+    homepage = "http://doua.prabi.fr/software/seaview";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.iimog ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix
new file mode 100644
index 000000000000..c68fcfada332
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl, jre, unzip, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "snpeff";
+  version = "4.3t";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/snpeff/snpEff_v${builtins.replaceStrings [ "." ] [ "_" ] version}_core.zip";
+    sha256 = "0i12mv93bfv8xjwc3rs2x73d6hkvi7kgbbbx3ry984l3ly4p6nnm";
+  };
+
+  buildInputs = [ unzip jre makeWrapper ];
+
+  sourceRoot = "snpEff";
+
+  installPhase = ''
+    mkdir -p $out/libexec/snpeff
+    cp *.jar *.config $out/libexec/snpeff
+
+    mkdir -p $out/bin
+    makeWrapper ${jre}/bin/java $out/bin/snpeff --add-flags "-jar $out/libexec/snpeff/snpEff.jar"
+    makeWrapper ${jre}/bin/java $out/bin/snpsift --add-flags "-jar $out/libexec/snpeff/SnpSift.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Genetic variant annotation and effect prediction toolbox.";
+    license = licenses.lgpl3;
+    homepage = "http://snpeff.sourceforge.net/";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/somatic-sniper/default.nix b/nixpkgs/pkgs/applications/science/biology/somatic-sniper/default.nix
new file mode 100644
index 000000000000..17d9c3dbb55c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/somatic-sniper/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchFromGitHub, cmake, zlib, ncurses}:
+
+stdenv.mkDerivation rec {
+  pname = "somatic-sniper";
+  version = "1.0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "genome";
+    repo = "somatic-sniper";
+    rev = "v${version}";
+    sha256 = "0lk7p9sp6mp50f6w1nppqhr40fcwy1asw06ivw8w8jvvnwaqf987";
+  };
+
+  patches = [ ./somatic-sniper.patch ];
+
+  buildInputs = [ cmake zlib ncurses ];
+
+  enableParallelBuilding = false;
+
+  meta = with stdenv.lib; {
+    description = "Identify single nucleotide positions that are different between tumor and normal";
+    license = licenses.mit;
+    homepage = "https://github.com/genome/somatic-sniper";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/somatic-sniper/somatic-sniper.patch b/nixpkgs/pkgs/applications/science/biology/somatic-sniper/somatic-sniper.patch
new file mode 100644
index 000000000000..9af04c0a0696
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/somatic-sniper/somatic-sniper.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6d5a180..7254292 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH
+     )
+ 
+ include(TestHelper)
+-include(VersionHelper)
++#include(VersionHelper)
+ include(ProjectHelper)
+ 
+ # NOTE: for sniper we want the exe suffix to be like 0.7.4, not just 0.7
+diff --git a/vendor/samtools.patch b/vendor/samtools.patch
+index f173017..654f878 100644
+--- a/vendor/samtools.patch
++++ b/vendor/samtools.patch
+@@ -6,7 +6,7 @@ diff -Nuar a/Makefile b/Makefile
+  
+  samtools:lib $(AOBJS)
+ -		$(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) $(LIBCURSES) -lz -L. -lbam
+-+		$(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) $(LIBCURSES) -L. -lbam -lz
+++		$(CC) $(CFLAGS) -o $@ $(AOBJS) -lm $(LIBPATH) -lncurses -L. -lbam -lz
+  
+  razip:razip.o razf.o
+  		$(CC) $(CFLAGS) -o $@ razf.o razip.o -lz
diff --git a/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix b/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix
new file mode 100644
index 000000000000..1f291d1a7008
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, cmake, rocksdb, rapidjson, pkgconfig, fetchFromGitHub, fetchpatch, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "sortmerna";
+  version = "3.0.3";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "biocore";
+    rev = "v${version}";
+    sha256 = "0zx5fbzyr8wdr0zwphp8hhcn1xz43s5lg2ag4py5sv0pv5l1jh76";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CMakeInstallPrefix.patch";
+      url = "https://github.com/biocore/sortmerna/commit/4d36d620a3207e26cf3f588d4ec39889ea21eb79.patch";
+      sha256 = "0hc3jwdr6ylbyigg52q8islqc0mb1k8rrjadvjfqaxnili099apd";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake rapidjson pkgconfig ];
+  buildInputs = [ zlib rocksdb rapidjson ];
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=Release"
+    "-DROCKSDB_HOME=${rocksdb}"
+    "-DRAPIDJSON_HOME=${rapidjson}"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Tools for filtering, mapping, and OTU-picking from shotgun genomics data";
+    license = licenses.lgpl3;
+    platforms = platforms.x86_64;
+    homepage = "https://bioinfo.lifl.fr/RNA/sortmerna/";
+    maintainers = with maintainers; [ luispedro ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/spades/default.nix b/nixpkgs/pkgs/applications/science/biology/spades/default.nix
new file mode 100644
index 000000000000..d555f2873a67
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/spades/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, zlib, bzip2, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "SPAdes";
+  version = "3.14.1";
+
+  src = fetchurl {
+    url = "http://cab.spbu.ru/files/release${version}/${pname}-${version}.tar.gz";
+    sha256 = "1ji3afn6yvx7ysg7p9j0d1g28zrnxg1b7x90mhs2bj3lgs7vfafn";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ zlib bzip2 ];
+
+  doCheck = true;
+
+  sourceRoot = "${pname}-${version}/src";
+
+  meta = with stdenv.lib; {
+    description = "St. Petersburg genome assembler: assembly toolkit containing various assembly pipelines";
+    license = licenses.gpl2;
+    homepage = "http://cab.spbu.ru/software/spades/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bzizou ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/stacks/default.nix b/nixpkgs/pkgs/applications/science/biology/stacks/default.nix
new file mode 100644
index 000000000000..12c865162425
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/stacks/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, zlib }:
+    
+stdenv.mkDerivation rec {
+  pname = "stacks";
+  version = "2.53";
+  src = fetchurl {
+    url = "http://catchenlab.life.illinois.edu/stacks/source/${pname}-${version}.tar.gz";
+    sha256 = "1zchds205nwdqch1246953dr8c0019yas178qbq3jypbxvmgq7pf";
+  };
+
+  buildInputs = [ zlib ];
+
+  meta = {
+    description = "Software pipeline for building loci from short-read sequences";
+    homepage = "http://catchenlab.life.illinois.edu/stacks/";
+    maintainers = [ stdenv.lib.maintainers.bzizou ];
+    license = stdenv.lib.licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/star/default.nix b/nixpkgs/pkgs/applications/science/biology/star/default.nix
new file mode 100644
index 000000000000..6f4211d0c0d9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/star/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "star";
+  version = "2.7.3a";
+
+  src = fetchFromGitHub {
+    repo = "STAR";
+    owner = "alexdobin";
+    rev = version;
+    sha256 = "1hgiqw5qhs0pc1xazzihcfd92na02xyq2kb469z04y1v51kpvvjq";
+  };
+
+  sourceRoot = "source/source";
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "/bin/rm" "rm"
+  '';
+
+  buildInputs = [ zlib ];
+
+  buildFlags = [ "STAR" "STARlong" ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -D STAR STARlong -t $out/bin
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Spliced Transcripts Alignment to a Reference";
+    homepage = "https://github.com/alexdobin/STAR";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.arcadio ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/strelka/default.nix b/nixpkgs/pkgs/applications/science/biology/strelka/default.nix
new file mode 100644
index 000000000000..a32eddcb1cd9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/strelka/default.nix
@@ -0,0 +1,43 @@
+{stdenv, fetchFromGitHub, cmake, zlib, python2}:
+
+stdenv.mkDerivation rec {
+  pname = "strelka";
+  version = "2.9.10";
+
+  src = fetchFromGitHub {
+    owner = "Illumina";
+    repo = "strelka";
+    rev = "v${version}";
+    sha256 = "1nykbmim1124xh22nrhrsn8xgjb3s2y7akrdapn9sl1gdych4ppf";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib python2 ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error=maybe-uninitialized"
+    "-Wno-error=pessimizing-move"
+  ];
+
+  preConfigure = ''
+    sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
+    patchShebangs .
+  '';
+
+  postFixup = ''
+    pushd $out/lib/python/pyflow
+    sed -i 's|/bin/bash|${stdenv.shell}|' pyflowTaskWrapper.py
+    rm pyflowTaskWrapper.pyc
+    echo "import pyflowTaskWrapper" | python2
+    popd
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Germline and small variant caller";
+    license = licenses.gpl3;
+    homepage = "https://github.com/Illumina/strelka";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = [ "x86_64-linux" ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/sumatools/default.nix b/nixpkgs/pkgs/applications/science/biology/sumatools/default.nix
new file mode 100644
index 000000000000..1e3b479d54fc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/sumatools/default.nix
@@ -0,0 +1,68 @@
+{ gccStdenv, fetchFromGitLab, zlib }:
+
+let
+  stdenv = gccStdenv;
+  meta = with stdenv.lib; {
+    description = "Fast and exact comparison and clustering of sequences";
+    homepage = "https://metabarcoding.org/sumatra";
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+
+in rec {
+
+  # Suma library
+  sumalibs = stdenv.mkDerivation rec {
+    version = "1.0.34";
+    pname = "sumalibs";
+    src = fetchFromGitLab {
+      domain = "git.metabarcoding.org";
+      owner = "obitools";
+      repo = pname;
+      rev = "sumalib_v${version}";
+      sha256 = "0hwkrxzfz7m5wdjvmrhkjg8kis378iaqr5n4nhdhkwwhn8x1jn5a";
+    };
+    makeFlags = [ "PREFIX=$(out)" ];
+    inherit meta;
+  };
+
+  # Sumatra
+  sumatra = stdenv.mkDerivation rec {
+    version = "1.0.34";
+    pname = "sumatra";
+    src = fetchFromGitLab {
+      domain = "git.metabarcoding.org";
+      owner = "obitools";
+      repo = pname;
+      rev = "${pname}_v${version}";
+      sha256 = "1bbpbdkshdc3xffqnr1qfy8qk64ldsmdc3s8mrcrlx132rgbi5f6";
+    };
+    buildInputs = [ sumalibs zlib ];
+    makeFlags = [
+      "LIBSUMA=${sumalibs}/lib/libsuma.a"
+      "LIBSUMAPATH=-L${sumalibs}"
+      "PREFIX=$(out)"
+    ];
+    inherit meta;
+  };
+
+  # Sumaclust
+  sumaclust = stdenv.mkDerivation rec {
+    version = "1.0.34";
+    pname = "sumaclust";
+    src = fetchFromGitLab {
+      domain = "git.metabarcoding.org";
+      owner = "obitools";
+      repo = pname;
+      rev = "${pname}_v${version}";
+      sha256 = "0x8yi3k3jxhmv2krp4rcjlj2f9zg0qrk7gx4kpclf9c3yxgsgrds";
+    };
+    buildInputs = [ sumalibs ];
+    makeFlags = [
+      "LIBSUMA=${sumalibs}/lib/libsuma.a"
+      "LIBSUMAPATH=-L${sumalibs}"
+      "PREFIX=$(out)"
+    ];
+    inherit meta;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/svaba/default.nix b/nixpkgs/pkgs/applications/science/biology/svaba/default.nix
new file mode 100644
index 000000000000..ae8dc95d6fea
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/svaba/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, zlib, bzip2, lzma, fetchFromGitHub } :
+
+stdenv.mkDerivation rec {
+  version = "1.1.0";
+  pname = "svaba";
+
+  src = fetchFromGitHub {
+    owner = "walaj";
+    repo = pname;
+    rev = version;
+    sha256 = "1vv5mc9z5d22kgdy7mm27ya5aahnqgkcrskdr2405058ikk9g8kp";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [ zlib bzip2 lzma ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm555 src/svaba/svaba $out/bin/svaba
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Structural variant and INDEL caller for DNA sequencing data, using genome-wide local assembly";
+    license = licenses.gpl3;
+    homepage = "https://github.com/walaj/svaba";
+    maintainers = with maintainers; [ scalavision ];
+    platforms = platforms.linux;
+    longDescription = ''
+      SvABA is a method for detecting structural variants in sequencing data
+      using genome-wide local assembly. Under the hood, SvABA uses a custom
+      implementation of SGA (String Graph Assembler) by Jared Simpson,
+      and BWA-MEM by Heng Li. Contigs are assembled for every 25kb window
+      (with some small overlap) for every region in the genome.
+      The default is to use only clipped, discordant, unmapped and indel reads,
+      although this can be customized to any set of reads at the command line using VariantBam rules.
+      These contigs are then immediately aligned to the reference with BWA-MEM and parsed to identify variants.
+      Sequencing reads are then realigned to the contigs with BWA-MEM, and variants are scored by their read support.
+    '';
+
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix b/nixpkgs/pkgs/applications/science/biology/tebreak/default.nix
new file mode 100644
index 000000000000..9ff81944f6a7
--- /dev/null
+++ b/nixpkgs/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;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/trimal/default.nix b/nixpkgs/pkgs/applications/science/biology/trimal/default.nix
new file mode 100755
index 000000000000..8d7e62b61431
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/trimal/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "trimal";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "scapella";
+    rev = "v${version}";
+    sha256 = "0isc7s3514di4z953xq53ncjkbi650sh4q9yyw5aag1n9hqnh7k0";
+  };
+
+  postUnpack = ''
+    sourceRoot=''${sourceRoot}/source
+    echo Source root reset to ''${sourceRoot}
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a trimal readal statal $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for the automated removal of spurious sequences or poorly aligned regions from a multiple sequence alignment";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    homepage = "http://trimal.cgenomics.org";
+    maintainers = [ maintainers.bzizou ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/truvari/default.nix b/nixpkgs/pkgs/applications/science/biology/truvari/default.nix
new file mode 100644
index 000000000000..e64c9d3493e9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/truvari/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, fetchFromGitHub
+, python3Packages
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "truvari";
+  version = "1.3.4";
+
+  src = fetchFromGitHub {
+    owner = "spiralgenetics";
+    repo = "truvari";
+    rev = "v${version}";
+    sha256 = "1bph7v48s7pyfagz8a2fzl5fycjliqzn5lcbv3m2bp2ih1f1gd1v";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    pyvcf
+    python-Levenshtein
+    progressbar2
+    pysam
+    pyfaidx
+    intervaltree
+  ];
+
+  prePatch = ''
+    substituteInPlace ./setup.py \
+      --replace '"progressbar2==3.41.0",' '"progressbar2==3.47.0",' \
+      --replace '"pysam==0.15.2",' '"pysam==0.15.4",' \
+      --replace '"pyfaidx==0.5.5.2",' '"pyfaidx==0.5.8",'
+  '';
+
+  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/nixpkgs/pkgs/applications/science/biology/varscan/default.nix b/nixpkgs/pkgs/applications/science/biology/varscan/default.nix
new file mode 100644
index 000000000000..e97c8f14451f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/varscan/default.nix
@@ -0,0 +1,36 @@
+{stdenv, fetchurl, jre, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "varscan";
+  version = "2.4.2";
+
+  src = fetchurl {
+    url = "https://github.com/dkoboldt/varscan/releases/download/${version}/VarScan.v${version}.jar";
+    sha256 = "0cfhshinyqgwc6i7zf8lhbfybyly2x5anrz824zyvdhzz5i69zrl";
+  };
+
+  buildInputs = [ jre makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/libexec/varscan
+    cp $src $out/libexec/varscan/varscan.jar
+    mkdir -p $out/bin
+    makeWrapper ${jre}/bin/java $out/bin/varscan --add-flags "-jar $out/libexec/varscan/varscan.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Variant calling and somatic mutation/CNV detection for next-generation sequencing data";
+    # VarScan 2 is free for non-commercial use by academic,
+    # government, and non-profit/not-for-profit institutions. A
+    # commercial version of the software is available, and licensed
+    # through the Office of Technology Management at Washington
+    # University School of Medicine.
+    license = licenses.unfree;
+    homepage = "https://github.com/dkoboldt/varscan";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix b/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix
new file mode 100755
index 000000000000..52957b58bc92
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, zlib, autoreconfHook, pkgconfig, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "vcftools";
+  version = "0.1.16";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "vcftools";
+    rev = "v${version}";
+    sha256 = "0msb09d2cnm8rlpg8bsc1lhjddvp3kf3i9dsj1qs4qgsdlzhxkyx";
+  };
+
+  buildInputs = [ autoreconfHook pkgconfig zlib perl ];
+
+  meta = with stdenv.lib; {
+    description = "A set of tools written in Perl and C++ for working with VCF files, such as those generated by the 1000 Genomes Project";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    homepage = "https://vcftools.github.io/index.html";
+    maintainers = [ maintainers.rybern ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/xenomapper/default.nix b/nixpkgs/pkgs/applications/science/biology/xenomapper/default.nix
new file mode 100644
index 000000000000..f5e538c70961
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/xenomapper/default.nix
@@ -0,0 +1,23 @@
+{buildPythonPackage, lib, fetchFromGitHub, statistics}:
+
+buildPythonPackage rec {
+  pname = "xenomapper";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "genomematt";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0mnmfzlq5mhih6z8dq5bkx95vb8whjycz9mdlqwbmlqjb3gb3zhr";
+  };
+
+  propagatedBuildInputs = [ statistics ];
+
+  meta = with lib; {
+    homepage = "https://github.com/genomematt/xenomapper";
+    description = "A utility for post processing mapped reads that have been aligned to a primary genome and a secondary genome and binning reads into species specific, multimapping in each species, unmapped and unassigned bins";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.jbedo ];
+  };
+}