From fde6c31445e72cfc976971e6811bb5c84d0cf679 Mon Sep 17 00:00:00 2001 From: Armin Sobhani Date: Tue, 8 May 2018 16:57:14 -0400 Subject: [PATCH] add idba bioinformatics package --- .version | 2 +- pkgs/all-packages.nix | 2 ++ pkgs/idba.nix | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/idba.nix diff --git a/.version b/.version index 2fdad9f..a88d2ca 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -17.09 +18.03 diff --git a/pkgs/all-packages.nix b/pkgs/all-packages.nix index d8bc318..3f5e418 100644 --- a/pkgs/all-packages.nix +++ b/pkgs/all-packages.nix @@ -34,6 +34,8 @@ self: super: pkgs: with pkgs; { sambamba = callPackage ./sambamba { }; + idba = callPackage ./idba.nix { }; + nixStable = super.nixStable.overrideAttrs ( attrs: { patches = attrs.patches or [] ++ [ ./nix/remote.patch ./nix/cvmfs.patch ]; } ); nix = super.nix.overrideAttrs diff --git a/pkgs/idba.nix b/pkgs/idba.nix new file mode 100644 index 0000000..f49f42e --- /dev/null +++ b/pkgs/idba.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl +, bash }: + +stdenv.mkDerivation rec { + version = "1.1.3"; + name = "idba-${version}"; + + src = fetchurl { + url = "https://github.com/loneknightpy/idba/releases/download/${version}/idba-${version}.tar.gz"; + sha256 = "1l16mvxyr226gzrd0kw423im2nv07dvvzaib40f5qwkd7i3283h3"; + }; + + # increase max sequence length to 256 + postPatch = '' + sed -i 's/kMaxShortSequence = 128/kMaxShortSequence = 256/' src/sequence/short_sequence.h + ''; + + # default 'make install' has a bug that doesn't install all the binaries + installPhase = '' + mkdir -p $out/bin + find ./bin -maxdepth 1 -type f -perm /a+x -exec cp -av {} $out/bin \; + ''; + + # buildInputs = [ + # stdenv + # ]; + + meta = with stdenv.lib; { + homepage = https://github.com/loneknightpy/idba/; + description = "Basic iterative de Bruijn graph assembler for second-generation sequencing reads"; + longDescription = "IDBA is the basic iterative de Bruijn graph assembler for second-generation sequencing reads. IDBA-UD, an extension of IDBA, is designed to utilize paired-end reads to assemble low-depth regions and use progressive depth on contigs to reduce errors in high-depth regions. It is a generic purpose assembler and especially good for single-cell and metagenomic sequencing data. IDBA-Hybrid is another update version of IDBA-UD, which can make use of a similar reference genome to improve assembly result. IDBA-Tran is an iterative de Bruijn graph assembler for RNA-Seq data."; + platforms = platforms.all; + license = licenses.gpl3; + }; + + enableParallelBuilding = true; +}