From 4ee3f9f9c24b7dcdaa1be19aadd84454219c43f6 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Fri, 26 Oct 2018 07:59:04 +1100 Subject: init: samtools-dict --- tools/samtools-dict.nix | 20 ++++++++++++++++++++ tools/samtools.nix | 1 + 2 files changed, 21 insertions(+) create mode 100644 tools/samtools-dict.nix (limited to 'tools') diff --git a/tools/samtools-dict.nix b/tools/samtools-dict.nix new file mode 100644 index 0000000..80ec1e0 --- /dev/null +++ b/tools/samtools-dict.nix @@ -0,0 +1,20 @@ +{ bionix +, nixpkgs +, flags ? null +}: + +input: + +with nixpkgs; +with lib; +with bionix.types; + +assert (matchFiletype "samtools-dict" { fa = _: true; } input); + +stdenv.mkDerivation { + name = "samtools-dict"; + buildInputs = [ samtools ]; + buildCommand = '' + samtools dict ${optionalString (flags != null) flags} ${input} > $out + ''; +} diff --git a/tools/samtools.nix b/tools/samtools.nix index a05f53a..ea773eb 100644 --- a/tools/samtools.nix +++ b/tools/samtools.nix @@ -7,6 +7,7 @@ with bionix; faidx = callBionix ./samtools-faidx.nix; flagstat = callBionix ./samtools-flagstat.nix; index = callBionix ./samtools-index.nix; + dict = callBionix ./samtools-dict.nix; sort = callBionix ./samtools-sort.nix; merge = callBionix ./samtools-merge.nix; } -- cgit v1.2.3